Closed miri64 closed 6 years ago
@cgundogan are you still planning to test?
@cgundogan are you still planning to test?
@miri64 nope:
% ./sniffer.py serial /dev/ttyACM1 500000 17 | wireshark-gtk -k -i -
Traceback (most recent call last):
File "./sniffer.py", line 171, in <module>
main(sys.argv)
File "./sniffer.py", line 149, in main
configure_interface(conn, int(argv[4]))
File "./sniffer.py", line 63, in configure_interface
match = re.search(r'^Iface +(\d+)', line.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 2: invalid start byte
It probably is just a config error somewhere on my side, @pyropeter do you want to test? It seems to work for you.
I will test this.
By the way: I got the same error as @cgundogan until I lowered the baud rate to 115200
.
Looks like the sniffer script needs better input sanitation for when there are garbage characters in the stream.
Yeah... the LQI isn't even parsed by the script, so this PR shouldn't make the problem (and it doesn't make sense to test this PR with that script either then ;-)).
(as a "try to get it to fail" test, yes, but not as functionality test. There it is enough if with make term
is shown as a hex value now ;-))
@cgundogan @pyropeter @gebart but regarding input sanitation: have a look at #35
This seems to work. The output shows some values as LQI, and wireshark still shows the traffic.
@pyropeter thanks a bunch!
To add LQI information to the packet dump, we should wait for https://github.com/pcapng/pcapng/issues/48
Question is, if developments to PCAPNG are backported to PCAP ;-)
Since the device is in raw mode, we don't have any network layer modules included and we subscribe to
GNRC_NETTYPE_UNDEF
it is safe to assume thatpkt->next
indump_pkt()
is thegnrc_netif
header. This only contains GNRC-internal information and should thus be removed from the dump (though Wireshark seems to be okay with the extra bytes, a reader of the raw data might be confused).Since this header however contains the LQI, which the sniffer claims to output but always returns 0, the LQI value in the
gnrc_netif
header is read and set before the deletion of that header.