Guide: Mobile Broadband Usb Stick Usage


illusionx

Still Fresh
Joined
Jun 4, 2010
Messages
23
Location
Netherlands
Okay, I got this to work by a much more complex route but over the last few days I've learnt more and more and refined it down to a simpler method .

Unfortunately all of this stuff needs root access and it's going onto the NAND so you'll be asked for your password at least once.
I'd also say this isn't amazingly difficult but having some Linux experience would be good and at minimum you should know how to edit a file.

You'll need to open a terminal and every time you see a line in this guide beginning with a '#' it signifies the command line and something you need to enter. You do not need to type the '#'

Installing modem manager

Firstly we're going to need the modem manager module for network manager, as it turns out this is available from the repository the Pandora accesses by default.
Execute the following commands

# sudo opkg update

This will update your lists of available packages from the repository

# sudo opkg install modemmanager

You should get the following output

Installing modemmanager (0.3-r0.5) to root...
Downloading http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/modemmanager_0.3-r0.5_armv7a.ipk.
Configuring modemmanager.




Connecting and testing your USB mobile modem

Now plug in your USB mobile modem and run the following command.

# sudo lsusb

You should get some output similar to this

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 013: ID 12d1:1446 Huawei Technologies Co., Ltd.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


I can see there on Bus 001 I have Device 013 which is clearly my Huawei E1820 HSPS+ stick. If you just see the two root hubs then your stick isn't seen. This could be because it requires more power than the pandora can provide or its not USB2.0

The ID here is important, the first part is the vendor and the second is the product. In my example here my vendor is 12d1 and my product is 1446 this uniquely identifies that model of device.

Now there are a few ways forward here. If you know this device needs to mode switch just jump straight to that step. If not you can try the following to see if it works without that step.

Enter the following command replacing the vendor and product with your own vendor and product.

# sudo modprobe usbserial vendor=0x12d1 product=0x1446

Now we'll perform a dmesg this displays what you could consider to be diagnostic messages, you'll get screens of output but you're interested in the last lines.

# dmesg

If you see something very similar to this
[ 3033.636840] usbcore: registered new interface driver usbserial
[ 3033.642913] usbserial: USB Serial support registered for generic
[ 3033.649078] usbserial_generic 1-2:1.0: generic converter detected
[ 3033.655639] usb 1-2: generic converter now attached to ttyUSB0
[ 3033.661621] usbserial_generic 1-2:1.1: generic converter detected
[ 3033.668090] usb 1-2: generic converter now attached to ttyUSB1
[ 3033.674041] usbserial_generic 1-2:1.2: generic converter detected
[ 3033.680480] usb 1-2: generic converter now attached to ttyUSB2
[ 3033.686370] usbserial_generic 1-2:1.3: generic converter detected
[ 3033.692840] usb 1-2: generic converter now attached to ttyUSB3
[ 3033.698822] usbcore: registered new interface driver usbserial_generic
[ 3033.705444] usbserial: USB Serial Driver core


Okay so this looks good and we probably don't need to do any mode switching. In the rest of the guide just use the vendor and product-id's you've used up to this point. We can see that we now have some ttyUSB ports. These are serial terminals connected via USB and since our device is the only thing we've got plugged in it's a pretty safe assumption that they've bound to that device you should jump ahead to the section for configuring network manager.

If you see something more like this
[ 3146.999206] usbcore: registered new interface driver usbserial
[ 3147.007904] usbserial: USB Serial support registered for generic
[ 3147.014038] usbcore: registered new interface driver usbserial_generic
[ 3147.020629] usbserial: USB Serial Driver core

Then continue on to try mode switching your modem.

Mode switching your modem

Enter the following command replacing the vendor and product with your own vendor and product.

# sudo /lib/udev/modem-modeswitch -v 0x12d1 -p 0x1446 -t option-zerocd

Now we check to see if anything has changed.

# sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 014: ID 12d1:14ac Huawei Technologies Co., Ltd.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


As you can see in my example my product-id has changed from 1446 to 14ac this is good and means that I've gotten the device switched into it's modem mode.

Okay if you jumped straight to this section you'll need to do the following.

# modprobe usbserial vendor=0x12d1 product=0x14ac

Now if you do a

# dmesg

