stephilix



Saturday, May 05, 2012

SFR 3G+ USB key configuration for Linux

Check the model number on the key, under its cover. This one says E173s-2.

The key has 2 modes: a mass storage and a modem. Once plugged in, it needs to be switched 
from the first to the second using usb-modeswitch.

usb-modeswitch
usb-modeswitch-data

Edit /usr/share/usb_modeswitch/12d1:1c0b with the following contents:

# Huawei E173s

DefaultVendor= 0x12d1 
DefaultProduct= 0x1c0b 

TargetVendor= 0x12d1 
TargetProduct= 0x1c05 

CheckSuccess=20 

MessageEndpoint= 0x0f 
MessageContent= "55534243123456780000000000000011062000000100000000000000000000" 


Edit /lib/udev/rules.d/40-usb_modeswitch.rules (or /etc/udev/rules.d/40-usb_modeswitch.rules) with the following contents:

# Huawei E173s 
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="usb_modeswitch '%b/%k'"


Plug the device.
Run lsusb
There should be a line like:
Bus 001 Device 018: ID 12d1:1c0b Huawei Technologies Co., Ltd. 

Run
usb_modeswitch -c /usr/share/usb_modeswitch/12d1:1c0b

Run lsusb
The line should now be:
Bus 001 Device 018: ID 12d1:1c05 Huawei Technologies Co., Ltd. 

Run
modprobe usbserial vendor=0x12d1 product=0x1c05
ls -l /dev/ttyUSB*

You should see:
USB0, USB1, USB2

Go to System / Preferences / Network connections
Mobile Broadband
Add
HUAWEI HUAWEI Mobile should appear as one of the possible device for this connection.
Select Country / Provider
Web / Prepaid

Upon restarting your system, unplug/replug device and disconnect from other network connections.