I have thoroughly read the documentation on the radio_mac library, and am calling radioMacInit prior to any other use of it. I have managed to get it working (not precisely sure how I got it going, but it is) and scanning the 4 channels.
Right now, I am allowing the FS to be calibrated automatically as it moves from IDLE to RX, and not bothering to manually calibrate for now.
I have used radio_link.c as an example of radioMacEventHandler. All appears to be functioning, but I cannot capture a packet from the device I am trying to communicate with.
I have a previous application that uses radio_queue to capture the packets, which works well, but often misses them. The source device transmits bursts of 4 packets, one on each channel 500ms apart, every 5 minutes. My original application listened on the first channel with no timeout until it captured a packet. If the packet CRC was wrong, it would then try the other channels. The problem with this is that occasionally it does not get the first packet, or gets a packet that is invalid, and then misses the real packet.
My thought was to scan the 4 channels rapidly, allowing only sufficient time for a packet to be captured (packets are less than 4ms long @50kbps, so I settled for around 20ms timeout on each channel). I have set up the modem to the correct data rate, and configured it for fixed packet length. But it only ever captures packets without a valid CRC.
As I am very new to this chip, though I have a great deal of radio comms experience, I was wondering if those with greater experience could suggest what I am doing wrong, or what to look for in case I am completely on the wrong track.
The app is quite lengthy, but if anyone wishes to look at it I can post a link to github. It needs a LOT of cleaning up and a better logic engine behind it, but I want to get the basic right before I embark on that.
Thanks again and Cheers