diff --git a/uplink/modulate_hackrf_hex.py b/uplink/modulate_hackrf_hex.py index bdf1f6f..56c1a38 100755 --- a/uplink/modulate_hackrf_hex.py +++ b/uplink/modulate_hackrf_hex.py @@ -37,6 +37,8 @@ baseband = baseband + [1 if phase else -1] phase = phase if bit == "1" else not phase +baseband.extend([0] * int(0.5 * BAUDRATE)) + # write complete signal to hackrf RAW I/Q file: # * Repeat bits int(SAMPLERATE / BAUDRATE) times to achieve sample rate # * Hack: Set I and Q to always be the same value by multiplying by "2" diff --git a/uplink/modulate_hackrf_hex_multiplex.py b/uplink/modulate_hackrf_hex_multiplex.py index 0ed4479..bf7214e 100755 --- a/uplink/modulate_hackrf_hex_multiplex.py +++ b/uplink/modulate_hackrf_hex_multiplex.py @@ -12,7 +12,7 @@ SAMPLERATE = 2000000 BAUDRATE = 100 -MPX_FREQ_OFFSET = 10000 +MPX_FREQ_OFFSET = 50000 OUTFILE = "/tmp/hackrf_transmission_REPLACE.raw" @@ -57,6 +57,8 @@ # differential modulation: 180° phase shift if "1" phase = phase if binstring[bit] == "1" else -phase +np.append(baseband, np.zeros(int(0.5 * BAUDRATE))) + # write complete signal to hackrf RAW I/Q file print("Quantizing...") iqsignal = np.int8(np.real(baseband) * 127)