Conversation
Serial pcap stream
removed info
Fix button
Make live log pcaps instead of hex
fixed missing byte issue
Decouple log and live
Author
|
Any thoughts on this? |
ianwhitfield
pushed a commit
that referenced
this pull request
Apr 12, 2026
…ake-2 nrf52 watchdog (attempt #2)
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
…ake-2 nrf52 watchdog (attempt exploiteers#2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤝 Attestations
How to use
The following instructions work on Kali. I welcome people's help figuring out how to route serial to Wireshark on other OSes.
To save the live output of serial to a file:
dmesg | grep tty. You may need to unplug and plug back in to see the most recent one.socat -u FILE:/dev/tty<your path>,b9600,raw,echo=0 OPEN:output.pcap,creat,appendSerialto start loggingCtrl-Cto stopsocatat any timeTo view the live output of serial in Wireshark:
dmesg | grep tty. You may need to unplug and plug back in to see the most recent one.mkfifo /tmp/serialpipewireshark -k -i /tmp/serialpipesocat -u FILE:<your path>,b9600,raw,echo=0 OPEN:/tmp/serialpipe,creatSerialto start loggingMake sure you open Wireshark and run
socatbefore you start Live Capturing. Otherwise, Wireshark will give you an error about "Magic bytes". If anything happens to your capture, you will need to close Wireshark and stop the Serial capture, and then restart from Step 4.Notes on code changes made:
When the pcap window on the pager UI is opened, all other logging to the serial console ceases. If you wanted to save the serial console to a file (or tell Wireshark that the following bytes are packets), you'll need a magic byte at the beginning, which is sent when the live Serial capture starts. But if you had other logging still on, then your pcap would be full of nonsense.
Making sure that logging ceased while the pcap UI window was open (and if you exit the window but continue logging) required a lot of (possibly inelegant) "if not logging to serial" statements. I apologize: this is my first time writing in C++, so I welcome any constructive criticism on how to make my code better. I have tested the code in many ways and found lots of bugs that I fixed, but more testing is always welcome.
I changed the Info button to the "Serial" button. And what was previously called "Start" is now called "SD Card". I'm sure there are better names for those, please feel free to change these to something more intuitive, but this is all I could think that would fit in the button.
Do NOT use
screenDo not use
screento display the output. Screen reacts to some characters as “control characters”. Notably the integer 15, which is 0x0F in hex, will not be displayed as 0F but instead tells screen to “delete the last character”. One of the fields, a header length, happens to be equal to 15, so every packet will be malformed if you use screen.