[SOLVED] Connecting USB 3G dongle device as "modem"
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
right click on the network manager, select 'edit connections' then select the 'mobile broadband' tab. Click on 'add' and see if your device is in the list for the 'connection for this device' list box.
I set up a mifi via USB this way, I think (it's been a while). Like typical Linux, it can be a lot easier than you might think if it is a recognized device and a lot of the USB stuff is pretty standard. The problem is trying to figure out just where what you want to do is in the menu structure.
When I do lsusb without the device plugged in, I get:
Code:
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 03f0:231d Hewlett-Packard
Bus 002 Device 004: ID 03f0:251d Hewlett-Packard
Bus 002 Device 005: ID 138a:0007 DigitalPersona, Inc
Bus 002 Device 006: ID 5986:03b1 Acer, Inc
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
and with the device plugged in I get
Code:
Bus 001 Device 002: ID 19d2:2003 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 03f0:231d Hewlett-Packard
Bus 002 Device 004: ID 03f0:251d Hewlett-Packard
Bus 002 Device 005: ID 138a:0007 DigitalPersona, Inc
Bus 002 Device 006: ID 5986:03b1 Acer, Inc
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
This makes me think it is the one labelled "ONDA Communication". From an unsuccesful try with kppp, I guess the device is on /dev/ttyS0
Regarding setting it up as Broadband, I seem to find this feature missing on the WICD Network Manager.
NB: thorkelljarl, thanks for the warning regarding publishing my name.
The ID number(19d2:2003) is the key to finding out more; this ID/chip is used for more than one brand(ONDA,ZTE). It is apparently supported in the kernel with a module. You can begin by using the command "lsmod" both without and with the modem plugged in to check that a kernel module is being loaded.
After you have the modem plugged in, look at your /var/log/messages to see that it is correctly registered. Otherwise, there is a "usb_modemswitch" package/command.
Just in case it provides a quick fix, my similar ONDA dongle requires that I eject (in pcmanfm or whatever file browser) the "3Connect" `CD-ROM' which automounts when it is plugged in; this seems to make modeswitch kick in and it is then picked up as a modem; network manager applet offers `Mobile Broadband' at this point and it should be straightforward to set up the connection. The "3Connect" device, as well as whatever is in the SSD slot, are also mounted, allowing one to access data on the stick at the same time as using the connection, which is handy.
ditto on the dismount of the CD Rom device. I forgot that one.
It is always a pain when the network managers are different between distributions. I find the command line and /etc/config files are a royal mess as well as there can be a multitude of different things interacting somehow. Must be simple, I just haven't grokked it yet?
root@fskidd:/home/fskidd> usb_modeswitch
Error: Could not find file /etc/usb_modeswitch.setup
while the /var/log message for mode switching looks like (apologies, it is a long message)
Code:
root@fskidd:/home/fskidd> cat /var/log/usb_modeswitch_3-1.2\:1.0
USB_ModeSwitch log from Mon Dec 27 18:28:56 SAST 2010
Using global config file: /etc/usb_modeswitch.conf
raw args from udev: 3-1.2:1.0/3-1.2:1.0
USB dir exists: /sys/bus/usb/devices/3-1.2
----------------
USB values from sysfs:
manufacturer ZTE,Incorporated
product ZTE WCDMA Technologies MSM
serial 1234567890ABCDEF
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/19d2:2000
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/19d2:2000)
verbose output of usb_modeswitch:
--------------------------------
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
Reading config file: /etc/usb_modeswitch.d/19d2:2000
* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.2alpha (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= not set
TargetProductList=0001,0002,0015,0016,0017,0031,0037,0052,0055,0063
TargetClass= not set
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Looking for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
searching devices, found USB ID 19d2:2000
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 03f0:241d
searching devices, found USB ID 138a:0007
searching devices, found USB ID 8087:0020
searching devices, found USB ID 19d2:2000
found matching vendor ID
found matching product ID
adding device
Found devices in default mode or class (1)
Accessing device 005 on bus 003 ...
USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
Product: ZTE WCDMA Technologies MSM
Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
OK, message successfully sent
Checking for mode switch (max. 20 times, once per second) ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Original device can't be accessed anymore. Good.
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 5986:03b1
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 5986:03b1
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 5986:03b1
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
selibusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
libusb:error [op_get_config_descriptor] open '/dev/bus/usb/001/001' failed, ret=-1 errno=22
libusb-compat error: usb_find_devices: couldn't initialize device 1.1 (error -5)
arching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 5986:03b1
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 5986:03b1
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
Searching for target devices ...
searching devices, found USB ID 04f3:0230
searching devices, found USB ID 19d2:2003
found matching vendor ID
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 8087:0020
No new devices in target mode or class found
Mode switch has failed. Bye.
fail:
--------------------------------
(end of usb_modeswitch output)
All done, exiting
I think the ID that this message shows in the beginning (19d2:2000) does not match the ID from lsusb (19d2:2003), see earlier post. Could that be the issue?
Another extract from /var/log/messages is
Code:
Dec 27 18:18:36 fskidd usb_modeswitch: switching 19d2:2000 (ZTE,Incorporated: ZTE WCDMA Technologies MSM)
Dec 27 18:18:41 fskidd kernel: usb 3-1.2: USB disconnect, address 3
Dec 27 18:18:47 fskidd kernel: usb 3-1.2: new high speed USB device using ehci_hcd and address 4
Dec 27 18:18:47 fskidd kernel: USB Serial support registered for GSM modem (1-port)
Dec 27 18:18:47 fskidd kernel: option 3-1.2:1.0: GSM modem (1-port) converter detected
Dec 27 18:18:47 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1
Dec 27 18:18:47 fskidd kernel: option 3-1.2:1.1: GSM modem (1-port) converter detected
Dec 27 18:18:47 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2
Dec 27 18:18:47 fskidd kernel: option 3-1.2:1.2: GSM modem (1-port) converter detected
Dec 27 18:18:47 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB3
Dec 27 18:18:47 fskidd kernel: option 3-1.2:1.3: GSM modem (1-port) converter detected
Dec 27 18:18:47 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB4
Dec 27 18:18:47 fskidd kernel: usbcore: registered new interface driver option
Dec 27 18:18:47 fskidd kernel: option: v0.7.2:USB Driver for GSM modems
There seem to be two requirements: having the modem recognized properly and "flipping" it so that it appears as the right kind of device. This is what "gold leaf" managed as described in his post, but USB_ModeSwitch insures it.
One of the problems mentioned on Internet posts is that this modem is mis-recognized, and this seems to be the case according to your /var/log/messages. Can you simply plug the modem in and post the /var/log/messages again? I am not sure what is happening in your previous post when your results mention mode switching. Do you have the USB_ModeSwitch package installed and did you use a command?
/var/log/messages also says that the version of USB_ModeSwitch in your linux installation doesn't work with this USB modem, but Google tells me that you need the latest version of USB_ModeSwitch for the 19d2:2003 modem. You may have to compile it. Read this again.
I hope that the 1.1.6 version will solve both problems, but I'm not sure. The information about USB_ModeSwitch seems to say so. This is new to me too, and the Google results I get all reflect the problem in relation to different circumstances and different linux distributions.
This modem is sold as a ZTE/Onda, but what is the model number?
Last edited by thorkelljarl; 12-27-2010 at 09:18 PM.
root@fskidd:/home/fskidd> usb_modeswitch --version
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.6 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
OK, yesterday I had an earlier version of usb_modeswitch, which I uninstalled and replaced with version 1.1.6 yesterday. And now, today without any command except plugging in the device, I get this message
Code:
Dec 28 10:52:54 fskidd kernel: usb 3-1.2: new high speed USB device using ehci_hcd and address 3
Dec 28 10:52:54 fskidd kernel: Initializing USB Mass Storage driver...
Dec 28 10:52:54 fskidd kernel: scsi6 : usb-storage 3-1.2:1.0
Dec 28 10:52:54 fskidd kernel: usbcore: registered new interface driver usb-storage
Dec 28 10:52:54 fskidd kernel: USB Mass Storage support registered.
Dec 28 10:52:55 fskidd usb_modeswitch: switching 19d2:2000 (ZTE,Incorporated: ZTE WCDMA Technologies MSM)
Dec 28 10:52:57 fskidd blueman-mechanism: Exiting
Dec 28 10:53:00 fskidd kernel: usb 3-1.2: USB disconnect, address 3
Dec 28 10:53:06 fskidd kernel: usb 3-1.2: new high speed USB device using ehci_hcd and address 4
Dec 28 10:53:06 fskidd kernel: USB Serial support registered for GSM modem (1-port)
Dec 28 10:53:06 fskidd kernel: option 3-1.2:1.0: GSM modem (1-port) converter detected
Dec 28 10:53:06 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1
Dec 28 10:53:06 fskidd kernel: option 3-1.2:1.1: GSM modem (1-port) converter detected
Dec 28 10:53:06 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2
Dec 28 10:53:06 fskidd kernel: option 3-1.2:1.2: GSM modem (1-port) converter detected
Dec 28 10:53:06 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB3
Dec 28 10:53:06 fskidd kernel: option 3-1.2:1.3: GSM modem (1-port) converter detected
Dec 28 10:53:06 fskidd kernel: usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB4
Dec 28 10:53:06 fskidd kernel: usbcore: registered new interface driver option
Dec 28 10:53:06 fskidd kernel: option: v0.7.2:USB Driver for GSM modems
As far as I can tell, the program does what is supposed to, but doesn't list the modem correctly. It is listed as 19d2:2000. According to draisberghof.de, it seems you need to edit /etc/usb_modeswitch.conf or /etc/usb_modeswitch.d, or maybe both to correct for 2003.
I see that you joined the ModeSwitchForum; maybe there is more useful information there. From what I've found, if you can get USB_ModeSwith working, you should only have to use "wvdial" or an equivalent to be on you way.
I get the feeling that our roles should be reversed. Anyone using Slackware knows much more about linux than I do; all I do is look it up.
Last edited by thorkelljarl; 12-28-2010 at 10:31 AM.
In summary:
1. I had to install usb_modeswitch and its data package from http://www.draisberghof.de/usb_modeswitch/
2. then I neede wvdial (which on Slacky also needs wvstreams)
3. when all goes well, I have to export the DNS addresses from wvdial's output to /etc/resolve.conf
Please see the above mentioned web link for full details of the successful struggle for connecting the Netman device from MTC in Namibia.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.