Posts RSS Comments RSS 377 Posts and 1,113 Comments till now

Archive for July, 2007

Thesis Update

I finally completed the content draft for my graduate thesis. After I get a few eyes to read through it, it should be ready to be bound. I have a few more things to wrap up (one of them being Harry Potter 7 and a few work-related things I put of until this weekend) before I resurface and become a member of society.

This doesn’t mean I don’t have any projects already planned for the future, I will remain plenty busy:

  • Wordpress contextual help (SoC project)
  • Digikam usability report (months late)
  • Object-based annotation research paper (for HCIL)
  • A number of odds and ends kinds of things that make me the crazy person that I am

Cheers!

Verizon EVDO Update

This is an update to my previous post on using high speed cellular cards in Linux.

Today while I was waiting for Harry Potter 7, I decided the two hours away from home was too long to be disconnected. Being the geek I am, I of course had my laptop and EVDO card with me. However, when I went to call out, I received this error:

~# pppd call 1xevdo
pppd: In file /etc/ppp/peers/1xevdo: unrecognized option 'ttyACM0'

Hmm.. At first I thought /etc/modules got overwritten, so I reloaded all the modules and tried again to no avail. Then I thought perhaps I installed a kernel update that broke it and so rebooted to my previous build.. no luck. Then I thought the worst and maybe I burned out my PCMCIA slot.

I took out the card and checked the device differences to make sure the card showed up:

~# cat /proc/bus/usb/devices > devices
~# diff /proc/bus/usb/devices devices | grep Vendor
< P: Vendor=106c ProdID=3701 Rev= 0.00

So far so good… which turned out to be 40 or so minutes of me scratching my head over why the hell this didn’t work anymore (I did not have internet access, so looking up the problem was not an option).

Finally, I tailed /var/log/messages to find something interesting:

~# tail -f /var/log/messages
Jul 20 23:11:16 takochi kernel: [ 461.768000] hub 7-0:1.0: USB hub found
Jul 20 23:11:16 takochi kernel: [ 461.768000] hub 7-0:1.0: 1 port detected
Jul 20 23:11:17 takochi kernel: [ 463.148000] usb 6-1: new full speed USB device using ohci_hcd and address 2
Jul 20 23:11:17 takochi kernel: [ 463.360000] usb 6-1: configuration #1 chosen from 1 choice
Jul 20 23:11:17 takochi kernel: [ 463.360000] usbserial_generic 6-1:1.0: generic converter detected
Jul 20 23:11:17 takochi kernel: [ 463.360000] usbserial_generic: probe of 6-1:1.0 failed with error -5
Jul 20 23:11:17 takochi kernel: [ 463.360000] usbserial_generic 6-1:1.1: generic converter detected
Jul 20 23:11:17 takochi kernel: [ 463.360000] usb 6-1: generic converter now attached to ttyUSB0
Jul 20 23:11:17 takochi kernel: [ 463.364000] usbserial_generic 6-1:1.2: generic converter detected
Jul 20 23:11:17 takochi kernel: [ 463.364000] usb 6-1: generic converter now attached to ttyUSB1

usbserial is the module configured and loaded for the EVDO card, and as far as I know, has no other use on my system (since I added it to /etc/modules when I installed the EVDO card). There seems to be some error when attaching to a device, although when I updated the device in /etc/ppp/peers/1xevdo to USB1 (the device the message says usb is attached to), the connection couldn’t be established. So I tried USB0, which ended up working.

The moral of the story: If some of you Kubuntu users out there suddenly have problems connecting with your EVDO card, try checking your messages and replacing ttyACM0 with the correct device in /etc/ppp/peers/1xevdo.

If any of you out there know how or why this would happen, I’d love to know so I can figure it out sooner next time it happens :)

Thesis Crunch Week

It’s crunch time for my thesis. I have until the end of the week to get a content draft to my advisor to sign if I want to graduate this semester. For a while I thought I was on schedule because I had been putting a few hours a day in to it, but I’m beginning to feel the pressure as the last week begins to close. The statistics took a lot longer to report than I had thought which took up most of last week and the past weekend. I think today I will work on an easy section (like appendices) to let my brain rest.

All projects (other than day job related work) have been put on hold until this draft gets out.

More information about my thesis research

Verizon EVDO in Kubuntu Linux

