Skip to content

Commit

Permalink
Improve HEX uplink command reliability
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeija committed Dec 16, 2018
1 parent dc2c154 commit bbbe4e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions uplink/modulate_hackrf_hex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion uplink/modulate_hackrf_hex_multiplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

SAMPLERATE = 2000000
BAUDRATE = 100
MPX_FREQ_OFFSET = 10000
MPX_FREQ_OFFSET = 50000

OUTFILE = "/tmp/hackrf_transmission_REPLACE.raw"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bbbe4e5

Please sign in to comment.