The RF69 module is configured by the RF69 library to always use AFC. It's not so? I am looking into the RFM69 datasheet, but I do not know what to look for
Ad) RxBwAfc - default value is 0x80. So "wide enough" It can be in my case eg. "0xE0" (max), but at the expense of lower sensitivity? Preamble size is by default 3 (at address 0x2d)?
I'm confused by this, the default power up 'built-in' value of the sx1231h for RxBwAfc is 0b10001011 (0x8B), with a recommended default value of 0b10001010 (0x8A). Also the LowPowerLab doesn't set this RxBwAfc register that I can see, so presumably is still the built-in power up of 0x8B.
Also LowPowerLab library doesn't appear to set the AfcAutoOn or AfcAutoclearOn bits of the the REG_AFCFEI register either (register 0x1e) which are usually needed to enable AFC, so AFC is by default disabled (is this correct Felix? Is it done somewhere else?)
I assume you've changed the values for BR and FDEV as well from the LowPowerLab library defaults, and have also changed RxBwAfc too. If 0x80 is in this register it has set the RxBwAfc to 500kHz, which is
way bigger than your narrow band signal and is likely to pick up a load of other noise from outside your signal bandwidth, and if you haven't set the AfcAutoOn and AfcAutoclearOn bits in REG_AFCFEI then AFC is not enabled (I'm assuming in all this you don't use the AfcStart bit in that register which is difficult to use).
So to fix your problem I'd suggest the following register settings to start with. The local oscillator offset is the combination of absolute, temperature and say 2 year ageing drifts of the crystal and is about (10+20+4)*2 PPM worst case if both were at the oppoosite ends of the drift, i.e. 60kHz at 868MHz. If the gateway is normally close to room temperature that could be reduced to (10+10+4)*2 PPM or about 42kHz.
turn on AFC:
1) Set REF_AFCFEI (register 0x1E) to 0x0C to set the AfcAutoOn and AfcAutoclearOn bits to turn on AFC
set 2000Hz for FDEV:
2) Set REG_FDEVMSB (register 0x05) to 0x00
3) Set REG_FDEVLSB (register 0x06) to 0x20
set 1200Hz bit rate:
4) Set REG_BITRATEMSB (register 0x03) to 0x68
5) Set REG_BITRATELSB (register 0x04) to 0x2A
Set RxBw to 3100Hz: (> (FDVEV +BR/2)):
6) set REG_RXBW (register 0x19) to 0x4F
Set RxBwAfc to 50kHz: (> (FDVEV +BR/2 + 42000)):
7) Set REG_RXBWAFC (register 0x1A) to 0x4B
It's an interesting question about the effect of a wider RxBwAfc on sensitivity. I think this can reliably do an AFC with signal to noise levels significantly below that needed to actually demodulate data with an acceptable bit error rate, because it is effectively trying to find the centre frequency between the two modulation frequencies by successively averaging over 3 bytes of known preamble pattern. This isn't quantified in the specifications, but I suspect this is why AFC is actually used.
Edit: You should check by calculating the required preamble length from the formula in the datasheet. It may be that the default of 3 is not enough for such narrow band signals.
Mark.