Conversation
|
I think there are some inconsistencies in this PR:
Furthermore, the PR adds Wouldn't it make sense to split this PR into separate PRs for the introduction of the Hope this helps to improve or assess the PR(s). |
python_cli/advertiser.py
Outdated
|
|
||
| global hw | ||
| hw = SniffleHW(args.serport) | ||
| hw = SniffleHW(args.serport,baudrate=args.baudrate) |
There was a problem hiding this comment.
Missing a space after the comma, after: ...(args.serport,
python_cli/scanner.py
Outdated
|
|
||
| global hw | ||
| hw = make_sniffle_hw(args.serport) | ||
| hw = make_sniffle_hw(serport=args.serport,baudrate=args.baudrate) |
There was a problem hiding this comment.
Missing a space after the comma, after: ...(args.serport,
|
Next to the above highlighted whitespace issues in the code, the changes proposed to |
python_cli/sniffle/resampler.py. Both numpy and scipy were already required. |
In fact, the README already states that the firmware differs in its baudrate depending which firmware was flashed:
|
README.md
Outdated
| -o OUTPUT, --output OUTPUT | ||
| PCAP output file name | ||
| -z, --zmq Enable ZMQ server | ||
| --zmqsetting Set ZMQ server ip and port (default:127.0.0.1:4222) |
There was a problem hiding this comment.
Adding a space after default: should make this more readable (and as it would be rendered in fact?): ... and port (default: 127.0.0.1:4222)
As I'm not using/needing this, I might not have been aware of this and may never have needed it. I will leave it to you and others to decide if it is clear (from the other documentation) what value should be used by someone that does need it and in which situation(s). Could Sniffle figure it out from the device using some FW version details? Hmm, perhaps it cannot reliably if there is a mismatch from the start and the communication doesn't work. Oh well, outside my level of use/understanding. |
This appears to have been addressed as well, as I didn't spot whitespace issues in |
|
Note that I just looked at the PR and reported my observations, I didn't try to run it at all... so it is just an eyeball review. I still wonder about the mixing of different topics into one PR, but will leave that to @sultanqasim to decide. |
python_cli/sniffle/sniffle_hw.py
Outdated
| elif is_cp2102(serport): | ||
| baud = 921600 | ||
| if baudrate is None: | ||
| baud = 921600 |
There was a problem hiding this comment.
I think this could be removed as part of a reversion to 2Mbaud everywhere as requested in #101 , and then just letting people use the new baudrate option this introduces if they want 921600.
There was a problem hiding this comment.
Without that, it isn't working with the current code, as other hw doesn't support 2Mbaud.
65098d8 to
5aa3972
Compare
|
Thanks for your contributions. Sorry for my delayed response, as I just had my first kid born and she has been keeping me busy :) I'll probably split these changes into a few commits for the different things in here (baud rate selection, mark and flush timeout, the ZeroMQ server, and cosmetic changes). I may skip the cosmetic changes and implement the mark and flush timeout a bit differently. |
Numpy and Scipy are not listed as dependencies in the README because they are only used for the experimental SDR-based sniffing functionality that I haven't yet documented and is very much an incomplete work-in-progress. You don't need Numpy or Scipy for the TI CC13xx/CC26xx based sniffer. |
|
Rebased to avoid conflict with #106 |
This adds a zmq server, baudrate config and json output support, enabling external decoders