Hey Craig,
as you can tell if you've spent some time on this thread I've spent a lot of energy on listen mode. And for me the end result is that listen mode is so broken on the SX1231H that it can't be used as is.
I haven't come to this conclusion lightly. I've developed workarounds for most of the first order bugs. But with listen mode the chip just becomes increasingly less functional as you apply the workarounds. I've also contacted Semtech and talked to a representative. But the more detailed my questions became the less inclined he became to find answers
.
The issues are subtle - everything will seem fine but after a week your first node drops off. Or everything runs fine for months but when you have a loud noise signal your radios will wake up and never go to sleep again, draining the battery. It just depends on how many levels of workarounds you already have implemented.
So here's my current assessment: the only reliable way to make use of listen mode is to set RSSI thresh to 0 so it never triggers and just use the PllLock irqs as wakeup timer. That only gives you a cheap and imprecise clock, but you can implement your own listen mode on top. I have listen mode as timer running on maybe 20 nodes around the clock. It never fails.
Here's what I've come up with as listen mode replacement. It has the added benefit of using only standard radio features - none of the hacks I had used earlier (e.g the uninterrupted stream of wake-up packets):
- Client uses listen mode as wakeup timer to wake up every n ms and switches the radio to RX using a given RSSI thresh. Wait for 2 bits and see if the RSSI irq triggers.
- Server switches the radio to TX when trying to wakeup a client. Staying in TX for > n ms sends a stream of preamble which the client detects via RSSI.
- Server then puts radio into standby and waits a couple of ms. Finally sends real payload.
- Client probes for the server to stop sending preamble by detecting RSSI every m ms.
- When preamble no longer sent client switches to RX and receives packet.
This works well.
You'll have to actively manage RSSI thresh for this to work. Just keep slowly lowering the thresh until you get ghost RSSI detects and then quickly dial up.
Regardless of the listen mode configuration I see a significant drops in range. I am using the low power version and I see around 120m when purely in RX mode, however when going into Listen I struggle to get above 70m.
The radio needs to see the full packet with enough preamble. I don't know what your wake-up packets look like - but you'll need to take that into account. I initially used an uninterrupted stream of packets, ensuring that if RX starts mid packet RSSI would be detected and the next packet received. Another approach would be one packet with a really long preamble - however keeping the receiver longer in RX. I think the approach above combines the best of both methods.
Joe