Sunday, September 13, 2009

AnyDATA ADU-510L CDMA modem settings for Linux

I wrote this tutorial with instructions in English, because not only the Romtelecom subscribers use the AnyDATA ADU-510L high speed CDMA modem. AnyDATA ships their modems worldwide, so that feel free to use my advices wherever you are.

I use an Ubuntu 8.04 distribution because it is a LTS - long term support version of Ubuntu, so that one can feel confident that it is here to stay for years to come :).

If you use any newer Ubuntu distribution, chances are that you will succeed to make the internet connection, too.

Before starting, make sure that you downloaded and installed the packages mentioned in my other post too.

Copy this article in a text file onto your Linux computer, so you can proceed step by step even if you are not connected to internet anymore.

Let's go....

I assume you installed usb_modeswitch where I did, too ( I created an invisible folder called .apps into my main user's folder ). If not, you will put there your own location (but preferably NOT on the desktop).

Open a terminal ( you find it at Applications >> Accesories >> Terminal ) and run :

lsusb

you will see a list, and there appears the usb storage device ( ID 05c6:1000 Qualcomm, Inc.)

cd /home/myusername/.apps/usb_modeswitch-1.0.5

writing instead of "username" your real username there.

this moves you to the folder where is located the file usb_modeswitch-1.0.5

sudo ./usb_modeswitch -v 05c6 -p 1000 -M 5553424312345678000000000000061b000000020000000000000000000000 -m 0x08

( please note that the command above is a SINGLE LINE command line, even if it has spaces between the strings !! use Copy >> Paste so that you don't make mistakes when writing it in terminal )

Insert your password when asked, then press Enter.

This will give you the following message in terminal :

Quote :

Looking for default devices ...
Found default devices (1)
Accessing device 003 on bus 001 ...
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
Vendor String: AnyDATA
Model String: CD-ROM
Revision String: 1.00
-------------------------

Device description data (identification)
-------------------------
Manufacturer: AnyDATA Corporation
Product: USB MMC Storage
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x08 ...
OK, message successfully sent
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
End quote .

(This means that now the device does not act anymore as storage device. We must to change its operation mode into a serial device.)

sudo modprobe usbserial vendor=0x16d5 product=0x6502

Now let's check again how is seen the device :

lsusb

You will see again a list, and there appear the previous usb storage device, but this time it has a different ID
( ID 16d5:6502 )

Let's check how is registered the device :

dmesg

if the answer is like this one bellow, then everything is fine.

Quote :


[ 548.781761] usb-storage: device found at 4
[ 548.781766] usb-storage: waiting for device to settle before scanning
[ 548.820652] usbcore: registered new interface driver usbserial
[ 548.820872] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[ 548.821105] usbcore: registered new interface driver usbserial_generic
[ 548.821109] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial Driver core
[ 548.827207] /build/buildd/linux-2.6.24/drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
[ 548.827507] option 1-2:1.0: GSM modem (1-port) converter detected
[ 548.827787] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 548.827965] option 1-2:1.1: GSM modem (1-port) converter detected
[ 548.828208] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 548.828383] option 1-2:1.2: GSM modem (1-port) converter detected
[ 548.828639] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[ 548.828809] usbcore: registered new interface driver option
[ 548.828813] /build/buildd/linux-2.6.24/drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1
End quote .

This means that the device was registered as modem in USB port, and it act as "option" type device, not just simply as some "generic" device.

================= =================

Note : If you see mentioned there only "usbserial_generic" (without "option"), then you must activate the "option" mode of driver with this command :

sudo modprobe -v option

then run again :

dmesg

to check again if "option" mode is activated, as explained above. (end note)

================= =================

Most often this situation mentioned in the Note above ( of installation in "generic" mode ) happens only first time (when you insert and configure first time the device in your computer), when "option" driver is loaded through "modprobe" command.

From now on, you can ignore it (the modem will be configured each time with "option"), so you can proceed to next step : to open the internet connection using gnome-ppp.

And YES, you must switch the device each time you insert it in USB port. (So save this article in your computer and keep it at hand for when you need it next time.)

After you unplug the modem, when you plug it again, it will be seen again as usb-storage, so you must repeat the procedure above (to switch it from "storage" to "modem" device)

@@@@@@@@@@@@@@@@@@@@@@@@@@

How we do connect to internet ?

Very simple :

open the Gnome PPP and use the following settings :

user - given to you by internet provider
password - also, take it from internet provider
number #777 ( or what else is received from your internet provider )

Modem settings (I use them and they work just fine) :

