Author Topic: USB OTG device Communication  (Read 1809 times)

0 Members and 1 Guest are viewing this topic.

Offline PeiliTopic starter

  • Regular Contributor
  • *
  • Posts: 108
  • Country: in
USB OTG device Communication
« on: October 30, 2019, 05:13:41 am »
Hi,
A device that sits between the PC and USB Printer  thus capturing all the data that has been pushed to printer . PC shall assume the device  to be the printer and hence push the data , which will further push the data to the connected printer.
I have tried with OrangePi zero over USB OTG device. Now my pc detects OrangePi zero as g_printer and i could initiate print to this. But i cannot capture anything at the OTG side. I cannot read printer status of g_printer.
How can i trouble shoot to identify the communication?
I have just followed this  https://www.kernel.org/doc/Documentation/usb/gadget_printer.txt
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: USB OTG device Communication
« Reply #1 on: October 30, 2019, 09:37:14 pm »
It sounds like you are trying to build your own USB protocol analyser.

Have you tried Wireshark with a usb plug in to capture the usb traffic before it leaves the pc?
 

Offline PeiliTopic starter

  • Regular Contributor
  • *
  • Posts: 108
  • Country: in
Re: USB OTG device Communication
« Reply #2 on: November 02, 2019, 04:46:56 am »
Yes.. i tried with Wireshark to capture my USB packet.. I'm attaching the USB packet when i gave a print to the 'G_printer' Gadget. Attaching the screen shots of gadget to hat and host to gadget
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf