Reputation: 314
I've made an Android app that makes the smartphone run in USB host mode. I did so using the Android official documentation given here:
https://developer.android.com/guide/topics/connectivity/usb/host
To test the app, I connected a pen drive via an OTG cable. The app is able to detect the pen drive and read its contents. Now basically, I want to replace the pen drive with a Raspberry Pi.
Please help me with this: How can I establish synchronous communication (basically a stream) between Raspberry Pi and an Android-powered smartphone.
I have tried UART communication but cannot use it as I am transmitting video from Raspberry Pi.
Note:I cant use WIFI due to restrictions.
Upvotes: 6
Views: 1046
Reputation: 2517
I agree with @fadedreamz. there is not simple way.
But there is complex way of doing so.
you have OTG working.
You need to communicate to RPI 3B+ which oesn't have OTG.
this article talk about how to do int.
In a nutshell
i. use USB adapter connect it to USB to serial connector.
ii. use PhysicaloidLibrary.
Thats it.
you have synchronous communication between pi and rpi.
There are other ways. i.e.
using WiFi Adapter as a WiFi HotSpot mode.
Use HC 06 bluetooth module.
and more.
Upvotes: 2