illusionx
Still Fresh
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.
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.
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.
- 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.
- From the 'Network Manger' icon right click menu Select "Edit Connections…"
- You should see the 'Network Connections' window select the "Mobile Broadband" tab.
- Click Add.
- Select the correct option. For most people using this guide it's going to be "GSM - based technology" and click okay.
- 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.
- 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'
- You should see the 'Network Connections' window again, Click 'Close'
- Right click the 'Network Manager' icon again and this time click 'Enable Mobile Broadband'
- 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.