The OTG device uses the ID pin in the plug to distinguish the A/B Device. The ID ground is referred to as the A-Device and acts as the USB Host. The A-Device always provides power to the bus. The ID floating is called the B-Device and acts as the USB Device. The USB Host/USB Device role of the device can be switched through HNP (Host Exchange Protocol). The OTG device cannot cross the USB Hub when it is connected. If it crosses the USB Hub, it will lose the HNP function. A-Device/B-Device is not necessarily related to USB Host/Device. After the host switches, A-Device becomes a USB slave but still supplies power to the bus.
2. USB-OTG slot typeAs Host Only : Provides standard A socket, ordinary USB Host with TPL (Supported Device List)
As Device Only: Can only be used as a peripheral device (separate into plug and plug cable)
OTG Dual : Use Micro AB socket to switch Host/Device during runtime.
OTG Dual will turn on the VBus after the plug is plugged in. If there is no device connection, close the VBus and enable ADP detection. EAs Host Only will not close the VBus again.
SRP Session Request Protocol:
The SRP protocol allows Adevice to save power consumption by cutting VBUS while the bus is in use. Any type of Adevice should be able to respond to SRP requests. Any Bdevice should also be able to initiate SRP requests.
ADP (Attach DetecTIon Protocol):
Provides detection of peer device insertion, supports any OTG device
HNP (Host NegoTIaTIon Protocol) Host Exchange Protocol:
The OTG device uses HNP to switch the role of Host/Device. Adevice judges whether to support HNP protocol by querying the OTG performance descriptor of Bdevice to determine whether Bdevice is a dual-purpose OTG device. If Bdevice supports HNP, Bdevice will return valid. The OTG performance descriptor, then Adevice generates a SetFeature command to tell Bdevice that you can work as a host when the bus is suspended. Adevice suspends the bus after sending the SetFeature command. After this session ends, Host returns to Adevice.
4. Equipment frameOTG descriptor
When the device enumerates, the A-Device requests the OTG descriptor from the B device through GetDeor. OTG descriptors should also be returned as part of GetConfiguraTIon(). Which bmAttributes indicates whether B-Device supports ADP/HNP/SRP
Standard device features, set by SetFeature().
B_hnp_enable
Setting this feature shows that the B-Device is allowed to perform HNP. The A device must suspend the bus within T(HOST_REQ_SUSP). This feature is cleared when the session ends.
A_hnp_support
For the compatibility of the OTG version, set this feature to indicate that the A-Device at the peer end of the B-Device supports HNP.
A_alt_hnp_support
The sign has been abandoned
5. Connection method (Host -> Device)As Host Only and B-device (with A plug) as peripheral only
The host detects the insertion of the A plug, stops the ADP, and opens the VBus. Because the A plug of the B-Device is integrated with the device, the B-Device must be connected to the A plug. The Host detects the peripheral connection and starts enumeration.
As Host Only and B-device only as a peripheral (A plug is a cable connection)
The Host section detects insertion of the A plug, stops the ADP, and opens the VBus. If the B-Device is connected to the cable, the entire connection process is the same as the above, because the B-Device may not have inserted the plug yet. The device connection times out, the VBus closes again, waits for the next ADP change (cable connection is complete), opens the VBus again, and normal bus enumeration starts.
OTG Device and OTG Device
When the host detects plug insertion, the VBus is turned on. If no peripheral device detects it, close the VBus, open the ADP Probing, and the Device detects that the plug is inserted. Then the SRP is enabled. If the cable is not inserted, the SRP times out and the Device starts. Perform ADP Probing. When the cable connection is complete, the Device detects the ADP change, sends an SRP request to the Host to open the VBus, the Host responds to the SRP, and opens the VBus to complete the device connection.
Wireless Charger Car Phone Holder
Wireless Charger Car Phone Holder,In Car Phone Holder Wireless Charger,Car Phone Holder And Charger,Phone Car Mount With Wireless Charger
Ningbo Luke Automotive Supplies Ltd. , https://www.car-phone-holder.com