What's the hardware and software detect mechanism of the Android cellphone Micro USB devices attached and detached?
simulate this circuit – Schematic created using CircuitLab
Fig1 is my application draft, and more details are as follows:
- My cellphone support OTG function and is enabled
- As the picture says, my device has connected the ID pin to the ground in order to get the power of 5V.
- I connect the D- pin to 5V so that it tells the phone this is a low-speed device.
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.
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