Skip to content

Commit f8e8f85

Browse files
committed
updated
1 parent 11e4e8d commit f8e8f85

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

README.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ python setup.py build_ext --inplace.
1818
```
1919
If the build fails, you will need to specify the paths for the libusb library.
2020
```
21-
CFLAGS="-I/path to libusb.h /libusb-1.0" \
22-
LDFLAGS="-L/path to libusb-1.0.so /lib" \
21+
CFLAGS="-I/path to libusb.h" \
22+
LDFLAGS="-L/path to libusb-1.0.so" \
2323
python setup.py build_ext --inplace
2424
```
2525
## Requirements:
2626
* libusb-1.0 (https://github.com/libusb/libusb)
2727
* Cython==0.29.36
2828
* Numpy>=1.26
2929
* Scipy (optional, for faster work)
30+
* pyFFTW (optional, for faster work)
3031

3132
## hackrf:
3233
Almost all the functionality of the standard library is implemented. Some features will be added later. (operacake).
@@ -43,17 +44,18 @@ Almost all the functionality of the standard library is implemented. Some featur
4344

4445
## usage
4546
```
46-
usage: python_hackrf [-h] {info, sweep} ...
47+
usage: python_hackrf [-h] {info, sweep, operacake} ...
4748
4849
python_hackrf is a Python wrapper for libhackrf and hackrf-tools.
4950
5051
options:
51-
-h, --help show this help message and exit
52+
-h, --help show this help message and exit
5253
5354
Available commands:
54-
{info,sweep}
55-
info Read device information from HackRF such as serial number and firmware version.
56-
sweep a command-line spectrum analyzer.
55+
{info,operacake,sweep}
56+
info Read device information from HackRF such as serial number and firmware version.
57+
operacake Specify either list, mode, or GPIO test option.
58+
sweep a command-line spectrum analyzer.
5759
```
5860
```
5961
usage: python_hackrf info [-h] [-f] [-s]
@@ -70,19 +72,38 @@ options:
7072
-h, --help show this help message and exit
7173
-d serial_number. serial number of desired HackRF
7274
-a amp_enable. RX RF amplifier. If specified = Enable
73-
-f freq_min:freq_max. minimum and maximum frequencies in MHz srart:stop or start1:stop1,start2:stop2 (MAX_SWEEP_RANGES = 10)
75+
-f freq_min:freq_max. minimum and maximum frequencies in MHz start:stop or start1:stop1,start2:stop2 (MAX_SWEEP_RANGES = 10)
7476
-p antenna_enable. Antenna port power. If specified = Enable
75-
-l gain_db. RX LNA (IF) gain, 0-40dB, 8dB steps
76-
-g gain_db. RX VGA (baseband) gain, 0-62dB, 2dB steps
77-
-w bin_width. FFT bin width (frequency resolution) in Hz, 245-5000000 Depends on sample rate min= sample rate * 1e6 / 8180, max = sample_rate * 1e6 / 4
77+
-l gain_db. RX LNA (IF) gain, 0 - 40dB, 8dB steps
78+
-g gain_db. RX VGA (baseband) gain, 0 - 62dB, 2dB steps
79+
-w bin_width. FFT bin width (frequency resolution) in Hz, 245-5000000 Depends on sample rate min= sample rate * 1e6 / 8180, max = sample_rate
80+
* 1e6 / 4
7881
-1 one shot mode. If specified = Enable
7982
-N num_sweeps. Number of sweeps to perform
8083
-B binary output. If specified = Enable
8184
-s sweep style ("L" - LINEAR, "I" - INTERLEAVED). Default is INTERLEAVED
82-
-SR sample rate (2, 4, 6, 8, 10, 12, 14, 16, 18, 20). Default is 20
83-
-BF baseband filter (1.75, 2.5, 3.5, 5.0, 5.5, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 15.0 20.0, 24.0, 28.0). Default is 15.0
85+
-SR sample rate in Hz (2, 4, 6, 8, 10, 12, 14, 16, 18, 20). Default is 20000000
86+
-BF baseband filter bandwidth in Hz (1.75, 2.5, 3.5, 5.0, 5.5, 6.0, 7.0, 8.0, 9.0, 10.0, 12.0, 14.0, 15.0 20.0, 24.0, 28.0). Default is
87+
15000000
8488
-r filename. output file
8589
```
90+
```
91+
usage: python_hackrf operacake [-h] [-d] [-o] [-m] [-a] [-b] [-f] [-t] [-w] [-l] [-g]
92+
93+
options:
94+
-h, --help show this help message and exit
95+
-d serial_number. serial number of desired HackRF
96+
-o , --address specify a particular Opera Cake by address. Default is 0
97+
-m , --mode specify switching mode [options: manual, frequency, time]
98+
-a set port connected to port A0
99+
-b set port connected to port B0
100+
-f <port:min:max> or <port:min:max>,<port:min:max> automatically assign <port> for range <min:max> in MHz.
101+
-t <port:dwell> or <port:dwell>,<port:dwell> in time mode, dwell on <port> for <dwell> samples. Specify only <port> to use the default
102+
dwell time (with -w).
103+
-w set default dwell time in samples for time mode
104+
-l, --list list available Opera Cake boards
105+
-g, --gpio_test test GPIO functionality of an Opera Cake
106+
```
86107
## Note
87108
This library can work on android. To do this, go to the android directory and download two recipes for p4a.
88109
## Examples

0 commit comments

Comments
 (0)