Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = ["hardware-support"]
homepage = "https://github.com/newAM/hackrfone"

[dependencies]
rusb = "~0.9"
nusb = "0.2.1"

[dependencies.num-complex]
version = "~0.4"
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,29 @@
This is a rust API for the [HackRF One] software defined radio.

This is not a wrapper around `libhackrf`, this is a re-implementation of
`libhackrf` in rust, using the [rusb] `libusb` wrappers.
`libhackrf` in rust, using the [nusb] user-space rust library.


This is currently in an **experimental** state, and it is incomplete.
For full feature support use the official `libhackrf` C library.

This is tested only on Linux, but it will likely work on other platforms where
`libhackrf` works.

[rusb]: https://github.com/a1ien/rusb
## USB user-space access
Adapted from [nusb-linux-setup].
This is only needed if you want to run as non-root user, although the initial setup does require sudo.
1. ```shell
# Create a `udev` rule
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6089", MODE="0660", GROUP="hackrfone"' | sudo tee /etc/udev/rules.d/99-hackrfone-usb.rules
```
2. ```shell
# Add current user to group
sudo groupadd hackrfone
sudo usermod -aG hackrfone $USER
```
3. Best to restart the system now so new group shows up and device is mapped correctly

[nusb]: https://github.com/kevinmehall/nusb
[nusb-linux-setup]: https://docs.rs/nusb/latest/nusb/index.html#linux
[HackRF One]: https://greatscottgadgets.com/hackrf/one/
Loading