cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S bootloader Wireshark Dissector?

papadeltasierra
Associate III

I am using the STM8S bootloader via a USB/FTDI.  I can use Wireshark/USBpcap and catch the exchanges and I have a somewhat happy "export packets, parse with Python" method of looking at the exchange.

But has anyone already written a proper Wireshark dissector for this?

2 REPLIES 2
Uwe Bonnes
Principal III

It seems, STM8 has no DFU bootloader. So I understand you that you have a serial to USB converter in between STM8 and PC and you want to spy on the USB side? Why dont you spy on the serial lines? Did you have a look at STM8 Flash loader demonstrator (UM0462,AN2606 and  AN3155))? Protocoll seem similar to STM32 serial bootloader. Maybe stm32flash can be modified? What are you trying to achieve anyways?

I have already implemented the bootloader for an stm8s but the uploading a new app failed.  By catching the exchange between the flasher and bootloader using Wireshark/USBpcap, exporting the frames and then writing a quick-n-dirty python script I was able to see that it is the "write" operation failing.

Of course I could capture the data by getting more hardware and monitoring the serial lines instead of the USB traffic, and then writing a custom capture tool and dissector but it I'm going to go to that trouble I figured why not just use existing tools and write a Wireshark dissector directly since Wireshark/USBpcap can already monitor the flows for me.

But of course if someone else has already written the Wireshark dissector, I would not need to even write a Wireshark dissector :-).