Friday, September 11, 2009

How to install a CDMA modem in Ubuntu

Let's explain here how to install a HIGH SPEED CDMA modem in Linux.

I use the AnyDATA device, model ADU-510L, but a lot of USB modems can use the same procedure as well.

http://www.anydata.co.kr -> they don't offer any support for Linux distribution, so forget about using manufacturer website.

Instead, try this step by step approach:

Click Places > Home folder, then File > Create folder > .apps, so you just create a new invisible folder here, called .apps (it is invisible because the name ".apps" instead of "apps" .

Its role is to store there for you packages for programs that aren't in repositories yet while still keeping them at hand (for example I put there the firefox 3.5.x packages - because Ubuntu Hardy still does not offer any way to install it through Synaptic or Add/Remove feature because it is not yet added/maintained by Ubuntu community in the repositories, also I keep there AlsaUpgrade newest versions, or usb_modeswitch, etc.)


Let's go on further.

There are two ways to get the job done, one is using some .deb package (maybe a little easier but not so safe) and another one is a do-it-yourself way.

First one needs that you go at Debian repositories page here :

http://packages.debian.org/search?keywords=usb-modeswitch

if you want to download the .deb version of the program called usb-modeswitch that changes the mode usb-storage into usbserial of the AnyDATA device.

You will find there ( as of now ) 2 packages : "squeeze (testing)" and "sid (unstable)".

We could use the testing one (called squeeze), taken from this page :

http://packages.debian.org/squeeze/usb-modeswitch


You can download it and install it in your computer using GDebi Package installer.

However, you must take care that the debian version is 1.0.2 instead of 1.0.5. ( latest one ). The main differences are seen here  :

=========
Version 1.0.5, 2009/08/26
More changes and fixes regarding success check; "--version" option; config "database" updated
Version 1.0.4, 2009/08/23
    Success check bugs (and others) fixed
Version 1.0.3, 2009/08/20
Success check improved; experimental system integration (fully automated), optional; new parameter "TargetProductList" needed for this; other necessary small adaptations; more devices
Version 1.0.2, 2009/06/09
    Some output bugs fixed

(source : http://www.draisberghof.de/usb_modeswitch/index.html#download)
=========

For those of you that want to use the latest version (this is the second way) :

- download the latest version from here http://www.draisberghof.de/usb_modeswitch/index.html#download , which is 1.0.5 ( or any newer one )

- create a new folder in your "home folder" folder, preferably a hidden one, called .apps, where you can store in the future any non-standard applications folders ready to install. ( I already explained you above how to do that. )

- move inside that folder the archived file usb_modeswitch-1.0.5.tar.bz2

- go inside that folder and unpack that archive with Archive Manager . It will create a folder called usb_modeswitch-1.0.5 so that you can now delete the downloaded file and work only with the folder newly created.

- download also this file http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.conf and copy it inside that same folder above. It will replace the older one (the file from extracted archive is a slightly older than this one).

Run

- System > Administration > Synaptic > ( password ) > Search > libusd (Search in "Name") > mark "libusb-dev" for installation > Apply --> that will install libusb-dev which is requested for compiling the files needed for instalation of usb-modeswitch in your Linux computer.

------------------ few technical details of the AnyDATA ADU-510L ----- those needs to be seen into the configuration file:

DefaultVendor=  0x05c6
DefaultProduct= 0x1000

TargetVendor=   0x16d5
TargetProduct=  0x6502

Also, only for reference and 0.x versions :

MessageEndpoint=0x08

MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
---------------------------------------------------------------------------------------------------------------------

(Similar to those above, the usb_modeswitch.conf file has the specific lines for each CDMA modem on the market now. I just have AnyDATA ADU-510L, that's why I mentioned it here. We will need again very soon this info. )

Open a Terminal and write :

cd /home/your-username/.apps/usb_modeswitch-1.0.5

(of course, "your-username" word has to be replaced with YOUR USERNAME there )


sudo make install

then

sudo gedit /etc/usb_modeswitch.conf

( read inside the file usb_modeswitch.conf opened with gedit and delete the ";" signs before DefaultVendor and Product and also TargetVendor and Product and Messages ( as above ), only these 6 lines corresponding to your own modem )

sudo sh ./usb_modeswitch -> it is possible to give some answer "wrong ")" syntax" or alike. ignore it.

dmesg => this will give you a full list of lines, last ones having "full speed USB device" which is ok.

now execute :

sudo modprobe usbserial vendor=0x16d5 product=0x6502 -----> this must load the drivers of the modem, which can be checked running again

dmesg

The modem is set.


Usually, if registering is successful, it reads :

"usbcore: registered new interface driver option" which means that modem is set NOT as "generic", but as it should be actually.

and then "USB Driver for GSM modems" ( in a line similar to this one : /build/buildd/linux-2.6.24/drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1 )

This is it.

Modem is installed and set as it should be.

-------

If something goes wrong, please check carefully this page : http://www.draisberghof.de/usb_modeswitch/index.html#trouble

It has all explanations of what can be done ( hopefully you won't need it !! )

( I will write here soon also the messages from terminal and how to connect successfully to the internet ). I also will post here the safest way to succeed the switch (sometimes it does not succeed and modem has to be unplugged and plugged again).

No comments:

Post a Comment