Hi Bernd, Jens, List, Am 06.08.2014 um 19:15 schrieb Bert Vermeulen: > We've long said that libsigrokdecode's protocol stack should end where > wireshark starts. Ethernet frames are a clear delimiter here, and indeed > this is where piping sigrok output into wireshark should start. > > The question for integration on this level has come up a few times, but > nobody's ever started work on it. We'd be happy to see it!
Great, I am happy to hear that. > Interfacing with wireshark would basically be the job of a libsigrok + > libsigrokdecode client. Get data from hardware, feed to SRD with a > SPI/nRF24L01 stack, and feed the output of that into wireshark. Where that > client lives is an interesting design decision -- either a separate program > that drives both the sigrok libs and wireshark, or as a wireshark plugin of > sorts. > > For a good idea on how to use SRD, take a look at the API: > > http://sigrok.org/api/libsigrokdecode/unstable/index.html > > And the source code of sigrok-cli, particularly decode.c and the parts of > main.c between #ifdef HAVE_SRD/#endif directives. > > You'll want the SRD_OUTPUT_BINARY output type. This is the raw protocol > decoder output (as opposed to annotated text). Am 06.08.2014 um 23:00 schrieb Jens Steinhauser: > Hi, > > You can write a protocol decoder that stacks on top of the existing SPI > decoder and dissects the commands to the ethernet controller. Protocol > decoders are written in Python, take the nrf24 decoder [1] as an example, the > working of your ethernet controller will probably be very similar (some setup > commands, write your own device's address into the chip, write transmission > payload, poll for incoming packets, read received payload). > > In your decoder, use the OUTPUT_BINARY decoder output [2] to output the > ethernet packets as PCAP when you encounter the read/write payload commands. > You should then be able to use sigrok-cli to save the PCAP file like this > (assuming your decoder is called 'enc28j60'): > > $ sigrok-cli <other options> -P spi,enc28j60 --protocol-decoder-binary > enc28j60 > capture.pcap > > Or, use one of the other methods described at [3] to do a live capture by > piping the output of sigrok-cli directly into wireshark. Alright. Does that means that I have to decide if I want to see the complete SPI traffic or to extract the Ethernet Packets to wireshark Or is it possible to have two output streams like that?: - one OUTPUT_BINARY - one OUTPUT_ANN Whenever a ethernet frame comes in I would put this into the binary stream, everything else and a reference to the output stream would go into the annotated output? Am 06.08.2014 um 19:15 schrieb Bert Vermeulen: >> [1] http://hackaday.com/2014/08/05/sniffing-nrf24l01-traffic-with-wireshark/ > That guy really, really needs a little FX2 board and > http://sigrok.org/wiki/Protocol_decoder:Nrf24l01 [Off Topic] Yes, but that would not help much - he sniffs the RF traffic. So he still needs some sort of master CPU to get the data out of the nrf24l01 module. [/Off Topic] Mit freundlichen Grüßen / Kind regards Christian Aurich -- Leiter Entwicklung / Chief Technical Officer I2SE GmbH Tel: +49 (0) 341 355667-00 Friedrich-Ebert-Str. 61 Fax: +49 (0) 341 355667-02 04109 Leipzig Germany Web: http://www.i2se.com/ Mail: [email protected] VAT No.: DE 811528334 Amtsgericht Leipzig HRB 23784 Geschäftsführer/CEO: Carsten Ziermann *** Diese E-Mail ist allein für den bezeichneten Adressaten bestimmt. Sie kann rechtlich vertrauliche Informationen enthalten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender per E-Mail und löschen Sie diese E-Mail von Ihrem Computer, ohne Kopien anzufertigen. Vielen Dank. *** *** This email is for the exclusive use of the addressee. It may contain legally privileged information. If you have received this message in error, please notify the sender by email immediately and delete the message from your computer without making any copies. Thank you. *** ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

