Android Question Use Android tablet with /dev/ttyS0 serial port

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone,
I have a project to do that involves using an Android Tablet.
This tablet has several ports and one of these (/dev/ttyS0) is used by a MIFARE UART card reader (called ICM523).

Here on the forum I'm not able to find the correct way to interact with a hardware serial port in order to send and receive bytes... please tell me that it is possible...

Thanks in advance
 

aeric

Expert
Licensed User
Longtime User
I think it can be achieved using asyncstreams.

 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Unless your device is rooted then I don't think this is possible unless there is already a driver accessible to apps installed on the tablet. The fact that the tablet has this port and that you know that it exists would imply to me that this port is likely intended for apps to use and so I would have thought the manufacturer had provided a driver for it. Have you checked with the manufacturers' documentation?
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Unless your device is rooted then I don't think this is possible unless there is already a driver accessible to apps installed on the tablet. The fact that the tablet has this port and that you know that it exists would imply to me that this port is likely intended for apps to use and so I would have thought the manufacturer had provided a driver for it. Have you checked with the manufacturers' documentation?
Hi Agraham,
the manufacturer did not provided any driver. He said it is just a TTY port. Actually I've enumerated all the ports and looks like there are many after ttyS0.
To enumerate the ports, I've used the library found here:
https://www.b4x.com/android/forum/threads/gpio-and-uart.100811/#post-634049
I've tried to send a transmission but no data are received.
I'm trying to interface to a RFID reader with a UART port on it that needs to be set with a baud rate of 115200 and 8N1 dataframe.
The additional questio is how to set the "8N1" parameter.

I've no error using that library, even looking at unfiltered logs.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Perhaps I am wrong but I thought that you need a rooted device and an app with root permissions to access any of the system file system folders. Someone with lower level experience of Android than I will have to chip in if they have the relevant knowledge.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi, I'm using a rooted device.
Using the library I mentioned above in the post #4 IT WORK.
What the problem was?
After struggling with libraries and software, I finally managed to breack the seal and OPEN the Android Panel.
Result: there was a defective contact on the RFID connector....
It seems to work now.
Thank you for your time.
 
Upvote 0
Top