Using the Android Open Accessory standard, I have an android powered device talking back and forth with an arduino mega ADK microcontroller hooked up via USB. I would like to know what the best communication protocol is at the data link layer level.
From the android & arduino sides, it is simple file based IO e.g. write(buffer[], buffer_length), read(buffer[], buffer_length).
Doing some research, I came across this link entitled "simple serial point-to-point communication protocol" that recommends using the HDLC protocol. Would that be a good protocol to run with or is there something better?
Thank you
It might be completely overkill to you, but I have successfully used MQTT to communicate from an Arduino (over ethernet) to an ActiveMQ broker (this is likely where the overkill would happen in your case).
I will try to dig out some source code later today.
Edit: I found this resource on Android/MQTT, which may be handy to you.
Cheers,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With