Android access a device with serial port;

I am trying to read data from a serial port using the serial port api:

http://code.google.com/p/android-serialport-api

But, i have a problem to access the device from my android application. When i use the SerialPortFinder that's the log with my found devices.

02-28 08:56:52.394: I/global(2237): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
02-28 08:56:52.394: D/SerialPort(2237): Found new driver rfcomm on /dev/rfcomm
02-28 08:56:52.399: D/SerialPort(2237): Found new driver usbserial on /dev/ttyUSB
02-28 08:56:52.399: D/SerialPort(2237): Found new driver acm on /dev/ttyACM
02-28 08:56:52.399: D/SerialPort(2237): Found new driver ttySAC on /dev/s3c2410_serial
02-28 08:56:52.399: D/SerialPort(2237): Found new driver serial on /dev/ttyS
02-28 08:56:53.074: D/SerialPort(2237): Found new device: /dev/s3c2410_serial3
02-28 08:56:53.074: D/SerialPort(2237): Found new device: /dev/s3c2410_serial2
02-28 08:56:53.074: D/SerialPort(2237): Found new device: /dev/s3c2410_serial1
02-28 08:56:53.074: D/SerialPort(2237): Found new device: /dev/s3c2410_serial0
02-28 08:56:53.204: D/SerialPort(2237): Found new device: /dev/ttyS3
02-28 08:56:53.204: D/SerialPort(2237): Found new device: /dev/ttyS2
02-28 08:56:53.204: D/SerialPort(2237): Found new device: /dev/ttyS1
02-28 08:56:53.204: D/SerialPort(2237): Found new device: /dev/ttyS0

My android(2.1) device have a rs232 port, the baud rate is 2400;.

When i use the "new SerialPort(new File(deviceName), baudrate, 0);"

The only door that I can access is the "/dev/s3c2410_serial0".

But, this door is not related to my device.

Anyone know how I could find the correct port, or if I'm doing something wrong?

Upvotes: 1

Views: 2541

Answers (1)

My problem was on the permissions, just unlock my root user on android, and it works!

Upvotes: 0

Related Questions