Difference between revisions of "Huawei E1550 3G modem"

From ArchWiki
Jump to: navigation, search
(AT commands)
(AT commands)
Line 52: Line 52:
 
Answer decoding (this example is balance response: 151.25):
 
Answer decoding (this example is balance response: 151.25):
 
   perl -e 'print pack("H*", "003100350031002C003200350020044004430431002E0020");'
 
   perl -e 'print pack("H*", "003100350031002C003200350020044004430431002E0020");'
 +
* AT+CSQ - get signal quality (AT+CSQ=?)
 +
* AT+GMI - get manufacturer
 +
* AT+GMM - get model
 +
* AT+GMR - get revision
 +
* AT+COPS? - get operator info
  
 
== References ==
 
== References ==
 
* [[USB_3G_Modem]]
 
* [[USB_3G_Modem]]
 
* [[Huawei_E220]]
 
* [[Huawei_E220]]

Revision as of 17:15, 7 June 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Introduction

This article describes how to configure Huawey E220 and E1550 3G modems.

This modem is generic modem device, but there are two kludges:

  • you need to switch it into modem mode
  • you need to load proper driver (usbserial)

Prepare device

Switch into modem mode

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

To switch modem on you shoud run

 /lib/udev/modem-modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd

command. (See also usb_modeswitch package in AUR)

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

 SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/lib/udev/modem-modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd"

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

Driver loading

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

 modprobe usbserial vendor=0x12d1 product=0x1003

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

 options usbserial vendor=0x12d1 product=0x1003

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

Connecting internet

Now you have new 2 or 3 /dev/ttyUSB* 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.

AT commands

There are some usefull commands:

  • AT^U2DIAG=0 - the device is only Modem
  • AT^U2DIAG=1 - device is in modem mode + CD ROM
  • AT^U2DIAG=255 - the device in modem mode + CD ROM + Card Reader
  • AT^U2DIAG=256 - the device in modem mode + Card Reader
  • AT+CPIN=<PIN-CODE> - enter PIN-code
  • AT+CUSD=1,<PDU-encoded-USSD-code>,15 - USSD request, result can be found (probably) in /dev/ttyUSB2.

Encode "*100#" to PDU format:

 perl -e '@a=split(//,unpack("b*","*100#")); for ($i=7; $i < $#a; $i+=8) { $a[$i]="" } print uc(unpack("H*", pack("b*", join("", @a))))."\n"'

Decode "AA180C3602" from PDU format:

 perl -e '@a=split(//,unpack("b*", pack("H*","AA180C3602"))); for ($i=6; $i < $#a; $i+=7) {$a[$i].="0" } print pack("b*", join("", @a)).""'

Answer decoding (this example is balance response: 151.25):

 perl -e 'print pack("H*", "003100350031002C003200350020044004430431002E0020");'
  • AT+CSQ - get signal quality (AT+CSQ=?)
  • AT+GMI - get manufacturer
  • AT+GMM - get model
  • AT+GMR - get revision
  • AT+COPS? - get operator info

References