Huawei E1550 3G modem

This article describes how to configure Huawei E1550 3G modems.

Preparing device

This modem is a generic device, but there are two caveats:

Switching into modem mode

By default kernel recognizes it as usb-storage device (SCSI CD-ROM). It is true, because of this modem contains MicroSD card (up to 4Gb) reader and internal flash.

To turn on modem you should run

$ /lib/udev/usb_modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd

command.

See also the usb_modeswitch package, which you may need in future since in udev-157 modem-modeswitch has been renamed and changed as described in the commit. This package does not need any modifications, just install it.

Also you can create udev's config: /etc/udev/rules.d/15-huawei-e1550.rules

/etc/udev/rules.d/15-huawei-e1550.rules
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="/lib/udev/usb_modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd"

After that, modem changes its USB IDs to 12d1:140c and /proc/bus/usb/devices shows new USB endpoints.

Loading the driver

usbserial is proper driver for this modem, but probably it does not recognize it, so you should force it, passing USB IDs.

# modprobe usbserial vendor=0x12d1 product=0x140c

or put options into /etc/modprobe.d/modprobe.conf

/etc/modprobe.d/modprobe.conf
...
options usbserial vendor=0x12d1 product=0x140c
...

(do not forget to rmmod usbserial if it is already loaded before)

Naming the device (optional)

You can generate symlinks to the ttyUSB* ports for a more human readable configuration with udev rules.

For a Huawei device which identifies with the USB ID 12D1:1001 after modeswitching and has 3 serial ports:

 SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1001*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="00", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyUSB_utps_modem"
 SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1001*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="01", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyUSB_utps_diag"
 SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1001*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="02", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyUSB_utps_pcui"

For a Huawei device which identifies with the USB ID 12D1:1003 after modeswitching and has 2 serial ports:

 SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1003*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="00", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyUSB_utps_modem"
 SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1003*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="01", ATTRS{bInterfaceProtocol}=="ff", SYMLINK+="ttyUSB_utps_pcui"

Connecting to the network

Now you have new 2 or 3 devices.Most likely first of them (ttyUSB0 if you had not such devices before) is PPP compatible modem. Use it as usual with pppd, kppp, gnome-ppp, network-manager, etc.

Using gammu

Use to access cell phones functionalities.

Edit

~/.gammurc
[gammu]
port=/dev/ttyUSB0
connection=at
name=huawei e1550
model=

you can also generate the config using

$ gammu-detect > ~/.gammurc 

Sending SMS:

$ gammu sendsms TEXT +7123456789 -text qwe

find device info:

$ gammu identify

for gui use or .

Using Gnome Calls and Chatty

Install and callsAUR to have basic GUI for calls and SMS. gnome-calls also supports using USSD codes in dialer.

USSD Requests

Use ussd.php tool.

gollark: Anyway, the generality of this solution and the fact that they'll probably keep the exact details private for "security"-through-obscurity reasons also means that, as I have written here (https://osmarks.net/osbill/) in a blog post tangentially mentioning it, someone could just feed it hashes for, say, anti-government memes and find out who is saving those.
gollark: Although I suppose that *someone* probably keeps the originals around in case they have to change the hashing algorithm.
gollark: It's trickier on images (see how PyroBot does it...) but not impossible. (since you want moderately fuzzy matching, unlike SHA256 and such, which will produce an entirely different hash if a single bit is flipped)
gollark: Through the magic of cryptography, you can condense arbitrarily big files down to a fixed-length fingerprint and check if that matches, with basically-zero false positive risk.
gollark: Hashes of it.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.