Author Topic: Using USB for data transfer without 'Accessory Mode'  (Read 552 times)

0 Members and 1 Guest are viewing this topic.

Using USB for data transfer without 'Accessory Mode'

« on: March 02, 2015, 12:53:10 AM »
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Acanevaex

    Posts: 2
    User Rating: +0/-0
    • *
    • Jr. Member
    Hi Im currently working with a Samsung Replenish and an Arduino with attached wifi/usb shield and Im trying to get some data exchange going on between the two. I can plug the Replenish into the usb host on the shield and the linux on the shield recognizes the phone, I can use lsusb and lsusb -v to see the phone, also seeing the changes between the different usb modes on the phone. SO Ive been able to get some kind of connection to happen from the linux side, I can find an in/out endpoint for the phone and my python code for usb reports it successfully wrote whatever data I write to the endpoint.

    Google says you are suppose to make a control request to get the phone into accessory mode and the rom Im using wont respond to the control request properly. Ive used the same code to get a response from my LG Exceed. but, the Replenish simply will not respond properly in any usb mode. In tether mode I can get a the endpoints and write, other modes fail.

    My plan is to have the Replenish attached to the arduino as a sort of security device, arduino senses motion, sends small data signal to app on phone to take a picture and/or video.

    My question is this, does someone know if its possible to get data transfer happening without accessory mode?
    Can an App check for data on USB without an 'accessory attached'? If I run a thread constantly watching USB can the App see that? And is there some way of getting the lsusb command into the android terminal?

    Im working on the app right now so any help/advice or points in the right direction are appreciated.
    • Stock
    • LG Opt Exceed II
    • Stock
    • Stock-Rooted