Repository navigation
radio sniff --check, analyze --against, session verdict - #9
Merged
Merged
Conversation
- sniff --check [COMPORT]: once the trace is running, open the radio's port for a moment (nothing is sent) and look for its serial channel opening in the trace. When it is not there, say why: the sniffer passed on nothing, data packets but no channel (Full Packet Logging), or the data went to another device. It cannot see Full Packet Logging itself, and says so. - sniff, relay and analyze say whether a session looks like a read (the radio sent a personality), a write (RPM sent one) or neither, with the Full Packet Logging hint for neither. - The trace report names links to other devices it left out. - replay sets DTR/RTS as RPM had them at its first request (the last line event before it), not from the first event: a check's port, or RPM setting its lines after opening the port, came first.
- analyze --against FILE lines a .PRS that RPM saved up with a capture: how much of it is in the radio's answers (and in RPM's requests, where a write carries it), in order and in how many pieces, the piece sizes, and the bytes between the pieces - the framing, when the radio sends the personality in packets. It goes on nearby where it can and resyncs on a varied run after a missing packet, a byte RPM's copy has differently or a long stretch of other traffic; parts of the file not found are listed. - analyze --extract wrote over an existing file, which could be the .PRS RPM saved; it now takes the next free name, as captures do.
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.
Groundwork for reading the XG-100P without RPM: a capture that is right the first time, and a way to see the protocol's framing as soon as one exists.
radio sniff --check [COMPORT]Once the Bluetooth trace is running,
sniffopens the radio's port for a moment and sends nothing. Opening the port makes Windows open an RFCOMM channel to the radio, so the trace should show the channel opening. When it doesn't,sniffsays why:It cannot tell whether Full Packet Logging is on, because only large packets need it, and it says so.
Session verdict
sniff,relayandanalyzesay what a session looks like:The trace report also names links to other devices that it left out.
radio analyze --against FILELines up a .PRS that RPM saved from the same radio with the capture: the radio's answers, plus RPM's requests when a write carries the personality. It shows:
When the radio sends the personality in packets, each piece is one packet's data and the bytes between two pieces are the framing.
How it lines up:
On a real 46 KB personality, in packets of 128 to 1000 bytes with zero-heavy headers and random traffic between packets, it finds every byte and every 6-byte gap, in under 20 ms. With two packets dropped it reports exactly what is missing, except with 128-byte packets, where packets of zeros alone cannot be placed.
Fixes
analyze --extract FILEwrote over FILE when it existed, and that could be the .PRS RPM saved for the same session. It now takes the next free name, as captures do.replaytakes DTR/RTS from the last line event before RPM's first request, not from the first event in the capture. The ports opened by--check, and RPM setting its lines after opening its port, both come before that request.Tests