New User? Register here - Existing Users: Username: Password: [Advanced Login]

 

 

Current Poll

Your preferred Interactive shell?









( 1391 votes ~ 15 comments )

 

Weblog entry #11 for mcortese

Onda MT505UP
Posted by mcortese on Fri 13 Mar 2009 at 11:42
Tags: none.
I received a broadband wifi USB dongle provided by Italian telecom company TIM. The commercial name is Alice Mobile Broadband, the dongle is labeled ONDA MT505UP.

When you plug it into a Windows machine, it is seen as a disk containing the Windows drivers. After installing those drivers, it is seen as a HSDPA/UMTS/GPRS modem.

Of course, no Linux drivers or instructions are provided. When you plug it into your Linux box, it is seen as an USB storage and that's all. The telecom company's help desk simply said that Linux is not supported.

Of course "not supported" doesn't mean "not possible"! This is how to make it work.

First of all, download usb_modeswitch and put the executable in /sbin (I haven't tried the debianized package).

Create a new udev rule /etc/udev/rules.d/45-onda.rules:

# Udev rules for Onda MT505UP

# When seen as a storage, switch it:
SUBSYSTEM=="usb",SYSFS{idVendor}=="19d2",SYSFS{idProduct}=="2000", \
  RUN+="/sbin/usb_modeswitch -c /etc/usb_modeswitch_onda.conf"

# When seen as a modem, use it:
SUBSYSTEM=="usb",SYSFS{idVendor}=="19d2",SYSFS{idProduct}=="0002", \
  RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0002 maxSize=4096"
And this is /etc/usb_modeswitch_onda.conf:
########################################################
# ONDA MT505UP (most likely a ZTE model)
#
# Contributor: Alex Scortegagna

DefaultVendor=  0x19d2
DefaultProduct= 0x2000

TargetVendor=   0x19d2
TargetProduct=  0x0002

MessageEndpoint=0x03
MessageContent="55534243123456780000010080000a28000000001c00002000000000000000"

Run

# udevadm monitor
to see what's happening and plug the dongle.
  • udev recognizes it as a storage device (idProduct=0x2000)
  • udev obeys my rule and runs usb_modeswitch
  • usb_modeswitch makes the magic and the dongle switches to modem-mode
  • udev recognizes it as a modem (idProduct=0x0002)
  • udev obeys my rule and runs modprobe to load the usbserial kernel module
  • usbserial creates the /dev/ttyUSB* special files (please note that it's /dev/ttyUSB1 the one which works).
There may be a certain delay for the last steps while the dongle switches mode and udev recognizes it.

Test it with minicom: run

# minicom --setup
and select /dev/ttyUSB1 as serial port, then try some AT commands (e.g. ATI) to see if it is working.

Now, next problem: the SIM is locked with PIN, and the modem config strings provided with ppp etc. usually don't handle this situation. The solution is the little-known AT command +CPIN=xxxx to unlock the SIM.

The other AT commands to fill in the ppp configuration (the second line is provider-specific, this works for Alice by TIM):

Q0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CGDCONT=1,"ip","ibox.tim.it",,0,0
and finally the "number" to call is *99#

 

 

 

Flattr