At the end you should see something along the lines of
[ 3033.636840] usbcore: registered new interface driver usbserial
[ 3033.642913] usbserial: USB Serial support registered for generic
[ 3033.649078] usbserial_generic 1-2:1.0: generic converter detected
[ 3033.655639] usb 1-2: generic converter now attached to ttyUSB0
[ 3033.661621] usbserial_generic 1-2:1.1: generic converter detected
[ 3033.668090] usb 1-2: generic converter now attached to ttyUSB1
[ 3033.674041] usbserial_generic 1-2:1.2: generic converter detected
[ 3033.680480] usb 1-2: generic converter now attached to ttyUSB2
[ 3033.686370] usbserial_generic 1-2:1.3: generic converter detected
[ 3033.692840] usb 1-2: generic converter now attached to ttyUSB3
[ 3033.698822] usbcore: registered new interface driver usbserial_generic
[ 3033.705444] usbserial: USB Serial Driver core


Okay so this looks good we can see that we now have some ttyUSB ports. These are serial terminals connected via USB and since our device is the only thing we've got plugged in it's a pretty safe assumption that they've bound to that device.

Lets go ahead and configure network manager

Configuring Network Manager

Right I'm going to assume you know your way around your Pandora, the network manager is at the bottom next to your battery meter, its the same program you use for wireless connections.

  1. Right click the 'Network Manager' icon and check you can see an 'Enable Mobile Broadband' option. If you can continue on, if not go back and check the hardware configuration steps because your modem is not being detected.
  2. From the 'Network Manger' icon right click menu Select "Edit Connections…"
  3. You should see the 'Network Connections' window select the "Mobile Broadband" tab.
  4. Click Add.
  5. Select the correct option. For most people using this guide it's going to be "GSM - based technology" and click okay.
  6. Fill the form out. You'll need to locate the settings for your provider, usually a quick search on Google will provide the information you need. At minimum you'll need the number (Usually '*99#') and the APN, for my connection that's all I need and putting in the username and password stops my connection from working. So use the APN settings for your provider but if it doesn't work try it without the username and password.
  7. Click Apply. Now this is harder than you think because the form is too big for the screen. Hold down the Start / Alt key and press space. A menu should appear, use the D-pad to scroll down to 'Move' and hit 'Enter' your mouse pointer should now appear as a cross in the middle of the form window. You can use either the left nub or the D-Pad to move the form window up so you can see the bottom of the window and then press 'Enter' to place the window. Now you can click 'Apply'
  8. You should see the 'Network Connections' window again, Click 'Close'
  9. Right click the 'Network Manager' icon again and this time click 'Enable Mobile Broadband'
  10. Now left click the 'Network Manager' icon and select your newly created Mobile Broadband connection.

If all went well it should connect and you can now access the Internet on the go.
If the 'Enable Mobile Broadband' option isn't there and you've rechecked your hardware config, it could be that your modem just isn't supported.

If everything worked well continue on and we'll make everything work automagically.

Making this all automatic

Depending on which steps you needed to perform to get your modem working you'll need to create the following files. I'm using vi here because it's what I know but you should use the editor of your own choice that you know how to use. I'm not giving a lesson on how to use vi and it's not easy. If you're not familiar with vi use nano it's a little easier to understand just replace 'vi' with 'nano' in all the commands below.

Automatic Mode Switching

Again replace my product and vendor id examples with your own that you got during the connection step.

First we create a udev rule which when it senses our un-switched modem has been connected runs the modeswitch program and passes the correct id's to it.

# sudo vi /etc/udev/rules.d/999-mobilestick.rules
Enter the following
SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/lib/udev/modem-modeswitch -v 0x12d1 -p 0x1446 -t option-zerocd"
and save the file.

Be careful with that last one as the product id is first and the vendor id second in the first part of the rule.

# sudo udevadm control --reload-rules

Now whenever you insert your modem it should automatically mode switch to it's other product-id

Automatic serial connections

This step creates a file that loads the usbserial module and passes it the vendor and product-id's for your device. Notice we use the mode switched id's as thats the device that's really the modem.

# sudo vi /etc/modutils/mobilestickserial
Now enter the following
usbserial vendor=0x12d1 product=0x14ac
and save the file

# sudo update-modules

And your done, whenever you connect you mobile stick it should be detected, mode switched and usb serial ports connected to it so you can use it in Network Manger. The only issue I have to resolve is that each time you connect it you must select the 'Enable Mobile Broadband' option in the right click menu of Network Manager.
 
for those who want to use mousepad to edit the config files, you can type sudo mousepad into a terminal. This will allow you to access and edit the system files.
 
Alerino said:
Thanks a BUNCH!
Can you report on download speeds? Battery usage? and so on...

