From bba3f4364218026c148b95969ac22a26c3713449 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 5 Aug 2024 10:27:34 -0400 Subject: [PATCH] Update rpitx.py changed hw: to plughw: --- rpitx.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rpitx.py b/rpitx.py index 55063053..cb942c57 100644 --- a/rpitx.py +++ b/rpitx.py @@ -386,7 +386,7 @@ if __name__ == "__main__": # output(pd, 1) # output (ptt, 0) # sleep(0.1) -# system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/morse.wav") +# system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/morse.wav") # sleep(0.1) # output (ptt, 1) # output(pd, 0) @@ -447,7 +447,7 @@ if __name__ == "__main__": sleep(0.1) # add delay before transmit output (ptt, 0) sleep(0.3) # add even more time at start - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/telem.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/telem.wav") sleep(0.2) # add more time at end output (ptt, 1) # output(pd, 0) @@ -498,7 +498,7 @@ if __name__ == "__main__": # output (pd, 1) sleep(0.3) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/morse.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/morse.wav") sleep(0.1) output (ptt, 1) # output (pd, 0) @@ -558,7 +558,7 @@ if __name__ == "__main__": if (txc): # output(pd, 1) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav") output (ptt, 1) # output(pd, 0) else: @@ -618,7 +618,7 @@ if __name__ == "__main__": if (txc): # output(pd, 1) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/camera_out.jpg.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/camera_out.jpg.wav") output(ptt, 1) # output (pd, 0) else: @@ -655,7 +655,7 @@ if __name__ == "__main__": if (txc): # output(pd, 1) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") output(ptt, 1) # output (pd, 0) else: @@ -691,7 +691,7 @@ if __name__ == "__main__": if (txc): # output(pd, 1) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") output(ptt, 1) # output (pd, 0) else: @@ -722,7 +722,7 @@ if __name__ == "__main__": if (txc): # output(pd, 1) output (ptt, 0) - system("aplay -D hw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv.wav") + system("aplay -D plughw:CARD=Device,DEV=0 /home/pi/CubeSatSim/sstv.wav") output(ptt, 1) # output (pd, 0) else: @@ -782,8 +782,8 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 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 plughw: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 plughw: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 &")