P
P
pixik2015-07-15 15:46:02
Android
pixik, 2015-07-15 15:46:02

How to exchange data between Arduino board and Anrdoid phone via OTG USB as through COM port?

Hello!
It is necessary to carry out two-way data transfer from the Anrdoid phone and Arduino with a scarf. I found an Arduino ADK board that can do this. But I don't want to buy another board. Maybe using some libraries on the phone side, you can simulate COM to USB, so that by connecting Phone <--> OTG cable <--> Arduino board they can communicate as if 2 devices are connected via COM?
Thanks to all!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2015-07-15
@pixik

Android 4.x (API 15+) has functions for working directly with USB - a Java application acts as a driver - the market is full of such programs, there are even open source ones.
www.java2s.com/Open-Source/Android_Free_Code/Devel...

A
Ai Lab, 2015-07-15
@vpuhoff

if OTG works (not a fact), if the android has all the necessary drivers and kernel modules (not a fact), then you can read and write to the COM port without any problems, it is visible there as a regular file, reading and writing, respectively, as in a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question