Archive for February, 2009

rahman with oscarI wish to congratulate AR Rahman for bringing Oscar glory to Chennai. We have been expecting it for long time. Thanks to Rahman for occomplishing it. Many South Indians’ skillset are not being worshipped in India, just because they came from South India. People like him overcome all their difficulties.As veteran Actor KamalHassan saysthis is the way to go, but remember to comebackCongrats once again:)

projects

Hi,

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, http://kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html , 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.

java.io.IOException: Not all params are supported by kernel
at com.sun.comm.LinuxSerial.nativeSetSerialPortParams(Native Method)
at com.sun.comm.LinuxSerial.setSerialPortParams(LinuxSerial.java:346)
at gf.sms.pack.Port.open(Port.java:46)
at gf.sms.pack.SendSMS.run(SendSMS.java:21)
at java.lang.Thread.run(Thread.java:619)

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

I got immediate response from ILUGC Chennai Linux User Group, http://chennailug.org/ ,  regarding this. My sincere thanks to them.

If you want to change the port number in jboss, just change the port number of inbuilt tomcat port in its server.xml

For example the file is located in
/home/pandian/FILE_SERVER/jboss/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/server.xml
(jboss v 5.0)jboss port change