Knowledge Base

Problem configuring OOK mode


I'm able to get two SX1272s to communicate over FSK using the SX1272PingPong example, but when I try to change to OOK they aren't receiving each other's messages.

I've kept the example code identical other than adding in this line under "case MODEM_FSK" in "SetModem", in the "sx1272.cpp" library file:


It seems like this is all that's needed to go from FSK to OOK mode (keeping all other params / registers the same as what was set through the example FSK code).

What am I missing to enable OOK?

Thank you,
File Attachments  (File Size: 8KB - Downloads: 178)
The SX1232 DS provides more details on configuring the RX for OOK modulation and since these FSK / OOK demodulator stages are common I would refer to this DS, especially wrt to optimizing the floor threshold ("digital squelch").

It is recommended the floor threshold is set using a signal generator as the source, generating a OOK modulated waveform of the required BR (or symbol rate should Manchester Encoding be required, ensuring the correct OOK threshold type is selected - "01" for NRZ and "10" for Manchester). Using a preamble signal or known pattern makes it easier to detect the correctly demodulated signal has been received.

With the signal generator RF output off, and with the SX1272 in Continuous mode and BR, RxBw and DCFree / Manchester configured as required, adjust OokFixedThreshold until a steady (Low) state is detected at DIO2. It may be necessary to cycle RX mode during this process. Finally enable the signal generator and with the wanted signal level (say) 3 dB above sensitivity threshold, monitor DIO1 (DCLK) and DIO2 (DATA) to ensure the correct waveform is detected.

Semtech Support