Archive for the 'Linux' Category

Mobile Broadband Cards and Linux: Cingular / UMTS on openSUSE 10.2

I finally decided that getting a mobile broadband card would be worthwhile. Watching some of my friends and colleagues use them in airports and at customer sites went a long way toward convincing me.

Since my employer uses the former and once again current AT&T Wireless, I looked into the two 3G cards they offer:

Both use the UMTS/HSDPA 3G network, as well as the GPRS/EDGE network as a fallback. Of course I was most interested in getting a card that works under Linux, so I found the PHARscape web site most helpful. This site covered getting the Option cards working, and I was not able to find much on the Sierra card, so that decision was easy. Also, the Option card has a nice retractable antenna, so it sticks out less:

Option card

As for getting the card to work, it was surprisingly painless.

Note: If you are using SUSE Linux Enterprise Desktop 10 SP1, openSUSE 10.3, or are using a really recent kernel on another distribution (2.6.20-ish or later), step 1 is not necessary, so skip right to step 2, which is configuring the dialup device.  Just point your modem to /dev/ttyUSB0 and off you go.

Step 1. Getting the usbserial driver to recognize the card

Simply modprobe usbserial with the idVendor and idProduct tags. The following are the right tags for the Option GT MAX 3.6 card. You can find the right valued by looking in syslog when you plug the card in. The line will look like this:

Feb 5 12:57:55 hillsuse kernel: usb 7-1: new device found, idVendor=0af0, idProduct=6701

Once you have the right info, modprobe the usbserial driver with them. You may have to unload usbserial if it’s already loaded (I did):

# modprobe -r usbserial

# modprobe usbserial vendor=0x0af0 product=0x6701

If this step is successful, you will see messages in syslog like this: Feb 5 12:57:55 hillsuse kernel: usbcore: registered new driver usbserial
Feb 5 12:57:55 hillsuse kernel: drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Feb 5 12:57:55 hillsuse kernel: usbserial_generic 7-1:1.0: generic converter detected
Feb 5 12:57:55 hillsuse kernel: usb 7-1: generic converter now attached to ttyUSB0
Feb 5 12:57:55 hillsuse kernel: usbserial_generic 7-1:1.1: generic converter detected
Feb 5 12:57:55 hillsuse kernel: usb 7-1: generic converter now attached to ttyUSB1
Feb 5 12:57:55 hillsuse kernel: usbserial_generic 7-1:1.2: generic converter detected
Feb 5 12:57:55 hillsuse kernel: usb 7-1: generic converter now attached to ttyUSB2

Step 1b. Automating the above with udev

To make the card “just work” when it is plugged in, we need to create a udev rule. To do that, create /etc/udev/rules.d/51-3g-datacards.rules containing the following:

# Rules for hotplugging Cardbus 3G datacards
SUBSYSTEM=="usb", SYSFS{idVendor}=="0af0", SYSFS{idProduct}=="6701", RUN="/etc/"
KERNEL=="ttyUSB0", SYMLINK="modem", GROUP="dialout", MODE="0660"
KERNEL=="ttyUSB2", GROUP="dialout" MODE="0660"

We also need to create /etc/, as follows:

/sbin/modprobe -r usbserial
/sbin/modprobe usbserial vendor=0x0af0 product=0x6701

The two files above will automatically load the usbserial driver for the card, and create a symlink to the ttyUSB0 port on /dev/modem.

Step 2. Configuring the modem

The last thing to do is configure the card as a modem so you can actually connect with it. Load up YaST or other favorite tool, and add a new modem using device /dev/modem, as in the following screenshots.



The important thing in the image above is the second intitialization command. For Cingular, it needs to be as follows:


The next step is creating the ISP/provider entry that contains the phone number to dial:


For Cingular, here are the correct details:

Phone number: *99***1#


Password: cingular1

Step 3. Dial!

