diff --git a/start_rx_headless.sh b/start_rx_headless.sh index db9c71b..3633365 100755 --- a/start_rx_headless.sh +++ b/start_rx_headless.sh @@ -18,7 +18,7 @@ MYCALL=CHANGEME # Wenet Transmission Centre Frequency: # Default Wenet Frequency, as used on most Project Horus flights. -RXFREQ=443500000 +RXFREQ=441200000 # Secondary downlink frequency, used on dual-launch flights #RXFREQ=443500000 @@ -34,7 +34,7 @@ BIAS=0 # building the rtl-sdr utils from this repo: https://github.com/rtlsdrblog/rtl-sdr # drs232_ldpc (traditional) or wenet_ldpc (wenet v2) -FRAMING_MODE=wenet_ldpc +FRAMING_MODE=drs232_ldpc # Change the following path as appropriate. # If running this from a .desktop file, you may need to set an absolute path here @@ -69,11 +69,11 @@ RX_FLOW=IQ # # Modem Settings - Don't adjust these unless you really need to! # -# TODO change back to traditional settings -BAUD_RATE=96000 # Baud rate, in symbols/second. -OVERSAMPLING=10 # FSK Demod Oversampling rate. Not used in GQRX mode. +BAUD_RATE=115177 # Baud rate, in symbols/second. +OVERSAMPLING=8 # FSK Demod Oversampling rate. Not used in GQRX mode. # Known-Working Modem Settings: # 115177 baud (Pi Zero W @ '115200' baud), 8x oversampling. +# 96000 baud (i2S wenet v2), 10x oversampling # 9600 baud, 100x oversampling. # 4800 baud, 200x oversampling. #BAUD_RATE=4800 diff --git a/tx/PacketTX.py b/tx/PacketTX.py index 9003b4f..c486ee7 100644 --- a/tx/PacketTX.py +++ b/tx/PacketTX.py @@ -161,7 +161,10 @@ class PacketTX(object): self.radio.transmit_packet(packet) else: self.radio.transmit_packet(self.idle_message) - time.sleep(0.1) + # time.sleep(0.1) + # commented this out as we should probably always be sending something + # this can cause gaps in i2s, which while won't hurt the performance can be annoying + # as the stream starts and stops print("Closing Thread") self.radio.shutdown() diff --git a/tx/radio_wrappers.py b/tx/radio_wrappers.py index a8ecb76..d6d9668 100644 --- a/tx/radio_wrappers.py +++ b/tx/radio_wrappers.py @@ -96,9 +96,12 @@ class RFM98W(object): deviation = 4800 elif self.baudrate == 4800: deviation = 2400 - else: + elif self.baudrate in [115177,115200]: # Default deviation, for 115200 baud + # The origin of this number is unknown deviation = 71797 + else: + deviation = self.baudrate//2 # Refer https://cdn.sparkfun.com/assets/learn_tutorials/8/0/4/RFM95_96_97_98W.pdf self.lora.set_register(0x01,0x00) # FSK Sleep Mode @@ -320,12 +323,8 @@ class RFM98W_I2S(RFM98W): raise ValueError("Baudrate not suitable for soundcard.") - # fixed baudrate for the moment super().__init__(spidevice,frequency,baudrate,tx_power_dbm,reinit_count,led=5) # can't use 21 for LED as I2S is there - - - if ( ((self.audio_rate * self.channels * self.audio_width * 8) / self.baudrate)%8 !=0