On 08/07/2014 08:31 AM, Christian Aurich wrote:> 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?

A decoder can have multiple outputs, so you can generate annotation output for 
all commands, and binary output only for the ethernet frames. That way you 
could use both sigrok-cli/PulseView to debug your SPI communication and 
Wireshark for the ethernet traffic.

MfG,
Jens

------------------------------------------------------------------------------
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

Reply via email to