Difference between revisions of "Gobi Broadband Modems"

From ArchWiki
Jump to: navigation, search
(gobi_loader)
m (added info to inform user about packages needed to get mobile broadband selection working in NetworkManager)
 
(12 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
[[Category:Modems]]
 
[[Category:Modems]]
 
 
This is a short tutorial on connecting to the internet using your gobi modem.
 
This is a short tutorial on connecting to the internet using your gobi modem.
  
==Device identification==
+
== Device identification ==
Install usbutils
+
 
pacman -S usbutils
+
Install {{Pkg|usbutils}} and then examine the output of
and then examine the output of
+
 
  $ lsusb
 
  $ lsusb
 
which will show the vendor and product IDs of the device.
 
which will show the vendor and product IDs of the device.
Line 13: Line 11:
 
  Bus 001 Device 005: ID 03f0:371d Hewlett-Packard  
 
  Bus 001 Device 005: ID 03f0:371d Hewlett-Packard  
  
As of linux-3.1.1-1 the device is detected by the qcserial module, if not, you're going to have to recompile the qcserial module with your added product and vendor id.
+
As of linux-3.1.1-1 the device is detected by the qcserial module, if not, you are going to have to recompile the qcserial module with your added product and vendor id.
  
==gobi_loader==
+
Alternatively you can add the Product and Vendor ID by writing them into the new_id file (best both at the same time because most Gobi modules switch the Product ID when the Firmware is loaded).
 +
Here the Shell Commands i had to use (in a root shell, sudo does not work in this case for some reason):
 +
my integrated Gobi2K has the Vendor ID 04da and the Product IDs 250e (waiting for Firmware) and 250f (firmware loaded)
 +
echo "04da 250e" > /sys/bus/usb-serial/drivers/qcserial/new_id
 +
echo "04da 250f" > /sys/bus/usb-serial/drivers/qcserial/new_id
 +
note that this has to be repeated when you reload the qcserial module or reboot/shutdown.
 +
 
 +
== gobi_loader ==
  
 
"gobi_loader is a firmware loader for Qualcomm Gobi USB chipsets. These devices appear in an uninitialised state when power is applied and require firmware to be loaded before they can be used as modems. gobi_loader adds a udev rule that will trigger loading of the firmware and make the modem usable." (http://www.codon.org.uk/~mjg59/gobi_loader/)
 
"gobi_loader is a firmware loader for Qualcomm Gobi USB chipsets. These devices appear in an uninitialised state when power is applied and require firmware to be loaded before they can be used as modems. gobi_loader adds a udev rule that will trigger loading of the firmware and make the modem usable." (http://www.codon.org.uk/~mjg59/gobi_loader/)
  
Install [http://aur.archlinux.org/packages.php?ID=30943 gobi-loader] and [http://aur.archlinux.org/packages.php?ID=30944 gobi-firmware] from [[AUR]].
+
Install {{AUR|gobi-loader}} and {{AUR|gobi-firmware}} from [[AUR]].
  
After installation, you should enter your product and vendor id in the /lib/udev/rules.d/60-gobi.rules
+
After installation, you should enter your product and vendor id in the {{ic|/lib/udev/rules.d/60-gobi.rules}}
  
 
Then a simple reload of the qcserial module:
 
Then a simple reload of the qcserial module:
Line 27: Line 32:
 
  # modprobe qcserial
 
  # modprobe qcserial
  
==Connection==
+
==Manage Connection in Network Manager==
 +
 
 +
ModemManager is required for network manager to detect any mobile broadband devices.
 +
 
 +
This needs to be enabled with systemctl start ModemManager and systemctl enable ModemManager. As soon as they are started the Mobile Broadband option will be available from the Network Manager Applet.
 +
 
 +
Make sure {{Pkg|mobile-broadband-provider-info}} and {{Pkg|nm-connection-editor}} are installed.
 +
 
 +
To use this quite old modem, you need to blacklist qmi_wwan and cdc_wdm modules from loading into [modern] Linux kernel. Else, if these modules are loaded, ModemManager recognizes this modem as something new with QMI interface, and then complains about too small versions of some QMI services. [https://bugs.freedesktop.org/show_bug.cgi?id=93392 Source]
 +
 
 +
== Connection ==
  
 
=== wvdial ===
 
=== wvdial ===
:''See main article: [[wvdial]]''
+
 
 +
''See main article: [[wvdial]]''
  
 
The general procedure is to switch the device into modem mode, make sure the ttyUSB device(s) are recognized by the qcserial kernel module, and then to run wvdial to dial, connect and start pppd.
 
The general procedure is to switch the device into modem mode, make sure the ttyUSB device(s) are recognized by the qcserial kernel module, and then to run wvdial to dial, connect and start pppd.
  
Install wvdial
+
Install {{Pkg|wvdial}}. The configuration file {{ic|/etc/wvdial.conf}} will in general depend on (a) which device you have (b) which mobile network you are connecting to. A single wvdial.conf file can be defined with named sections to be usable with several USB modems and networks, should you need them.
# pacman -S wvdial
+
The configuration file /etc/wvdial.conf will in general depend on (a) which device you have (b) which mobile network you are connecting to. A single wvdial.conf file can be defined with named sections to be usable with several USB modems and networks, should you need them.
+
  
Run (as root)
+
Run:
 
  # wvdialconf
 
  # wvdialconf
which will attempt to write /etc/wvdial.conf correctly. You will need to add the user, password and Access Point Name (APN). You can obtain these (i) from your network provider,
+
which will attempt to write {{ic|/etc/wvdial.conf}} correctly. You will need to add the user, password and Access Point Name (APN). You can obtain these (i) from your network provider,
 
(ii) from other users via published wvdial.confs, or (iii) by logging the USB tty traffic under another operating system (Sysinternals' Portmon).
 
(ii) from other users via published wvdial.confs, or (iii) by logging the USB tty traffic under another operating system (Sysinternals' Portmon).
  
My /etc/wvdial.conf looks like this:
+
My {{ic|/etc/wvdial.conf}} looks like this:
  
<pre>
+
[Dialer status]
[Dialer status]
+
Init1 = AT+CPIN?
Init1 = AT+CPIN?
+
Init2 = ATI
Init2 = ATI
+
Modem = /dev/ttyUSB1
Modem = /dev/ttyUSB1
+
 +
[Dialer pin]
 +
Modem = /dev/ttyUSB1
 +
Init1 = AT+CPIN=1234
 +
 +
[Dialer wwan]
 +
Init1 = ATZ
 +
Init2 = AT+CGDCONT=1,"IP","data.apn.com"
 +
Stupid Mode = yes
 +
Phone = *99***1#
 +
New PPPD = yes
 +
Modem = /dev/ttyUSB1
 +
Username = XXXXXX
 +
Dial Command = ATDT
 +
Password = XXXXXX
 +
Baud = 460800
  
[Dialer pin]
+
To simplify the procedure, I took my SIM card out and disabled the PIN so I do not have to run "wvdial pin" before connecting to the internet.
Modem = /dev/ttyUSB1
+
Init1 = AT+CPIN=1234
+
  
[Dialer wwan]
+
Often there will be several devices (at {{ic|/dev/ttyUSB0}}, {{ic|/dev/ttyUSB1}}, {{ic|/dev/ttyUSB2}} for example). If in doubt about which to use, try each of them in turn. Once the configuration files are prepared, the internet connection is established by running
Init1 = ATZ
+
Init2 = AT+CGDCONT=1,"IP","data.apn.com"
+
Stupid Mode = yes
+
Phone = *99***1#
+
New PPPD = yes
+
Modem = /dev/ttyUSB1
+
Username = XXXXXX
+
Dial Command = ATDT
+
Password = XXXXXX
+
Baud = 460800
+
</pre>
+
 
+
To simplify the procedure, I took my SIM card out and disabled the PIN so I don't have to run "wvdial pin" before connecting to the internet.
+
 
+
Often there will be several devices (at /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 for example). If in doubt about which to use, try each of them in turn. Once the configuration files are prepared, the internet connection is established by running
+
  
 
  $ wvdial <section>
 
  $ wvdial <section>
Line 76: Line 88:
 
The final wvdial command should start pppd and the obained IP address should be visible in the terminal output. At that point the internet connection should be live, which can be easily checked with a web browser or by pinging an external IP address.
 
The final wvdial command should start pppd and the obained IP address should be visible in the terminal output. At that point the internet connection should be live, which can be easily checked with a web browser or by pinging an external IP address.
  
==Related Articles==
+
== See also ==
[[USB 3G Modem]]<br>
+
 
[[Huawei E220]]<br>
+
* [[USB 3G Modem]]
[[Allow users to dial with wvdial]]<br>
+
* [[Huawei E220]]
[[Idea_netsetter(Huawei_EG162G)]]<br>
+
* [[Allow users to dial with wvdial]]
[[ZTE MF636]]<br>
+
* [[Idea netsetter(Huawei EG162G)]]
[[Internet key Momo Design]]<br>
+
* [[ZTE MF636]]
[[Dialup_without_a_dialer_HOWTO]]<br>
+
* [[Dialup without a dialer HOWTO]]
[[3G and GPRS modems with pppd alone]]<br>
+
* [[3G and GPRS modems with pppd alone]]
[[Huawei E1550 3G modem]]
+
* [[Huawei E1550 3G modem]]

Latest revision as of 18:59, 14 February 2016

This is a short tutorial on connecting to the internet using your gobi modem.

Device identification

Install usbutils and then examine the output of

$ lsusb

which will show the vendor and product IDs of the device.

For example, my HP un2430 modem:

Bus 001 Device 005: ID 03f0:371d Hewlett-Packard 

As of linux-3.1.1-1 the device is detected by the qcserial module, if not, you are going to have to recompile the qcserial module with your added product and vendor id.

Alternatively you can add the Product and Vendor ID by writing them into the new_id file (best both at the same time because most Gobi modules switch the Product ID when the Firmware is loaded). Here the Shell Commands i had to use (in a root shell, sudo does not work in this case for some reason): my integrated Gobi2K has the Vendor ID 04da and the Product IDs 250e (waiting for Firmware) and 250f (firmware loaded)

echo "04da 250e" > /sys/bus/usb-serial/drivers/qcserial/new_id
echo "04da 250f" > /sys/bus/usb-serial/drivers/qcserial/new_id

note that this has to be repeated when you reload the qcserial module or reboot/shutdown.

gobi_loader

"gobi_loader is a firmware loader for Qualcomm Gobi USB chipsets. These devices appear in an uninitialised state when power is applied and require firmware to be loaded before they can be used as modems. gobi_loader adds a udev rule that will trigger loading of the firmware and make the modem usable." (http://www.codon.org.uk/~mjg59/gobi_loader/)

Install gobi-loaderAUR and gobi-firmwareAUR from AUR.

After installation, you should enter your product and vendor id in the /lib/udev/rules.d/60-gobi.rules

Then a simple reload of the qcserial module:

# rmmod qcserial
# modprobe qcserial

Manage Connection in Network Manager

ModemManager is required for network manager to detect any mobile broadband devices.

This needs to be enabled with systemctl start ModemManager and systemctl enable ModemManager. As soon as they are started the Mobile Broadband option will be available from the Network Manager Applet.

Make sure mobile-broadband-provider-info and nm-connection-editor are installed.

To use this quite old modem, you need to blacklist qmi_wwan and cdc_wdm modules from loading into [modern] Linux kernel. Else, if these modules are loaded, ModemManager recognizes this modem as something new with QMI interface, and then complains about too small versions of some QMI services. Source

Connection

wvdial

See main article: wvdial

The general procedure is to switch the device into modem mode, make sure the ttyUSB device(s) are recognized by the qcserial kernel module, and then to run wvdial to dial, connect and start pppd.

Install wvdial. The configuration file /etc/wvdial.conf will in general depend on (a) which device you have (b) which mobile network you are connecting to. A single wvdial.conf file can be defined with named sections to be usable with several USB modems and networks, should you need them.

Run:

# wvdialconf

which will attempt to write /etc/wvdial.conf correctly. You will need to add the user, password and Access Point Name (APN). You can obtain these (i) from your network provider, (ii) from other users via published wvdial.confs, or (iii) by logging the USB tty traffic under another operating system (Sysinternals' Portmon).

My /etc/wvdial.conf looks like this:

[Dialer status]
Init1 = AT+CPIN?
Init2 = ATI
Modem = /dev/ttyUSB1

[Dialer pin]
Modem = /dev/ttyUSB1
Init1 = AT+CPIN=1234

[Dialer wwan]
Init1 = ATZ
Init2 = AT+CGDCONT=1,"IP","data.apn.com"
Stupid Mode = yes
Phone = *99***1#
New PPPD = yes
Modem = /dev/ttyUSB1
Username = XXXXXX
Dial Command = ATDT
Password = XXXXXX
Baud = 460800

To simplify the procedure, I took my SIM card out and disabled the PIN so I do not have to run "wvdial pin" before connecting to the internet.

Often there will be several devices (at /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 for example). If in doubt about which to use, try each of them in turn. Once the configuration files are prepared, the internet connection is established by running

$ wvdial <section>

The final wvdial command should start pppd and the obained IP address should be visible in the terminal output. At that point the internet connection should be live, which can be easily checked with a web browser or by pinging an external IP address.

See also