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

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.

Advertisements

Installing Oracle 10g Express edition in Mandriva 2009

Hi,

This is to share the screenshot of the oracle installation in my mandriva 2009 (Free). The installation is very simple. Download the oracle installation jar from oracle.com. It has only one dependency, considering mandriva 2009, which is libaio.jar. See whether it is coming with Mandriva, or else download from the web. thats it. then install the RPMs.

Once RPMs are installed, database need to be configured. Issue the following command to configure the database.

/etc/init.d/oracle-xe configure

This will take you to a text wizard asking the system username, password etc and complete your installation process. See the screenshot below.

Oracle installation screenshot

Thats all!

Try to login to your oracle server with the web interface
http://localhost:8080/apex
ofcourse you have the option to change the port also.

oracle web interface

happy dbing!

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

kuttikaranam

Today I had a new install of Mandriva 2008 linux. I wrote a java code to test the mysql connectivity. It ended with the following exception.

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.

Alas, deeper google search gives me a solution that told about the mysql connectivity parameter in /etc/my.cnf

skip-networking

This parameter has been added for some security related reasons. Really I dont know what it is. I just removed that line, which solved this issue.

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.