Window Shopping Wireshark
I've taken apart a Canon Pixma MX340 multi-function inkjet and I want to reverse-engineer the communication data between its main board and its control panel. After making an attempt at articulating characteristics of a tool I want, I went online to see if such a thing existed.
When searching with keywords like "reverse-engineering", "communication protocol analysis", "data filtering" and such, one name keeps coming up: Wireshark. It is a very powerful piece of analysis software and something on my to-do list as a tool I want to add to my toolbox. It certainly has some capabilities I want. One example is being able to annotate raw data to give it context. If I've determined a particular two-byte command 0x04 0x75 means "put the screen to sleep", that translation can be automated so I don't have to recognize it and transform in my head. Wireshark also has extensive filtering capability, so I could exclude common high traffic data and focus on the interesting unique parts. Though there seems to be a bit of a caveat: Wireshark has two separate filtering mechanisms. A less powerful mechanism that runs on live data during capture, and an entirely separate and more powerful filtering mechanism for analyzing data after capture. For the type of filtering I wish for, Wireshark might only be capable of post-processing captured data.
Regardless of possible limitations Wireshark is not the right tool for my current project, because it is designed to analyze network traffic. Wired Ethernet, Wi-Fi, and so on. I tried to exclude Wireshark from my search by requiring "+serial" but Wireshark still comes up. It took some reading through Wireshark documentation to figure out why. It turns out Wireshark supports capturing and analyzing network traffic transmitted over asynchronous serial via point-to-point protocol (PPP) or its predecessor serial line internet protocol (SLIP). Neither of which is applicable to my MX340 project, but search engines don't know enough to understand that distinction. Oh well. I adjusted my query to explicitly exclude Wireshark from my results in order to see what else is out there.
As an aside, I was amused by this snippet:
Can you help me fill out this compliance form so that I can use Wireshark?
Please contact the Wireshark Foundation and they will be able to help you for a nominal fee.
Can you sign this legal agreement so that I can use Wireshark?
Please contact the Wireshark Foundation and they will be able to help you for a somewhat less nominal fee.
-- from Wireshark FAQ
This teardown ran far longer than I originally thought it would. Click here to rewind back to where this adventure started.