我正在尝试使用串口 api 从串口读取数据:
http://code.google.com/p/android-serialport-api
但是,我无法从我的 android 应用程序访问设备。当我使用 SerialPortFinder 时,这是我找到的设备的日志。
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
我的 android(2.1) 设备有一个 rs232 端口,波特率为 2400;。
当我使用“新串行端口(新文件(设备名称),波特率,0);”
我可以访问的唯一门是“/dev/s3c2410_serial0”。
但是,这扇门与我的设备无关。
任何人都知道我如何找到正确的端口,或者我做错了什么?