Friday, 15 August 2014

What's the hardware and software detect mechanism of the cellphone Micro USB devices attached and detached?


What's the hardware and software detect mechanism of the Android cellphone Micro USB devices attached and detached?


schematic


simulate this circuit – Schematic created using CircuitLab



  • Hardware Schematic hardware sch



Fig1 is my application draft, and more details are as follows:



  1. My cellphone support OTG function and is enabled

  2. As the picture says, my device has connected the ID pin to the ground in order to get the power of 5V.

  3. I connect the D- pin to 5V so that it tells the phone this is a low-speed device.


  4. I have an APP installed on my phone to supervise if there is a device plugged in.



    My device is a non-standard USB device, I don't use the D+/D- pin to communicate with the phone






In my point of view, as soon as the device plugged in, firstly the ID pin of the micro USB receptacle get a falling edge and thus tell the phone there is a device plugin and the device is working as a HOST.


so, anybody familiar with the process of the detect?


I upload the PCB board photo so you can see clearly about my situation. the PCB board



update : I have measured the output of VBUS when I insert the device, and the VBUS=5V, also as a power indicator a LED is mounted on the PCB, it works well.



Ultimate question: If my hardware connect is right? and then can somebody give me some instructions about the software code?





No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...