Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 1090|Reply: 0

Android USB Serial Communication with H5

[Copy link]

1

Threads

1

Posts

7

Credits

Novice

Rank: 1

Credits
7
Post time 2018-7-10 05:57:59 | Show all posts |Read mode
I'm trying to establish usb serial communication between an Orange Pi PC2 H5 running armbian and a samsung galaxy note 4. I'm configuring the micro USB port on the Orange Pi with libcomposite and opening up an acm port. On the android end I'm using a library by mik3y (https://github.com/mik3y/usb-serial-for-android) to establish the communication. The trouble that I'm running into getting Android drivers to support USB serial communication with the H5. I may just be just configuring the orange pi wrong. Here is the libcomposite setup script:

#!/bin/bash/
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir -p g1
cd g1
echo 0xa4ac > idProduct
echo 0x0525 > idVendor
echo 0x0100 > bcdDevice
echo 0x0200 > bcdUSB
mkdir -p strings/0x409
echo serial > strings/0x409/serialnumber
echo manufacturer > strings/0x409/manufacturer
echo product > strings/0x409/product
mkdir -p configs/c.1/strings/0x409
echo "Config 1: ECM network  > configs/c.1/strings/0x409/configuration
echo 250 > configs/c.1/MaxPower

mkdir -p functions/acm.usb0
ln -s functions/acm.usb0 configs/c.1/

ls /sys/class/udc > UDC

I used this guide to for the libcomposite setup (http://isticktoit.net/?p=1383). the mik3y usb serial drivers natively support FT232R, CDC/ACM serial services, and CP2102. I can't find any documentation detailing the H5 usb controller or drivers. is this even possible or would it be better to go with a external controller and run SPI communication over the GPIO pins. The only reason I'm not already doing that is I'm already using the SPI controller to control a custom made device. Thanks for any help!



You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-16 06:53 GMT+8 , Processed in 0.027396 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list