A20 tools and gpio/uart on android

Started by micropad, February 25, 2015, 12:15:22 PM

Previous topic - Next topic

micropad

Hi,

i try to work with the A20-tools but every time i launch the app, it crash..

How i can use the gpio under androd?

thanks


dave-at-axon


deskwizard

#2
+1 for Dave's implementation, the GPIO works like a charm, I'm sure the I2C works just as well

Don't forget to have your GPIO exported and permissions set to 777 on "value" and "direction" before using it, took me a while... ;)

DW

Edited for clarity.

deskwizard

As for UART, I often use the APK called "COM port API Sample", so I would have a look at: https://code.google.com/p/android-serialport-api/ if I had to do UART

DW

dave-at-axon

I'll second the serial port API that DW linked to.

I even have this working with the Modbus Java source I found on the net.

micropad

thanks, i will try it later,

QuoteI even have this working with the Modbus Java source I found on the net.

Can you give me the link for that? modbus is the next step for me!



dave-at-axon

Quote from: micropad on February 26, 2015, 01:16:30 PM
Can you give me the link for that? modbus is the next step for me!

http://sourceforge.net/projects/modbus4j/

It's designed for standard Linux so you need to Modify the Serial part to use the SerialPort API. The TCP/IP just works out of the box.

djdance

Quote from: deskwizard on February 25, 2015, 11:21:09 PM
As for UART, I often use the APK called "COM port API Sample", so I would have a look at: https://code.google.com/p/android-serialport-api/ if I had to do UART

DW

Hello, please can you provide an example of UART, implemented with "COM port API Sample" ? (I also used it, but can not figure how to make UART)