LPC824 + RFM69HW lost packets

Started by minex, January 17, 2017, 05:58:06 AM

minex

Hello,
I`m using RFM69HW with my designed board with LPC824 arm mcu.  I have problem with receiving packets in not very long distances (25m).
I`m not using any libraries just my code. But that code is simple:
Transmitting: goto sleep, goto transmitter mode, wait for modeready and txready bit. Then filling fifo and wait for packetsend flag. After that I back to sleep mode (wait for modeready bit) and back to receiver mode.
For receiving:  I pooling register for payloadready flag, then go to sleep mode, read fifo, and back to receiver mode.
So in 10meters with two concrete walls I haven`t lost any packets of 1000. But if I put one module about 25meters with two concrete walls I get about 5 packets lost of 1000. One module sending packets 1sec interval, and another after receival, send ack back immediately. 
When I loosing packets, RSSI is about 92dB.

Sometimes first 10min after turning modules on, they working fine, and then they start to loosing packets.
I try settings from lowpower library in github, but situacion are very similar.
Thats my non degault settings of rfm69hw module (first byte is address, second - register setting):

   {0x01, 0x80}, // RegOpMode: Standby Mode
   {0x02, 0x00}, // RegDataModul: Packet mode, FSK, no shaping
   {0x03, 0x00}, // 300 kbps
   {0x04, 0x6B},
   {0x05, 0x13},
   {0x06, 0x33},
    {0x07, 0xD9}, // RegFrfMsb: 869 MHz
    {0x08, 0x00}, // RegFrfMid
    {0x09, 0x00}, // RegFrfLsb
      
    {0x11, 0x7F},
    {0x19, 0xE0},
      
    {0x25, 0x40},//dio mapping
    {0x29, 210},
      
    {0x2E, 0xB0}, // RegSyncConfig: Enable sync word
    {0x2F, 0xAA}, // RegSyncValue1
    {0x30, 0x2D}, // RegSyncValue2
    {0x31, 0xD4},
    {0x32, 0x55}, // RegSyncValue1
    {0x33, 0x3E}, // RegSyncValue2
    {0x34, 0x7C},
    {0x35, 0x6B},
      
    {0x37, 0xD2}, // RegPacketConfig1: Variable length, CRC on, whitening
    {0x38, 66}, // RegPayloadLength: 66 bytes max payload
    {0x3C, 0x85},
    {0x3D, 0x12},
    {0x6F, 0x30}, // RegTestDagc: Improved margin, use if AfcLowBetaOn=0 (default)

Maybe someone have some comment for my settings or receiving/transmitting algorithm?

luisr320

Is there a Moteino somewhere in there?

minex

no, its my board with lpc824 and rfm69hw.

WhiteHare


minex

I Try settings from lowpower library with 55kbps, now I trying 19.2kpbs baudrate, deviation 25kHz, rx bandwith 41kHz. Also I measure crystal temp and make correction in frequency, but even in short distances I lost packets. I using sleep mode instead standby, and send at first 2 dummy bytes, but that not helped. Sometimes I have not lost packet in 1000, but sometimes I have lost 2 from 100.

WhiteHare

I suggest you order at least a couple Moteino's so that then you have a baseline reference to compare your own boards against.  Otherwise, this is largely shooting in the dark as to where the problem may lay.