Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
By petersum at 2006-05-25 18:20
This, and many other forums, are full of enquiries as to how to get a CDMA modem to work. So this is a mini Howto which I hope will help many of you.
This describes my experience of setting up a "ZTE" Fixed Wireless Phone for use on PTCL Wireless in Pakistan. It should be of use for any modem or modem/phone which uses the "Qualcomm CDMA Technologies MSN" modem.
For those who have just bought one of these phones and are itching to get started immediately, this phone works very well on the S.u.S.E. 9 Livecd. Just use YaST2 to set up the modem, then Kinternet to connect.
Now if S.u.S.E. can do it, why can't we set it up on ANY Linux system? That is just what we will try to do here.
OK, this involves many steps but is quite easy. You probably will have to download some RPM's so fire up the dreaded windowsXP if necessary! (The supplied ZTE win98 driver doesn't work!)
YOU MUST BE 'root'.
First step is to issue the command "dmesg" in Xterm/console to see if your USB controller(s) have been found and registered. Many Linux distributions have a nasty habit of NOT loading any usb modules unless something known to Linux is plugged into a usb port! If you are lucky, you will see your phone listed - if not, don't worry because either way, it isn't going to work yet! You must see something like: "USB hub found" and "2 ports detected". This doesn't guarantee that they are working though. Only if you see "usbcore: (something)" can you be sure that the usb system is workable.
Whatever, keep your fingers crossed and continue.
Next, go to /sbin and issue the command "modprobe cdc-acm" or "modprobe acm". (Names vary according to distribution and kernel version. If one reports "Not Found" try the other.) Run "dmesg" again to see the result. Hopefully, you will now see three lines or so describing a "USB ACM device". You should also see "ttyACM0" or something similar - this is your modem's location —> /dev/ttyACM0. Again this may vary according to the kernel version and a search of /dev/usb may find something.
Now, let us double check that all is OK with "cat /proc/modules" - cdc-acm or acm is there? If yes, then your phone is about to come alive.
What happens next depends on your distribution. Shutdown and restart. Check again "cat /proc/modules". If cdc-acm or acm is there, then your system has automagically added the module. If not, you will have to add it to /etc/modules.conf manually.
Restart again, and again, until this step has been completed successfully. If you haven't got this stage working, it will be a waste of time to continue.
We need "wvdial" for this modem/phone. I am using Alinux which is a one CD distribution. So lack of space on the CD means a lot of items are missing. If you have a monster distribution, then perhaps you have everything, but not necessarily the correct versions. Therefore I suggest that you start out fresh by downloading the latest versions of each required package. "wvdial" is very sensitive about the versions of its dependent packages.
I don't like compiling stuff so we'll get ready made RPM's from www.rpmfind.net or elsewhere. If a package doesn't exist specifically for your distribution then Mandrake packages seem to work well. (Yes, I know Mandrake has changed its name but rpmfind.net still identifies them that way!) OpenSuse packages work too when Mandrake is not available.
I would further suggest using "kpackage" so that you can easily check for "Unsatisfied Dependencies". This is IMPORTANT!!! Forcing a package to install without all the dependent packages will result in failure. You have been warned!
Right let us get started.
First we need xplc
I used xplc-0.3.12-1.i586.rpm
Next comes libwvstreams but this needs libdb-4.2.so and libpam.so.0
*This is probably way out of date by the time you read this, so check these dependencies carefully!
Look in /lib AND /usr/lib to see if you have these.
Finally wvdial itself. It requires libwvutils which is presumed to be part of libwvstreams?
Once again, I warn you - if these packages didn't install correctly, don't bother to continue.
Remove any other modems from your system or wvdial will find the "wrong" modem! Built-in modems (on your main-board) need to be disabled in the bios setup.
Setup wvdial with wvdialconf (after reading the man page please!)
It must reject all the COM port locations before it finally finds your usb modem/phone (hopefully).
Then goto /etc/ppp
Edit your pap-secrets and chap-secrets files. Both need one line containing:
username * password *
(Those are tabs - not spaces - between the items)
Check /etc/ppp/options to make sure it doesn't have anything silly in it! We will override this file anyway.
Check /etc/ppp/peers that it contains two wvdial files. You can change the "name" part in these files if desired to your connection name. If this directory doesn't exist, then wvdialconf wasn't run successfully!
Obviously change your phone number, username, password to suit your connection.
The connection name is after "Dialer" in the square brackets. Choose your own name.
That's it! Configuration is complete.
Some distributions have a damn silly pppd so you had better check it first.
Enter "pppd" in the Xterm/console and see what happens.
Any error message should tell you what to do. On my system, the daemon was running but it gave an error message saying that /dev/ppp didn't exist. OK, make it! Next restart and it didn't exist again!?! Put "mknod /dev/ppp c 108 0" at the end of rc.M in /etc/rc.d - fixed! If you're using sysV, figure out where to put it yourself.
If all is well with pppd, you will see garbage being printed out on your screen. Don't worry, it stops after a few lines. Garbage means it is working properly -duh!
OK! We are ready. Open Xterm and type "wvdial (connectionname)" , that is "wvdial ptcl" in my case.
Now you can either celebrate or go back and check your spelling! It should be working.
ctrl-c breaks the connection when you are finished.
The pppd options are guesswork. Probably multilink isn't supported and if the modem uses crtcts or not, I really don't know. However they don't break anything so I leave them there.
The baud rate is highly optimistic - 115200 is the actual connection speed from PTCL.
If it won't initialize your modem, remove any lock file from /var/lock and try again.
A word of warning! Make sure the phone does disconnect when you tell it to! Many times it remains connected even after shutting down the computer. Actually, in Pakistan, the electric supply company normally closes my computer!!! We don't get 24/7 electricity! Use the on/off switch on the phone if this happens.
There seems to be a rather short "no-activity" timer on PTCL so have your browser up and ready first, before connecting.
A strange point is that your username and password is not used by the ISP, but wvdial itself needs it.