Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in theme_table() (line 1998 of /data/sigrok.org/apache/blog/includes/theme.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in theme_table() (line 2061 of /data/sigrok.org/apache/blog/includes/theme.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /data/sigrok.org/apache/blog/includes/common.inc).

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!