I use NetworkManager, which works fine except it doesn’t give you any feedback on modem connection status. I also highly recommend the following tools to use with these cards:

  • umtsmon – graphical connection status (signal strength, radio type, etc)
  • comgt – command-line management of card (PIN management, network switch, etc)

Logitech MX Revolution in Linux

Update: Froese has written a tool to control the wheel-click behavior. See comment #6 below.

I picked up a Logitech MX Revolution mouse, sort of unsure of whether I could get all its functions working under SUSE Linux Enterprise Desktop 10.

The mouse is nice, and lends itself quite well to xgl and compiz. The only portion I haven’t been able to get working yet is the thumb-wheel (xev shows keyboard events o [ and Enter). It looks like an upgrade to 7.1 or 7.2 is required to fix that, as a number of users have reported in the comments below.
In case anyone is interested, here is what I had to do to /etc/X11/xorg.conf to get the rest of it working, including the tilt wheel, the search button, and the two thumb buttons.

Section "InputDevice"
Identifier   "Mouse[1]"
Driver       "evdev"
Option       "Device" "/dev/input/event4"   # cat /proc/bus/input/devices
Option       "Name" "Logitech MX Revolution"
Option       "CorePointer"

The “Device” bit may be different for you – type cat /proc/bus/input/devices and look for the two Logitech sections, which will be something like this:

I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/class/input/input4
H: Handlers=mouse2 event4
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.0-2/input1
S: Sysfs=/class/input/input5
H: Handlers=kbd event5
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6639fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0

The line we are interested in is Handlers, but notice the device registers as a keyboard and a mouse. Make sure you choose the one for the mouse, which is “event4″ in this case.

The last thing you need to change in xorg.conf is make sure any of your other pointing devices are still working. I have the Logitech as Mouse[1], and the touchpad and pointing stick on my ThinkPad T60p ast Mouse[2] and Mouse[3] respectively. You should not have to modify those sections except to make sure there are no name conflicts.

Finally, my ServerLayout section looks like this:

Section "ServerLayout"
Identifier   "Layout[all]"
InputDevice  "Keyboard[0]" "CoreKeyboard"
InputDevice  "Mouse[1]" "CorePointer"
InputDevice  "Mouse[2]" "SendCoreEvents"
InputDevice  "Mouse[3]" "SendCoreEvents"
Option       "Clone" "off"
Option       "Xinerama" "off"
Screen       "Screen[0]"

After all these steps, everything should work on the mouse except the Search button. The thumb-wheel is generating keyboard events (the o, [, and Enter keys), which currently makes it useless. I haven’t figured out how to deal with that. The two thumb buttons are mouse buttons 8 and 9, which I have mapped to some things in compiz.
The search button was pretty easy for me, although it works a little differently than it would under Windows. On a Windows machine, you can highlight some text, click the search button, and it will open your favorite search engine and search for that text.

With SLED 10, we have Beagle, which I thought would be a better use of the button anyway. However, clicking the button won’t submit any search terms – just open the search tool.
The search button is actually treated as a keyboard button, with keycode 122. What you need to do is map this to a keysym, so that you can use that symbol to define an action under keyboard shortcuts. The way I did that was to add the following to $HOME/.Xmodmap:

keycode 122 = XF86Search

You also may or may not have to add the following to your Gnome session startup:

/usr/X11R6/bin/xmodmap $HOME/.Xmodmap

You can see the current key mapping by typing “xmodmap -pk” in a terminal, and looking for keycode 122.
After restarting X, you can run xev in a terminal, and test pushing the search button. You should see the key symbol XF86Search in the output. All that remains is to map that key symbol to your desired action. Since I am using compiz-quinn, I used compiz settings manager (csm) to add a custom command to run /usr/bin/beagle-search. Then I specified the XF86Search key to execute that command.

If anyone knows how to get the thumb wheel working correctly, let me know!


VMware on 2.6.5 kernel (SLES9)

For personal archival purposes:

NETSYS.COM – SuSE Linux Mailing List Archives (english)

make cloneconfig

make modules

This gets around the symbol error…