I can't comment on download speeds much, but I can certainly browse and IM and all the rest of it without any problems. I tend not to be downloading when I'm on the move.

Battery life does suffer, just judging by the battery meter estimates it looks like with an E1820 you'll half your battery life. Which is still enough for me :)
 
Last edited by a moderator:
downloading modem manager appears to have allowed me to tether my LG Banter cellphone to achieve internet! yay! didn't need to do anything else except download that and setup the connection in network settings.
 
I've not been able to get it working. I bought an unlocked 02 Huawei e160 which is on the Pandora usb compatibility list as usb 2.0.

sudo lsusb only returns:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Thanks for the guide, illusionx. I'm going to wait and see if other E160 owners have any success, and then maybe buy the Huawei E1820 HSPS+ stick.
 
when i connect my sony-ericsson C901 via bluetooth i can sorta "connect" to it in network manager (the phones MAC is listed)
Settings on the phone is correct, should just be used like a regular "modem", any number i dial should use my data account on the phone.

Nut it connects to my phone via bt for max 2 seconds then disconnects again, any ideas?
 
GizmoTheGreen said:
when i connect my sony-ericsson C901 via bluetooth i can sorta "connect" to it in network manager (the phones MAC is listed)
Settings on the phone is correct, should just be used like a regular "modem", any number i dial should use my data account on the phone.

Nut it connects to my phone via bt for max 2 seconds then disconnects again, any ideas?

Try moving the Pandora right next to if not almost on top of the phone yet? I was having serious issues with the BT link staying alive while using pppd and tethering, seems proximity plays a big role here, not sure why or if my case is isolated.
 
Last edited by a moderator:
xopher said:
GizmoTheGreen said:
when i connect my sony-ericsson C901 via bluetooth i can sorta "connect" to it in network manager (the phones MAC is listed)
Settings on the phone is correct, should just be used like a regular "modem", any number i dial should use my data account on the phone.

Nut it connects to my phone via bt for max 2 seconds then disconnects again, any ideas?

Try moving the Pandora right next to if not almost on top of the phone yet? I was having serious issues with the BT link staying alive while using pppd and tethering, seems proximity plays a big role here, not sure why or if my case is isolated.

doesnt seem to change much... i guess i dont need modemmanager for this? since networmanager tries to use PAN i think
 
Last edited by a moderator:
GizmoTheGreen said:
xopher said:
GizmoTheGreen said:
when i connect my sony-ericsson C901 via bluetooth i can sorta "connect" to it in network manager (the phones MAC is listed)
Settings on the phone is correct, should just be used like a regular "modem", any number i dial should use my data account on the phone.

Nut it connects to my phone via bt for max 2 seconds then disconnects again, any ideas?

Try moving the Pandora right next to if not almost on top of the phone yet? I was having serious issues with the BT link staying alive while using pppd and tethering, seems proximity plays a big role here, not sure why or if my case is isolated.

doesnt seem to change much... i guess i dont need modemmanager for this? since networmanager tries to use PAN i think

I used pppd, wvdial kept crashing after modem initalization with a cc:202 error, I became exhausted looking for info, sorry that didn't help you.
 
Last edited by a moderator:
I was able to get a UM190 (Verizon CMDA and GSM) so that the network applet could see it. The problem was that it keeps defaulting to GSM in the network applet. I created a CMDA connection but when i click the network applet icon it only lists GSM connections.
 
I'm stuck in the middle of nowhere trying to get this to work, so it's pretty hit and miss, and I haven't been able to download modemmanager yet.

I'm stuck at the very first step. When I lsusb I just get the two hubs - I'm using a uk '3' dongle which is a Huawei E169 - it's definitely USB 2 and I think max power 500mA, so it should be there I guess... the green light on it flashes when I insert it. I'm assuming modemmanager isn't required for it to appear in lsusb?

The other thing I notice is that after I've plugged it in, I can't get a usb card reader to work until i reboot, does that indicate anything?

Anyone else used a Huawei E169 with the Pandora?
 
Thanks for this guide! I've struggled to find decent usb-modeswitch instructions anywhere. This enabled me to get a Huawei K3765 working on my sister's new Ubuntu install. :)
 
Hiho,
i'm trying to use a T-Mobile Web'n walk stick Fusion (MF637)

