3

I am trying to develop and application which send and receive data from/to the RS485 serial port. For that, I am following this api:

https://code.google.com/archive/p/android-serialport-api/

https://github.com/cepr/android-serialport-api

Is this api used for RS232 or RS485? or both? If both, how can I decide what to use?

Is this the recomended api or is there another one?

adrian4aes
  • 849
  • 2
  • 14
  • 23
  • 1
    rs485 is basically just long-distance rs232. the electrical interface is different, but both should essentially appear identical to software. – Marc B Oct 25 '16 at 16:50
  • So it depends on what port I select in the setup activity? I suppose it can list both type of ports, then If I select a RS485 port the communication will work propertly? – adrian4aes Oct 25 '16 at 17:01
  • Do You have serial ports on your android device? Or it is external devices connected via OTG? – Andrii Omelchenko Oct 25 '16 at 17:07
  • I have a customized tablet which has RS485 and RS232 serial ports and android o.s. – adrian4aes Oct 25 '16 at 17:19
  • 1
    If "customized serial ports" is FTDI FT232, Silicon Labs CP210x, Prolific PL2303HX, or CH340/CH341 chip based You can take a look at [this](https://felhr85.net/2014/11/11/usbserial-a-serial-port-driver-library-for-android-v2-0/) library (also for FTDI vendor [library and examples](http://www.ftdichip.com/Support/FTSwExamples.htm) exists) – Andrii Omelchenko Oct 25 '16 at 17:54

0 Answers0