skip to main |
skip to sidebar
Vodafone Huawei 3G and Linux
- Tested on Crunchbang Linux
- sakis3g
was working after connecting the vodem in a Virtualbox windows
machine. This was a pain so I finally got the fix to auto switch when
inserted. here it is....
- check usb_modeswitch and usb_modeswitch_data is installed
- cd /usr/share/usb_modeswitch/
- sudo gunzip configPack.tar.gz
- sudo tar xf configPack.tar
- sudo cp 12d1:1523 12d1:1526
- edit 12d1:1526 to reflect
- Insert the stick and run lsusb to get the product and vendor details...
- /etc/udev/rules.d/15-huawei-e1550.rules file (any filename is OK)
- SUBSYSTEM=="usb",
- SYSFS{idProduct}=="1526",
- SYSFS{idVendor}=="12d1",
- RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1526 -W -I -c /usr/share/usb_modeswitch/12d1:1526"
- edit connections
- Mobile Broadband
- add
- Name: Vodem
- Number *99#
- apn www.vodafone.net.nz
- insert device
- check lsusb is switched
- initially lsusb will report unswitched device
- Bus 002 Device 014: ID 12d1:1526 Huawei Technologies Co., Ltd.
- then the rules will kick in and switch after about 10 seconds:
- Bus 002 Device 013: ID 12d1:14cf Huawei Technologies Co., Ltd.
- connect via network connect icon
- remove device when finished
- Script to perform the connection
- ###To automatically repeat result of last action, use following command line:
while true;do
if lsusb |grep Huawei >/dev/null;then
echo found Huawei
break
fi
echo Waiting for device Huawei
sleep 1
done
##SUBSYSTEM=="usb",
##SYSFS{idProduct}=="1526",
##SYSFS{idVendor}=="12d1",
id
echo Performing switch
/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1526 -W -I -c /usr/share/usb_modeswitch/12d1:1526
lsusb |grep Huawei
while true;do
if lsusb |grep 12d1:14cf >/dev/null;then
echo switch complete
break
fi
echo Waiting for device switch
sleep 1
done
echo Connecting....
/home/dunc3/sakis3g \
connect \
--nostorage \
APN="www.vodafone.net.nz" \
APN_USER="user" \
APN_PASS="pass" \
USBINTERFACE="0" \
USBDRIVER="option" \
USBMODEM="12d1:14cf" \
OTHER="USBMODEM" \
MODEM="OTHER" \
DISPLAY=":0"