I am looking for someone having experience in usb dual role functionality.
Let me explain you use case:
1. Connect iPhone to your linux box
2. Now your iPhone is usb Device and linux box is a usb host.
3. Send a command to iPhone using libusb which will change iPhone usb to usb host.
It is called role switch.
4. Now you have to change linux box as usb device exposing some endpoint.
So you have to do a role switch on linux side.
The question is step 4. How to convert host to usb device at run time without disconnecting the iphone.
This functionality is called dual role usb.