-
Working to move some LoRa (P2P) code from RadioHead. The equipment I am working with uses implicit header mode with SF 6. The payload length is 4 bytes. Using the API, I attempt to set it like this:
There doesn't appear to be a method to report the payload length (reg 0x22) with the API - which seems like a (small) oversight. My first step was to read reg 0x22 directly via SPI like this:
That returns 0x00, which isn't the answer we are looking for. Next up, I attempted to set the reg by SPI like this:
Explicitly (I hope) putting the modem into standby mode to write the register. Sadly, a read of the reg give 0x00, so that doesn't seem to work either. Finally, I tried to write / read to another register (0x24) using the exact same code as to write to 0x22. That worked!
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It turns out the issue is with startReceive(). When called with no args, it defaults the payload length to 0 instead of using the previously set value from implicitHeader. Unfortunately, this means that you need to set the payload length twice. I will put in a couple of issues based on this experience. |
Beta Was this translation helpful? Give feedback.
It turns out the issue is with startReceive(). When called with no args, it defaults the payload length to 0 instead of using the previously set value from implicitHeader. Unfortunately, this means that you need to set the payload length twice.
I will put in a couple of issues based on this experience.