I followed your guide but there is something strange:
before plugin
Code:
panda:~$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
after stick plugin
Code:
panda:~$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 19d2:2000 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg after stick plugin
Code:
[ 3251.627777] usb 1-2: new high speed USB device using ehci-omap and address 2
[ 3251.805633] usb 1-2: configuration #1 chosen from 1 choice
[ 3251.834197] usb-storage: device ignored
[ 3251.839355] usb 1-2: New USB device found, idVendor=19d2, idProduct=2000
[ 3251.846099] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 3251.853363] usb 1-2: Product: ZTE CDMA Technologies MSM
[ 3251.858673] usb 1-2: Manufacturer: ZTE,Incorporated
[ 3251.863586] usb 1-2: SerialNumber: P673M2TMOBLCDROM

dmesg aftermodprobe:
Code:
[ 3521.285888] usbcore: registered new interface driver usbserial
[ 3521.291992] usbserial: USB Serial support registered for generic
[ 3521.298095] usbserial_generic 1-2:1.0: generic converter detected
[ 3521.304687] usb 1-2: generic converter now attached to ttyUSB0
[ 3521.310699] usbcore: registered new interface driver usbserial_generic
[ 3521.317291] usbserial: USB Serial Driver core

But i cannot enable mobile broadband(there is only enable networking enable wireless and enable notifications)
So i decided to follow your steps with the modswitch:

Code:
panda:~$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 19d2:2000 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
panda:~$ sudo /lib/udev/modem-modeswitch -v 0x19d2 -p 0x2000 -t option-zerocd
panda:~$ sudo lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 19d2:2000 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
As you can see, the productId has not changed.

And the dmesg after that:
Code:
[ 3875.754760] generic ttyUSB0: generic converter now disconnected from ttyUSB0
[ 3875.762054] usbserial_generic 1-2:1.0: device disconnected

And there is still no option to "enable mobile broadband"

What are possible reasons, that the device is not ready to use after the first steps?

greetings from germany
 
Alerino said:
check if you are modprobing as root (with sudo)
Yep i've runned everything as root.

Maybe it helps:
I've runned the modem-modeswitch with debug message:
Code:
panda:~$ sudo /lib/udev/modem-modeswitch -v 0x19d2 -p 0x2000 -t option-zerocd -d
D: Found mass storage device:
D:  Endpoints: 2
D:  Class:     0x8
D:  SubClass:  0x6
D:  Protocol:  0x50
D: Found modem mass storage device '002'
D: 002: REZERO command sent.
D: 002: failed to switch device to modem mode

greetings
 
Last edited by a moderator:
I'm having similar issues with an E220. (Funny, this guide got me up and running with three different dongles on an Ubuntu laptop, but not on the poor Pandora!)

I don't remember the details, but I'll have another go at it soon and compare my results to Capitano's.
 
So on my Ubuntu 10.04 desktop the surfstick works out-of-the-box.

And so I'm trying to get to the bottom of things..

Some understanding questions from a linux neewbie:
The modprobe adds the device as a usbserial device to the currently loaded modules, because by default the system recognizes that there is something (we see it with sudo lsusb)
, but it doesn't know what do with it. And the mode_modswitch line, changes the device type into a mobile broadband modem. Is this correct?
why is it expected to get a new productID??

Are those lines important in the dmesg after the modprobe?:
Code:
[ 3033.668090] usb 1-2: generic converter now attached to ttyUSB1
[ 3033.674041] usbserial_generic 1-2:1.2: generic converter detected
[ 3033.680480] usb 1-2: generic converter now attached to ttyUSB2
[ 3033.686370] usbserial_generic 1-2:1.3: generic converter detected
[ 3033.692840] usb 1-2: generic converter now attached to ttyUSB3

Because i get only the ttyUSB0 and no other ttyUSB's. Or is one enough?

What can we do with such a ttyUSB "thing"?

In some internet forums, there were users with problems with that stick on desktop linux computers, and mostly they have to change the device type with usb_modeswitch from usbstorage to usbserial. But this is a completely independent problem/solution from mine i think.

And the last question:
Is there a forum or something were i can get further help?
I think the bunch of desktop-linux-forums do not fit very well. Can somebody recommend me a place to ask questions beside this forum? Maybe a Angstrom on arm forum or something more general?.

Lots of questions, i know:) but i would love to use the mobile broadband stick with my pandora.

greetings
 
I think you're trying to modeswitch a device that actually has an easier solution.

As root or by using sudo try issuing the eject command and you might find it auto switches.

You may need to specify the /dev device that the cdrom sets up as but eject may just 'work'
 
Back
Top