One of the things I did over the 4th of July holiday was get my dad’s Verizon EVDO (cellular broadband service) card to work in Linux. The reason why he got the card in the first place is still a mystery (he has DSL at home and office and never takes his laptop when he travels), but he was nice enough to let me borrow it for a little while so I can decide if I want one of my own.

The card in question is a PC5740 which seems to be one of the widely used/most popular cards in use. It is supported by Linux and just needs some kernel modules installed and a ppp script to connect. I found two websites (site 1, site 2) which helped the most and had very straight forward directions and additional information. As far as I know, the linked directions should work with almost any EVDO card, the major difference are the vendor and product ids which are module options.

Here is the process I went through to get my Verizion PC5740 EVDO card to work in Kubuntu Linux. It is very similar to the two sources I listed, but includes some additional tips to minimize the amount of work to get it up and running. The instructions are also simplified a bit for users who are not as familiar with using Linux.

Setup and Configuration

First log in as root. Kubuntu uses sudo instead of root, and you can “login” by using the -i option instead of typing sudo before every command:

~$ sudo -i

Now load the ohci-hcd module if it is not already installed:

~$ modprobe ohci-hcd

Next, we have to get the vendor and product id of the card so we can load the usbserial module. First cat your USB devices without the card installed:

~$ cat /proc/bus/usb/devices > devices

Now insert the card and diff devices to find the new device information. If you are using a PC5740, your vendor and product id should match my example:

~$ diff /proc/bus/usb/devices devices | grep Vendor
< P: Vendor=106c ProdID=3701 Rev=0.00

Now load the module usbserial with the newly found options:

~$ modprobe usbserial vendor=0x106c product=0x3701

If all goes well you should have the new device ttyACM0:

~$ ls /dev/ttyACM0
/dev/ttyACM0

To simplify things, I added ohci-hcd and usbserial to /etc/modules and added the module options in /etc/modprobe.d/ so everything loads on boot. This way you won’t have to manually load the modules every time you reboot.

Edit /etc/modules:

# /etc/modules: kernel modules to load at boot time.
#
ohci-hcd
usbserial

Create an option file for usbserial. In other distributions, the module options are in /etc/conf.module or /etc/module.conf, but in Kubuntu, the module options are in individual config files in /etc/modprobe.d/ with the same name as the module and a .modprobe ending:

~$ touch /etc/modprobe.d/usbserial.modprobe

Now edit the file and add the module options we found earlier:

# /etc/modprobe.d/usbserial.modprobe
#
options usbserial vendor=0x106c product=0x3701

Now install and update the new module changes:

~$ update-modules

Next time the computer is rebooted, ochi-hcd and usbserial with vendor and product options will be loaded.

Next we have to configure the card options and create a connection script for pppd. First create the configure file:

~$ touch /etc/ppp/peers/1xevdo

Edit /etc/ppp/peers/1xevdo and add the following options. Remember to replace the sample phone number with the phone number assigned to the card:

# /etc/ppp/peers/1xevdo
#
ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 10000
user 1234567890@vzw3g.com
show-password
crtscts
lock
lcp-echo-failure 4
lcp-echo-interval 65535
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'

Next create the chat script file:

~$ touch /etc/ppp/peers/1xevdo_chat

This file can be customized with various options to provide information about the connection. This is the chat script I use from Ken Kinder’s tutorial:

# /etc/ppp/peers/1xevdo_chat
#
ABORT 'NO CARRIER' ABORT ERROR ABORT 'NO DIALTONE' ABORT BUSY ABORT 'NO ANSWER'
'' 'ATTEV1&F&D2&C1&C2S0=0S7=60'
'OK-ATTEV1&F&D2&C1&C2S0=0S7=60-OK-ATTEV1&F&D2&C1&C2S0=0S7=60-OK' 'AT+CSQ;D#777'
TIMEOUT 70
'CONNECT-AT+CSQ;D#777-CONNECT'

A simpler chat script may be a good starting place to first get connected and add options as you go:

ABORT 'NO CARRIER' ABORT 'ERROR' ABORT 'NO DIALTONE' ABORT 'BUSY' ABORT 'NO ANSWER'
'' ATZ
OK-AT-OK ATDT#777
CONNECT \d\c

