关于华为3G/4G上网卡设备使用usb modemswitch的问题!

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
zhangjint5
帖子: 304
注册时间: 2011-01-02 12:31

关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#1

帖子 zhangjint5 » 2017-01-08 15:15

华为的上网卡设备(有HiLink的),在 Desktop 版本的 Ubuntu 插上就直接可以用,不用任何配置。识别成一个网卡!

但是在 Server 版本的这类无图形界面的 Linux 版本,需要用 usb modemswitch 命令切换一下才行!(不切换显示成一个USB光驱,里面有Win版驱动)

我想问下,有没有办法让 Server 版本的 Ubuntu 插上3G/4G上网卡也可以自动连上?
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#2

帖子 vickycq » 2017-01-08 18:08

Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#3

帖子 poloshiao » 2017-01-08 18:30

华为的上网卡设备(有HiLink的),在 Desktop 版本的 Ubuntu 插上就直接可以用,不用任何配置。识别成一个网卡!
但是在 Server 版本的这类无图形界面的 Linux 版本,需要用 usb modemswitch 命令切换一下才行!(不切换显示成一个USB光驱,里面有Win版驱动)
補充

https://wiki.gnome.org/Projects/Network ... eBroadband
Why Doesn't My Device Show Up?

Integrated Driver CDs
Many devices show up as a CD-ROM drive when first plugged in, and require a small helper to reset the device into the modem mode that NetworkManager can use. This is not the responsibility of NetworkManager itself, and is normally accomplished via usb_modeswitch and it's associated udev rules. You want to use version 1.1.0 or later to get automatic modeswitching when the device is plugged in.

Huawei
Huawei devices require usb_modeswitch to eject the fake driver CD before the device is recognized as a modem.
onlylove
论坛版主
帖子: 5230
注册时间: 2007-01-14 16:23

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#4

帖子 onlylove » 2017-01-08 19:50

这东西记得eject弹出虚拟光驱,就自动变成modem了,不过一劳永逸的方法好像是用at指令设置上网卡的工作模式,改过之后,默认就不会显示虚拟光驱了,需要用串口终端软件,at指令的话,可能只能找华为或者上网搜了
zhangjint5
帖子: 304
注册时间: 2011-01-02 12:31

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#5

帖子 zhangjint5 » 2017-01-09 9:10

onlylove 写了:这东西记得eject弹出虚拟光驱,就自动变成modem了,不过一劳永逸的方法好像是用at指令设置上网卡的工作模式,改过之后,默认就不会显示虚拟光驱了,需要用串口终端软件,at指令的话,可能只能找华为或者上网搜了
华为支持 Hi Link 的设备已经没有 Modem 模式了,也没有串口,更谈不上 AT 指令了!

华为 Hi Link 设备插在 Windows 上是一个 USB 光驱,装好里面驱动(其实是个USB设备模式切换软件),就识别成 USB 网卡,在 Windows 设备管理器里面类别是网卡设备。(而不是以前的调制解调器和COM口之类)。也不需要拨号神马的,直接就上网了。至于接入点,看信号强度什么的功能,在 Web 配置界面里面,而不是以前老的那样在客户端软件里面。

其实每次在 Windows 插上支持 HiLink 的上网卡,都会识别成光驱,让后被软件瞬间切换到网卡,所以每次插上都能听到 Windows USB设备的弹出声音!


Ubuntu 图形界面下看起来似乎是 NetworkManager 在发挥作用,研究下!
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#6

帖子 poloshiao » 2017-01-09 10:58

Ubuntu 图形界面下看起来似乎是 NetworkManager 在发挥作用,研究下!
https://wiki.ubuntu.com/NetworkManager/ ... your_modem
Probing your modem

https://wiki.ubuntu.com/NetworkManager/Hardware/3G
3G
使用 Huawei 搜尋

不知資料是否還適用

http://askubuntu.com/questions/462421/i ... -in-ubuntu
Is there a list of usb 4G modems that work “as is” in Ubuntu?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于华为3G/4G上网卡设备使用usb modemswitch的问题!

#7

帖子 poloshiao » 2017-01-09 11:46

但是在 Server 版本的这类无图形界面的 Linux 版本,需要用 usb modemswitch 命令切换一下才行!
0. 應該是 usb-modeswitch ?

1. usb-modeswitch
1-1. http://www.draisberghof.de/usb_modeswitch/
USB_ModeSwitch - Handling Mode-Switching USB Devices on Linux
1-2. http://packages.ubuntu.com/search?suite ... chon=names
套件 usb-modeswitch

2. ModemManager
2-1. https://www.freedesktop.org/wiki/Softwa ... /#index6h1
Huawei
2-2. https://www.freedesktop.org/wiki/Software/ModemManager/
What is ModemManager?
2-3. http://packages.ubuntu.com/search?suite ... chon=names
套件 modemmanager
2-3-1. http://packages.ubuntu.com/xenial/modemmanager
usb-modeswitch 是 modemmanager 的推薦套件
回复