Friday, 12 April 2013

Huawei E160 USB Modem

I need to be able to use a USB / 3G dongle to connect the Pi to network in remote location....  This post documents trying to get this working.

1. - Install usb_modeswitch as the dongle at first appears as a CD device.

sudo apt-get install usb-modeswitch

lsusb shows the modem:-

Bus 001 Device 074: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E230/E270/E870 HSDPA/HSUPA Modem

So, now I've unpacked the driver file in /usr/share/usb_modeswitch - Unsure yet where this is used, but pretty sure it needs to be unpacked from the archive therein.

pi@raspberrypi /usr/share/usb_modeswitch $ sudo tar zxvf configPack.tar.gz "12d1:1003"

Added the following into /etc/usb_modeswitch.conf

# choose one of these:


OK - So actually I don't think I needed the usb_modeswitch as I think it's built into 'sakis3g'.


(Also for SMS).

sudo pip install pyserial
Then try from the above page.  ( This worked on T-Mobile SIM - hurray.)

sudo apt-get install ppp

 T-mobile works on network manager under Ubuntu with :-
user web
pass web

I did get this working under sakis3g with / user=t-mobile / pass=..

I did get connected on the Pi with the dongle with O2 using Sakis, but only once.... Will try powered USB hub.  Having re-installed raspian, it keeps dropping out the modem.

./sakis3g connect FORCE_APN="" MODEM="OTHER" OTHER="USBMODEM" USBMODEM="12d1:1003" DIAL="*99#" LOGFILE="/home/pi/3G/sakis.log"

3/4/13 - My powered hub arrived - yay.  Testing again with the above command, and it seems to work for a few minutes at least. - Managed to install lynx, and then browse using that for some time over the modem.

OK - so I've been running for some time. - I cron'd a script which brings up the connection every hour, sends a mail and drops the connection - pretty much what I need it to do remotely. - All good.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.