/dev/ttyUSB0 (you must press "Detect" button to access the modem through USB)
USB Modem (obviously !!)
3100000 (write by yourself in that field, and ignore any list of other values from there :) ... )
Tone
Low
10 (or anything you like, better is to be anything more than 5)

Networking :

Dynamic IP
Automatic DNS

Options :

Minimize
Dock

Ignore terminal strings
180

( leave unchecked any other settings there - or you can try at your own risk if you wish, or depending of your own internet provider )
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

That's it !!

Oh, now just press "Connect", and you're online :)

( I posted this blog from my mobile internet connection set as above .)

7 comments:

  1. Do not work on mandriva all flavors

    http://forum.mandriva.com/viewtopic.php?p=732500#732500

    ReplyDelete
  2. On mandriva, you not need to use wvdial. Try to use kppp instead, as I used here gnome-ppp.

    I am not sure if you couldn't use gnome-ppp as well (I never worked with mandriva before).

    There is a program called "udev", your flavor might have it already installed in it.

    It helps to identity devices on your system.

    http://www.gentoo.org/doc/en/udev-guide.xml

    This must be installed BEFORE trying to switch the device ( first come recognition of device - by udev, then only after that it is needed the switch from "storage" toward "serial" device.

    ReplyDelete
  3. I tried to post more on this comments but i cannot - i recieve the error - wrong characters or so - i do not remember exactly..

    However i can use gnome-ppp as well (gnome-ppp is a frontend for wvdial - so... )
    I still not resolve the problem yet - now i am searching to google all infos about ADU 510L
    One problrm i see and i work on it now - The MDV kernel has no module usb_serial installed and someone said this modem connect to usb-serial.

    Now i try to "patch" the module in kernel - i hope i will be not in need to compile the whole kernel.

    I keep you in touch

    Thanks for the answer

    ReplyDelete
  4. My system is a derivative of Debian Sid (sidux with kernel: 2.6.34-0.dmz.5-liquorix-686). Sid depositories now have usb-modeswitch version 1.1.2alpha which should support AnyDATA ADU-510L. Therefore manual compilation (and the hassle of maintaining its dependencies on a non-LTS system) should no longer be necessary.

    However, although the settings for each supported modem are located in a separate file in the directory /etc/usb_modeswitch.d/, when I tried to run the command /usr/sbin/usb_modeswitch I got an error message saying the program could not find /etc/usb_modeswitch.setup (the script located at /lib/dev/ exited silently).

    My quick and dirty solution has been to download the setup file directly from http://www.draisberghof.de/usb_modeswitch/ and to uncomment the lines for the setup of my modem.

    Runnig again usb_modeswitch resulted in the successful switch of the modem and I could connect to the internet using wvdialconf and adding my login data (password, username, phone number) in /etc/wvdial.conf in the pre-assigned lines.

    I suspect kppp would have worked just as well. I did not use it because it could not automatically identify the location of the modem, which occasionally changed from /dev/ttyUSB2 to /dev/ttyUSB0 for no apparent reason.

    I still have one big problem. If the stick is plugged in at boot, it gets automatically switched to modem. If I plug it in later, something hang: usb-devices and lsusb hang while working on the stick and I cannot stop the latter without removing the stick from the slot. Same thing happens to usb_modeswitch

    Besides not-complying with your recommendations, is there anything wrong I have done?

    ReplyDelete
  5. I expect your good news. I think also that future kernel updates might be of help for you, too.

    I would be glad if you post here your workarounds, even if they are for mandriva.

    Thank you.

    ReplyDelete
  6. @Radu.

    You are actually very lucky to have switched the device automatically at boot if it is inserted in your computer. Most of the users are not so lucky. We have to do this switch manually, each time, because we have to start the program that recognizes the device (list it with "lsusb" command then everything else described in this blog), while in your situation the system does that at start (because at start it scan all usb ports and devices connected there). I could say that this is the most happy situation to happen. As you know, Linux is a very stable environment (and I wouldn't like very much even to have it scanning and installing by itself any kind of usb device - except of memory stick). Of course, it is not very convenient to not have recognized at once the 3G modem, but the main mistake maybe resides in the fact itself that this modem has 2 modes of working instead of just one. What was designed as a facility (to carry inside it and auto-install the Windows drivers, now proves to be a headache for the Linux users that use it.

    ReplyDelete
  7. I am trying to use G-link usb modem for internet. I followed all those things but nothing happened. My usb port comes ttyS0 instead of ttyUSB0

    ReplyDelete