Commentary by Wes

Ramblings about programming, chess, languages, etc.

Using an ATT Beam (AirCard 340U Sierra Wireless) on a Raspberry Pi

| Comments

I spent quite a while tinkering with my new raspberry pi to get the USB modem working, so I figured I would publicly document to save someone else the time. Or myself, in case I manage to brick my pi.

First, some specifics:

  • Raspberry Pi model B
  • Raspbian 2014-01-07 release, running 3.10.25+ kernel
  • ATT Beam AKA Netgear AirCard 340U Sierra Wireless

I was kind of shocked to find that Netgear provided linux drivers and a word document (I can picture a linux programmer writing a word document) for instructions involving the GobiNet and GobiSerial kernel modules. They also provide a firmware update that you can run from windows in order to disable the Windows 8 support that causes it to not work in linux. See their page here.

Unfortunately, the version of the GobiSerial module they provided caused a kernel oops. Eventually I stumbled upon a github repo with newer code, and gave it a try, and magically… everything worked!

I learned some things about how the kernel and firmware releases are tied together on the raspberrypi/linux and raspberrypi/firmware github repos. The uname in the OS release matches with the uname in the firmware/extra/uname_string file. So check your uname -rv output and look at the history of the uname_string file in github. The git commit hash of the linux repository is the hash from the firmware/extra/git_hash file, so once you find the uname that matches yours, check the git_hash from the same file–this is the commit you want to fetch from the raspberrypi/linux repo.

So, update your firmware in windows 7, using the download from the netgear site above.

This will download a fair bit of stuff. The best optimization I found was to use –depth to limit how far back to go.

1
2
3
4
5
6
7
8
9
10
11
cd ~
git clone https://github.com/raspberrypi/linux.git --depth 300
cd linux
# Note, unless you're using 3.10.25+, replace the git hash below with the git_hash found above
git checkout 16eb921a96db3dc3555a65b53b99c15753e6b770
sudo ln -s `pwd` /lib/modules/3.10.25+/build
make mrproper
gzip -dc /proc/config.gz > .config
make modules_prepare
# the git hash in the URL below is the commit found in raspberrypi/firmware matching your uname -rv
wget https://raw.githubusercontent.com/raspberrypi/firmware/3a4ba0c3964f8f0ecc2dd46246a83258d9e4046d/extra/Module.symvers

Now you should have the correct kernel code to build against, and the right Module.symvers file. Next we get the Gobi modules. First GobiSerial. Thank you https://twitter.com/casastorta for the update so it doesn’t kernel panic!

1
2
3
4
cd ~
git clone https://github.com/casastorta/gobiserial.git
cd gobiserial/GobiSerial
sudo make install

Next the GobiNet module. Since I couldn’t find a convenient download I pushed it to my own repo. It is also available from the Netgear page linked above.

1
2
3
4
cd ~
git clone https://github.com/wfreeman/GobiNet.git
cd GobiNet
sudo make install

For me, at this point, I was able to reboot and see eth1 show up:

1
2
3
4
5
6
7
8
9
10
11
12
[   20.706852] usb 1-1.2: New USB device found, idVendor=1199, idProduct=9051
[   20.722904] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   20.748997] usb 1-1.2: Product: AirCard 340U
[   20.755012] usb 1-1.2: Manufacturer: Sierra Wireless, Incorporated
[   20.779391] usb 1-1.2: SerialNumber: 013323000746157
[   20.811492] usb-storage 1-1.2:1.9: USB Mass Storage device detected
[   20.838360] scsi1 : usb-storage 1-1.2:1.9
[   21.075651] GobiNet: 2013-10-08/NTGR_2.21
[   21.110858] GobiNet 1-1.2:1.8 eth1: register 'GobiNet' at usb-bcm2708_usb-1.2, GobiNet Ethernet Device, 3a:dd:51:23:a9:31
[   21.855131] scsi 1:0:0:0: Direct-Access     Aircard  Disk Drive       1.00 PQ: 0 ANSI: 2
[   21.861275] sd 1:0:0:0: [sda] Attached SCSI removable disk
[   22.549628] creating qcqmi1

If you do get a kernel panic, like I did before finding the updated drivers, try booting up without the USB modem plugged in. Then you can try to repair the module.

In order to get it to automatically connect when it gets plugged in, I added a couple of lines to my /etc/network/interfaces :

1
2
allow-hotplug eth1
iface eth1 inet dhcp

By the way, it seems to want to reboot when I plug it in. Maybe it’s something to do with the power draw, so hopefully it won’t happen when I get a real power source (using USB right now).

That’s the end. It seems much shorter after writing it down.

Comments