Connecting Sony Ericsson W810i to Mandriva and executing AT commands with Java



This post is to document the steps I overcome to connect my sony ericsson W810 as a serial modem with windows and linux and passing AT commands to it. My ultimate aim is to operate the phone in command line.

My Windows experience is sour, since sun doesnt offer its javax.comm version of jar for windows. From the googling I found sun issued it before and stopped as of now. I found the old version of comm.jar from the net from an unauthenticated website which resolved all issues. My phone is found to be a serial modem connected to COM7 port. Then passing AT commands reached the phone and I got the reply.

My Linux experience is time consuming, may be because of my ignorance. I am not at all able to mount the phone to any ports such as /dev/tty0, 1, 2. Usually USB mobile phones to be mounted in /dev/ttyACM0 or /dev/ttyACM1 in linux. From the googling I found I need to install the PCMCIA package, , luckily my Mandriva 2009 (again a FREEdom OS) bundle it by default. Then I found my phone got detected in /dev/ttyACM0.

When I connected the phone I found the following in the kernel logs. Use dmesg | tail -5 to do this.

Feb 22 11:58:32 pallava kernel: usb 3-1: new full speed USB device using ohci_hcd and address 5
Feb 22 11:58:32 pallava kernel: usb 3-1: configuration #1 chosen from 1 choice
Feb 22 11:58:32 pallava kernel: cdc_acm 3-1:1.1: ttyACM0: USB ACM device
Feb 22 11:58:32 pallava kernel: cdc_acm 3-1:1.3: ttyACM1: USB ACM device
Feb 22 11:58:32 pallava kernel: usb 3-1: New USB device found, idVendor=0fce, idProduct=d042
Feb 22 11:58:32 pallava kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 22 11:58:32 pallava kernel: usb 3-1: Product: Sony Ericsson W810
Feb 22 11:58:32 pallava kernel: usb 3-1: Manufacturer: Sony Ericsson
Feb 22 11:58:32 pallava kernel: usb 3-1: SerialNumber: 352337019712611_0

But my java is not able to understand the port it was listing only the default ports as

SessionIndependent_/dev/ttyS0 1 Port currently unowned
SessionIndependent_/dev/ttyS1 1 Port currently unowned

Later I found the issue is with the java io config file javax.comm. It doesnt contain the entries for ACM ports. I am not sure they will be detected automatically, that doesnt happen to me.

# Paths to server-side serial port devices
serpath0 = /dev/ttyS0
serpath1 = /dev/ttyS1

I need to add ACM ports manually, which resolved all issues.

serpath2 = /dev/ttyACM0
serpath3 = /dev/ttyACM1

As of now its working fine, but now and then I am getting the following exception when I try to open the com port. Not all params are supported by kernel
at com.sun.comm.LinuxSerial.nativeSetSerialPortParams(Native Method)
at com.sun.comm.LinuxSerial.setSerialPortParams(

Will find why I am getting the error and document it as well.

I got immediate response from ILUGC Chennai Linux User Group, ,  regarding this. My sincere thanks to them.

Sony Ericsson Walkman 810i and Mandriva Linux 2006

Currently i dont have Mandriva spring. But I need to install Linux immediately to continue one of my previous development projects. So I installed on of the older versions of MDK, Mandriva 2006.

This time i found it is very easy to use USB devices with Mandriva. I could see USB thumbdrives are detected automatically and mounted. I could see the necessary icons in the desktop as soon as those devices are mounted properly.

Have fun, my mobile also beautifully working with that, yes, I could see both my phone memory and card storage on the desktop.