I found a post with a tested library mod for 19200 posted by Felix but couldn't find something similar for 1200bps. Does someone have them? I found the following:
// /* 0x03 */ { REG_BITRATEMSB, RF_BITRATEMSB_1200}, //default:4.8 KBPS
// /* 0x04 */ { REG_BITRATELSB, RF_BITRATELSB_1200},
// /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_2000}, //default:5khz, (FDEV + BitRate/2 <= 500Khz)
// /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_2000},
But in the 19200 config there are a couple more registers.
Thanks,
This working for me on the transmitter:
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_1200); // Bit Rate (p20)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_1200);
radio.writeReg(REG_FDEVMSB, 0x00);
radio.writeReg(REG_FDEVLSB, 0x29); // Fdev (p20) - 52->5002Hz, 30->2928Hz, 29->2501Hz, 21->2013Hz(x)
And on the receiver:
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_1200); // Bit Rate (p20)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_1200);
radio.writeReg(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_6); // RxBw 5200Hz (p26)
regards,
Chris
Chris,
Thanks but it doesn't seem to work for me.
Placing these in the library they would have to pass the Gateway (https://github.com/LowPowerLab/RFM69/blob/master/Examples/Gateway/Gateway.ino)-Node (https://github.com/LowPowerLab/RFM69/blob/master/Examples/Node/Node.ino) example tests.
I want to know how to configure the radio for working with 1.2kbps maintaining wireless programming
Have you guys tried the settings from this tread: https://lowpowerlab.com/forum/index.php/topic,562.0.html (https://lowpowerlab.com/forum/index.php/topic,562.0.html) ?
I think I understand why a bit rate of 1200 works for some people and not others and for some Motieno pairs and not others. It seems to be down to how closely the crystal frequencies match.
I bought an RTL-SDR (http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/) and followed these instructions (https://ukhas.net/wiki/ideas:rfm69_frequency_trimming) to trim to 434MHz the frequencies of my new pair of Motienos which did not communicate at 1200 with any settings (including those mentioned above):
These Motienos then successfully communicated with these settings (similar to those which worked with my original pair of Motienos):
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_1200); // Bit Rate (p20)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_1200);
radio.writeReg(REG_FDEVMSB, 0x00);
radio.writeReg(REG_FDEVLSB, 0x29); // Fdev (p20) - 52->5002Hz, 30->2928Hz, 29->2501Hz, 21->2013Hz
radio.writeReg(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_6); // RxBw 5200Hz (p26)
radio.writeReg(REG_PACKETCONFIG2, RF_PACKET2_RXRESTARTDELAY_NONE | RF_PACKET2_AUTORXRESTART_ON | RF_PACKET2_AES_OFF);
Altering RxBw and FDev around the settings above did not break communication. These Motienos also communicated fine at a 2400 bit rate without frequency trimming.
Quote from: chrisb2 on August 30, 2015, 03:23:33 AM
I think I understand why a bit rate of 1200 works for some people and not others and for some Motieno pairs and not others. It seems to be down to how closely the crystal frequencies match.
I bought an RTL-SDR (http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/) and followed these instructions (https://ukhas.net/wiki/ideas:rfm69_frequency_trimming) to trim to 434MHz the frequencies of my new pair of Motienos which did not communicate at 1200 with any settings (including those mentioned above):
These Motienos then successfully communicated with these settings (similar to those which worked with my original pair of Motienos):
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_1200); // Bit Rate (p20)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_1200);
radio.writeReg(REG_FDEVMSB, 0x00);
radio.writeReg(REG_FDEVLSB, 0x29); // Fdev (p20) - 52->5002Hz, 30->2928Hz, 29->2501Hz, 21->2013Hz
radio.writeReg(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_6); // RxBw 5200Hz (p26)
radio.writeReg(REG_PACKETCONFIG2, RF_PACKET2_RXRESTARTDELAY_NONE | RF_PACKET2_AUTORXRESTART_ON | RF_PACKET2_AES_OFF);
Altering RxBw and FDev around the settings above did not break communication. These Motienos also communicated fine at a 2400 bit rate without frequency trimming.
Shouldn't they have been factory calibrated? Or does that wear off over time, necessitating this? i.e. Did you have to do this on Day 1 when you first got your chips, or only later down the road?
i.e. How often does this have to be done?
As I understand it the 32MHz crystal reference oscillator on the RFM69 is not a really accurate one, this is not apparent or a concern in most settings, but does seem important at the 1200 bit rate. Theoretically Automatic Frequency Correction (AFC) might be able to fix mismatched crystals, but I have so far not succeeded in getting this to work.
The crystal frequency will not change over time, so once you have worked out the trim for each new Motieno you can keep on using it, e.g. by doing this in setup():
radio.setFrequency(433999456);
The downside of this is if you are deploying the same code to different Motienos you have to edit the set frequency command for each one!
FWIW, I notice there now exists an upgraded RTL-SDR with a 1ppm TCXO. I'm guessing that would be the best choice RTL-SDR for trimming RFM69's, especially if not trimming them all at once.
@chrisb2,The crystal frequency will not change over time, so once you have worked out the trim for each new Motieno you can keep on using it
Unfortunately, the crystal frequency is not fixed for all time. Even if the local variables are controlled well (voltage to the module, temperature) the crystal ages, typically a couple of ppm a year - usually monotonic.
A better approach is to regard a single node as "master" and then track the drift of slave nodes using the FEI value derived from the AGC response to each packet. After filtering the rather noisy values, then make the adjustment to the nominal carrier value. It doesn't matter that the "master" is also drifting, when you think about it, you don't need to be
absolutely on frequency by 1ppm, just to *agree* closely.