-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtx.py
More file actions
54 lines (46 loc) · 1.05 KB
/
tx.py
File metadata and controls
54 lines (46 loc) · 1.05 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from time import sleep
from helper import reset
from helper import runCMD
#Fs = 62500 #7-17 Modems
Fs = 250000 #48-78 Modems
c = {}
############################
#### Variables ########
############################
modems = ['136']
c['131'] = ['200','1','3'] # threshold 1-4095 , gain , level
c['137'] = ['200','0','0']
c['138'] = ['1','0','0']
c['146'] = ['1','0','0']
c['239'] = ['1','0','3']
c['148'] = ['1','0','3']
c['149'] = ['1','0','3']
c['136'] = ['1','0','3']
c['163'] = ['1','0','0']
############################
#### Run the script ########
############################
# commands :
# stop
# config Threshold, gain, level
# tx [filename]
# tx ShortLFM
# tx LFM
# ref [filename]
# rx [samples] tmp/[filename]
for m in modems:
try:
reset('192.168.0.' + m)
except:
print("# Cannot connect to modem : " + m )
continue
#e.g. config 1 0 3
runCMD('config ' + ' '.join(c[m]) + '\n',m)
i=-1
#for ind in range(1):
while(1<100000):
i=i+1
print("transmission #" + str(i+1))
runCMD('tx TxChirp',m)
#runCMD('tx Sig',m)
sleep(1) # in seconds