Merge pull request #330 from alanbjohnston/beta-extra-4

Repeater mode starting to work
beta-extra
Alan Johnston 1 year ago committed by GitHub
commit e47d4f99b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -763,7 +763,7 @@ if __name__ == "__main__":
# print(txLed)
# print(txLedOn)
sleep(4.2)
elif (mode == 'e'):
elif (mode == 'e'): # code based on https://zr6aic.blogspot.com/2016/11/creating-2m-fm-repeater-with-raspberry.html
print("Repeater")
print("Stopping command and control")
system("sudo systemctl stop command")
@ -779,7 +779,10 @@ if __name__ == "__main__":
GPIO.setup(txLed, GPIO.OUT)
output(txLed, txLedOn)
# system("arecord -D hw:CARD=Device,DEV=0 | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &")
system("arecord -D hw:CARD=Device,DEV=0 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &")
## system("arecord -D hw:CARD=Device,DEV=0 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &")
system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &")
sleep(1)
system("sudo arecord -D plughw:1 -r48000 -fS16_LE -c1 | nc localhost 8011 &")
GPIO.output(powerPin, 1)
sleep(1)
GPIO.output(powerPin, 0)
@ -787,7 +790,9 @@ if __name__ == "__main__":
sleep(1)
print("No carrier detected, stopping repeater")
output(txLed, txLedOff)
system("sudo killall -9 arecord")
system("sudo killall -9 arecord")
system("sudo killall -9 nc")
system("sudo killall -9 rpitx")
else:
print("FSK")

Loading…
Cancel
Save

Powered by TurnKey Linux.