New protocol decoder: USB request
libsigrokdecode has received support for another, quite interesting protocol decoder recently: usb_request.
This PD stacks on top of the usb_packet decoder, which in turn stacks on top of usb_signalling.
It decodes USB transactions / requests from the packets received from the usb_packet decoder:
$ sigrok-cli -i olimex_stm32-h103_usb_hid.sr \ -P usb_signalling:dp=DP:dm=DM,usb_packet,\ usb_request BULK in: [ 00 01 00 00 ] : ACK BULK in: [ 00 01 00 00 ] : ACK BULK in: [ 00 01 00 00 ] : ACK
As usual, there are a bunch of sample files in sigrok-dumps, and some test-cases in the sigrok-test repo. Further files and test-cases are welcome!
In addition to emitting annotations (for displaying in GUIs), the PD also supports (currently) one SRD_OUTPUT_BINARY output type named "pcap".
This will emit the decoded data in the widely-used PCAP format, which you can then further process in other tools such as Wireshark:
$ sigrok-cli -i olimex_stm32-h103_usb_hid.sr -P usb_signalling:dp=DP:dm=DM,usb_packet,\ usb_request -B usb_request=pcap > foo.pcap
Of course you could also pipe the PCAP data directly into Wireshark as well:
$ sigrok-cli -i olimex_stm32-h103_usb_hid.sr -P usb_signalling:dp=DP:dm=DM,usb_packet,\ usb_request -B usb_request=pcap | wireshark -k -i -
The protocol decoder was contributed by Stefan Brüns, thanks a lot!
- Uwe Hermann's blog
- 9216 reads