1
votes

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?

1
It's doubtful all those ports are physically present - the existence of device nodes in the filesystem means little unless they are being actively created to track hardware state. What is your device? How is it's alleged serial port implemented at the chip level? - Chris Stratton
It's a Card Reader, its has a debug port, two usb, a Rs232 and a TTl-UART. I'm trying to connect with the RS-232. How i can find the serial port at the chip level? - Rodolfo Pascoal Coelho
What specific device is it? You may need the schematics or to examine the board or kernel sources/config. It could also be a permission problem on the device nodes. - Chris Stratton
Chris Stratton, Thanks a lot! My problem was on the permissions, just unlock my root user on android, and it works! - Rodolfo Pascoal Coelho

1 Answers

0
votes

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