Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Android Serial Communication via USB to Grand Central
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Android Serial Communication via USB to Grand Central

by PhillyG27 on Fri Jul 10, 2020 6:55 pm

The goal is to have an Android tablet control motors and such via the Grand Central.
I am coding the Android app via Xamarin.Forms and the Grand Central via VS Code/PlatformIO
I have gotten a simple SerialEco program working on both an Uno and the GC to work between PC and the uCU's.
I have been using anotherlab's UsbSerialForAndroid library https://github.com/anotherlab/UsbSerialForAndroid to comm w/ Android.
In which I was successful in communicating w/ the Uno but not the GC, the tablet would not even recognize anything had been plugged in.

From what I understand the main issue is that the SAMD chip has USB protocols built-in while the Uno does not.
This lead me to try to see where UsbSerialForAndroid Libs calls the FTID to open communication to change the config to use CDC from the SAMD.

Does anyone happen to know if I am on the right path or have any valuable insight on how to solve this issue?

PhillyG27
 
Posts: 14
Joined: Thu May 16, 2019 10:33 am

Re: Android Serial Communication via USB to Grand Central

by User_UMjT7KxnxP8YN8 on Sat Jul 11, 2020 5:27 pm

I can't help with your Android USB approach, but I wonder why you chose that approach rather than WiFi?

I'm not criticizing what you're doing, just curious.

User_UMjT7KxnxP8YN8
 
Posts: 153
Joined: Tue Jul 17, 2018 1:28 pm

Re: Android Serial Communication via USB to Grand Central

by PhillyG27 on Mon Jul 13, 2020 5:50 pm

Adafruit_UMjT7KxnxP8YN8 wrote:I can't help with your Android USB approach, but I wonder why you chose that approach rather than WiFi?

I'm not criticizing what you're doing, just curious.


Thank you for your reply.
The main reason I am shying away from wireless, both wifi and BLE, is that I can not afford for any latency between the Android Tablet and the GC.

PhillyG27
 
Posts: 14
Joined: Thu May 16, 2019 10:33 am

Re: Android Serial Communication via USB to Grand Central

by User_UMjT7KxnxP8YN8 on Tue Jul 14, 2020 12:57 am

Gotcha.

I think I'd run some tests on the Android tablet to see how uniform the latency will be before investing a lot of effort in it. It would be very annoying to develop your app only to find the latency varies unacceptably.

Wouldn't you put the time-critical code on the Grand Central and just send mode changes or commands from the tablet? If so, surely the latency in Wifi communication is minuscule compared to human interaction time.

User_UMjT7KxnxP8YN8
 
Posts: 153
Joined: Tue Jul 17, 2018 1:28 pm

Please be positive and constructive with your questions and comments.