Tiny210 - Serial Port API for android

saeid
Hi,
I've purchased a Tiny210 board and tested the iTest app on android 4.0.3
and it works fine. I'm using Android Studio to develop an application and I
want to know how to use this api. Can someone bring a sample code on these
topics:
1- Browsing available COM ports, connect to and configure them.
2- Send and Rcv mechanisms.

Thnx

Phil_in_China
Maybe see http://code.google.com/p/usb-serial-for-android/

should help you

Phil

Dave McLaughlin
Look for the Android SerialPort API. It provides all you need and way
better than the FriendlyArm driver.

ali
could you describe how to use this api
help us please

David McLaughlin
It's not hard if you are familiar with Android programming.

Just download the source here and include it in your code as a library.

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

All you need to do is call open with the correct settings for your serial
port and it works as either a stream or can pass your FD. 

This is the call I use within a Modbus driver to open the serial port. Note
that I modified the SerialPort API to allow bits, parity and stop to be
changed.

serialPort = new SerialPort();
            serialPort.Open(serialParameters.getCommPortId(),
serialParameters.getBaudRate(),
                            serialParameters.getDataBits(),
serialParameters.getStopBits(),
                            serialParameters.getParity(), 0);
            transport = new StreamTransport(serialPort.getInputStream(),
serialPort.getOutputStream());

sdff
Warning! Tiny210 - Serial Port cannot be used to xmit extended ascii.