forked from 4thel00z/pyhackrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
28 lines (18 loc) · 545 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from libhackrf import *
hackrf = HackRF()
hackrf.sample_rate = 20e6
hackrf.center_freq = 88.5e6
sn = hackrf.get_serial_no()
samples = hackrf.read_samples()
#result = libhackrf.hackrf_set_sample_rate(dev, 20e6)
#print "set sample rate = ", result
#
#result = libhackrf.hackrf_set_lna_gain(dev, 8)
#print "set lna gain = ", result
#
#result = libhackrf.hackrf_set_vga_gain(dev, 20)
#print "set vga gain = ", result
#
#result = libhackrf.hackrf_start_rx(dev, rx_callback, None)
#print "starting rx... = ", result
#libhackrf.hackrf_exit()