Comments (10)
Good idea, for long runs there are many situations in which there could be a glitch in the data coming in, for example I’ve seen intermittent cases of chunks of data being lost over USB CDC-ACM, especially during context switches when running inside a VM and under situations of high CPU load.
from sniffle.
OK, I thought it was because I had a mismatched firmware/software version, but I checked out v1.9.3 specifically and flashed the v1.9.3 release firmware and I'm still getting this error fairly frequently when I run with -q -a -e
:
Traceback (most recent call last):
File "/home/user/Sniffle/python_cli/sniff_receiver.py", line 203, in <module>
main()
File "/home/user/Sniffle/python_cli/sniff_receiver.py", line 161, in main
msg = hw.recv_and_decode()
File "/home/user/Sniffle/python_cli/sniffle_hw.py", line 334, in recv_and_decode
mtype, mbody, pkt = self._recv_msg()
File "/home/user/Sniffle/python_cli/sniffle_hw.py", line 305, in _recv_msg
word_cnt = data[0]
IndexError: index out of range
from sniffle.
Hmm, did 5cecf12 cause that for you? Does the error appear right at startup? The only way that can happen is if pkt
here is all whitespace or CRLF characters.
If you change this line to if len(pkt.strip()) < 4:
does that fix it?
from sniffle.
Try the latest master branch, hopefully that fixes this particular crash you reported.
from sniffle.
And this should improve general robustness: 87ac1bd
from sniffle.
The error is not currently occurring for me, but I'm also not physically where it was occurring, so I'm not subject to the same background packets. Once I'm back in the same location I'll let you know if it's still occurring (with the old, and then the new, code). Thank you.
from sniffle.
FWIW I left my sniffers (confirmed to be on 1.9.3) running overnight in a hotel last night (so I won't be able to replicate this in the future), and when I got up one of them had got basically the same error as the OP:
Traceback (most recent call last):
File "/home/test/Downloads/Sniffle/python_cli/sniff_receiver.py", line 203, in <module>
main()
File "/home/test/Downloads/Sniffle/python_cli/sniff_receiver.py", line 162, in main
print_message(msg, args.quiet)
File "/home/test/Downloads/Sniffle/python_cli/sniff_receiver.py", line 166, in print_message
print_packet(msg, quiet)
File "/home/test/Downloads/Sniffle/python_cli/sniff_receiver.py", line 173, in print_packet
dpkt = DPacketMessage.decode(pkt, hw.decoder_state)
File "/home/test/Downloads/Sniffle/python_cli/packet_decoder.py", line 81, in decode
dpkt = AdvertMessage.decode(pkt, dstate)
File "/home/test/Downloads/Sniffle/python_cli/packet_decoder.py", line 146, in decode
return tc(pkt)
File "/home/test/Downloads/Sniffle/python_cli/packet_decoder.py", line 310, in __init__
self.aa_conn = struct.unpack('<L', self.body[14:18])[0]
struct.error: unpack requires a buffer of 4 bytes
Top of the git log for conf:
commit 588e1638c352e95d62cbc48bfb1387731d58d06d (HEAD, tag: v1.9.3)
Author: Sultan Qasim Khan <>
Date: Wed May 8 12:31:36 2024 -0400
fw: Bump the revision
Nothing changed in firmware since v1.9.2, but this is so it matches the
overall release version.
from sniffle.
That should be fixed in the latest master branch; it will still work fine with the v1.9.3/v1.9.2 firmware.
from sniffle.
Ah, I didn't pay attention and realize the cited fix commit wasn't in 1.9.3. Thanks
from sniffle.
FYI I don't seem to be seeing any script-killing-crashes due to unpack errors anymore. I do see the occasional error still popping up, but it seems to be handled gracefully, so I'm closing this now until I find another script-killer. Thanks!
from sniffle.
Related Issues (20)
- active scan mode can not get connect_ind packet HOT 1
- Sonoff dongle error "XDS110 not found" HOT 14
- Full packet not written to pcap file HOT 4
- decoding packets in secure connection (le audio) HOT 2
- (Request) BT4 legacy and BT5 extended Remote ID sniffing HOT 41
- Please add support for Sonoff Zigbee 3.0 USB Dongle Plus V2 HOT 4
- (Question) Sniffle ubertooth-specan-ui port HOT 5
- Questions, Requests - Quiet parameter in Wireshark, Delta time column populated, Custom GATT dissection HOT 3
- Small efficiency improvement in the rbit24() utility function for CRC HOT 2
- Question: temporary-follow support? HOT 5
- 3 sniffers, all with -c 39, see slightly different packets HOT 12
- Catsniffer release hex HOT 1
- pcap storage of sent packets? HOT 16
- Trouble with receiving 2m and coded phy HOT 3
- Relay Attack HOT 6
- Ext cap not detected HOT 2
- initiator.py cannot connect target HOT 2
- AttributeError: module 'numpy' has no attribute 'typing' (rfnm)
- (device disconnected or multiple access on port?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sniffle.