The first few times I connected with the card, for some reason I could only connect with the simpler chat script. I’m not sure if it was because of my location or if I forgot about an option I updated. EVDO Forums is a good resource for anyone who needs to troubleshoot or wants to customize.

Now we are ready to connect the card to the EVDO network:

~$ pppd call 1xevdo

There is no feedback from pppd and you have to watch messages in order to view the connection status and get information for configuring your gateway:

~$ tail -f /var/log/messages
Jul 9 17:58:01 takochi chat[5531]: send (ATTEV1&F&D2&C1&C2S0=0S7=60^M)
Jul 9 17:58:02 takochi chat[5531]: expect (OK)
Jul 9 17:58:02 takochi chat[5531]: ATTEV1&F&D2&C1&C2S0=0S7=60^M^M
Jul 9 17:58:02 takochi chat[5531]: OK
Jul 9 17:58:02 takochi chat[5531]: -- got it
Jul 9 17:58:02 takochi chat[5531]: send (AT+CSQ;D#777^M)
Jul 9 17:58:02 takochi chat[5531]: timeout set to 70 seconds
Jul 9 17:58:02 takochi chat[5531]: expect (CONNECT)
Jul 9 17:58:02 takochi chat[5531]: ^M
Jul 9 17:58:02 takochi chat[5531]: AT+CSQ;D#777^M^M
Jul 9 17:58:02 takochi chat[5531]: 23, 99^M
Jul 9 17:58:08 takochi chat[5531]: ^M
Jul 9 17:58:08 takochi chat[5531]: CONNECT
Jul 9 17:58:08 takochi chat[5531]: -- got it
Jul 9 17:58:08 takochi pppd[5528]: Serial connection established.
Jul 9 17:58:08 takochi pppd[5528]: Using interface ppp0
Jul 9 17:58:08 takochi pppd[5528]: Connect: ppp0 < --> /dev/ttyACM0

If you are using the simpler chat script, your messages will be a little different, but it will be pretty obvious if you have connected or not. You should also get assigned a local and Verizion IP address as well as receive DNS information:

Jul 9 17:58:18 takochi pppd[5528]: local IP address YOURLOCALIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: remote IP address YOURVERIZONIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: primary DNS address PRIMARYDNSIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: secondary DNS address SECONDARYDNSIPADDRESS

The final step for configuring the connection is to add a gateway to your routing table so you can talk to other computer on the internet. You will need the local IP address listed in /var/log/messages:

~$ route add default gw YOURLOCALIPADDRESS

Now you should have internet access from your EVDO card!

Connecting At A Later Time

Since we configured the necessary kernel modules to load on boot, connecting the EVDO card is down to three steps (as sudo or after logging in as root).

First, make the connection call:

~$ sudo pppd call 1xevdo

Second, view the connection messages and get the local IP address:

~$ tail -f /var/log/messages

Third, add the gateway to the routing table so you can communicate with the internet:

~$ sudo route add default gw YOURLOCALIPADDRESS

Troubleshooting

If for some reason you don’t connect or you get disconnected and you try to reconnect, you may get this error in /var/log/messages (where 123 is replaced by some number):

Jul 9 18:02:26 takochi chat[5531]: Device ttyACM0 is locked by pid 1234

This means the process is still running and you have to cancel it before trying again. You can do this by killing the process:

~$ sudo kill 1234

If for some reason your KDE applications are not able to connect to the internet, but you can do other things like SSH, try unloading the DCOP network module:

dcop kded kded unloadModule networkstatus

If you are using Ken Kinder’s chat script, you can get information about the signal strength of your connection. When watching /var/log/messages, look for this line:

Jul 9 17:58:02 takochi chat[5531]: 23, 99^M

The 23 is the signal strength indicator of my connection (my connection is pretty good). Values can be 0, 7, 15, 23, 31 and are usually represented by the number of bars provided on the phone interface.

KDE also has a GUI interface for pppd called kppp. As far as I know, it does not support configuring EVDO. Besides (and no offense is meant), the kppp interface is pretty scary and I would direct anyone to the CLI instructions to get this working.

By the way, if/when kppp does support configuring EVDO, I will be happy to help fix the interface.

Hello Planet Ubuntu!

After about a year of working with the project, I am now a Kubuntu Member. Greetings to a great community!

Next »