The bin crate now has two features, one for each supported device.
* The IOCTL change from #142 is compiled in conditionally.
* Tp-link display is supported & tested for HW rev 3 and HW rev 5.
The release tarballs now contain two rayhunter-daemon binaries, for
orbic and tplink. An installer for tplink is not yet included.
Co-authored-by: m0veax <m0veax@chaospott.de>
Support -h and --help arguments.
Print a better error message when the Orbic device is not found.
Replace every panic! with anyhow::bail!
Replace .expect() with .context()?
Wraps all function returns with anyhow::Result
nusb is a pure Rust library providing the same low level access to USB devices
that rusb/libusb provide.
This commit removes rusb (and thus the dependence on libusb) and replaces it
with nusb in the serial utility.
The only functional change is that nusb does not support timeouts for bulk data
commands. nusb is async. This commit contains a naïve implementation that simply
blocks on bulk reads and writes in send_command().
Display the uname sysname and release as the OS option in the pcap Section
Header Block, falling back on just the std::env::consts::OS name ("linux") in
the case of runtime errors.
Co-authored-by: Nat Budin <natbudin@gmail.com>
Mixing async and sync I/O leads to a multitude of complications, and
generally speaking it's much more convenient to stick to one paradigm
or the other. Since axum (and many other HTTP servers) use async,
and since async is a convenient model for performing operations like
"handle an MPSC message or file read, whichever happens first", let's
commit to an async interface.
This crate's code is nearly entirely autogenerated using an ASN.1
parsing tool called hampi. The code in src/lte_rrc.rs shouldn't be
manually modified, and should only be regenerated using hampi (or a
similar tool).
Instead of reading/writing to a single QMDL file, we now can manage
a directory of several files, and have the ability to start/stop writing
to them on the fly.
This commit also adds graceful exiting to the server, so we can perform
cleanup steps when the server's exiting.
Add tools for launching a root shell on the device, and for sending
serial commands to the device. Extend the make.sh script to push those
and configure a root shell. Commands can now be executed as root via:
adb shell rootshell -c \"touch /tmp/test\"
allowing automatic configuration of the tooling.
This commit does a couple things:
1. breaks out the pcap streaming logic into its own module
2. bundles wavehunter/static files into the binary for easy distribution
3. serves those static files
4. serves dynamic json representing system and diag stats
I also threw together the world's ugliest website to display all this.
1. Main binary now parses a config toml and uses its paths for the
output pcap and qmdl files
2. Previously we were relying on DiagDeviceError for several things
that aren't a diag device. This modularizes that error in a way
that both improves the error descriptions, and also allows for
better separation of concerns.