Author Topic: Working bitrate configs for 1.2kbps (1200bps/baud) ?  (Read 4793 times)

bborncr

  • NewMember
  • *
  • Posts: 13
  • Country: cr
Working bitrate configs for 1.2kbps (1200bps/baud) ?
« on: July 10, 2015, 02:36:33 PM »
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,
« Last Edit: July 20, 2015, 08:31:43 PM by Felix »

chrisb2

  • NewMember
  • *
  • Posts: 6
  • Country: nz
Re: Working bitrate configs for 1200 bps
« Reply #1 on: July 18, 2015, 03:33:31 AM »
This working for me on the transmitter:
Code: [Select]
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:
Code: [Select]
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

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Working bitrate configs for 1200 bps
« Reply #2 on: July 20, 2015, 08:31:04 PM »
Chris,
Thanks but it doesn't seem to work for me.
Placing these in the library they would have to pass the Gateway-Node example tests.

Bruno

  • NewMember
  • *
  • Posts: 7
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #3 on: August 20, 2015, 11:08:21 AM »
I want to know how to configure the radio for working with 1.2kbps maintaining wireless programming

Steinarrr

  • NewMember
  • *
  • Posts: 27
  • Country: is
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #4 on: August 21, 2015, 06:13:49 AM »
Have you guys tried the settings from this tread: https://lowpowerlab.com/forum/index.php/topic,562.0.html  ?

chrisb2

  • NewMember
  • *
  • Posts: 6
  • Country: nz
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #5 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 and followed these instructions  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):

Code: [Select]
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.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #6 on: August 30, 2015, 11:31:31 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 and followed these instructions  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):

Code: [Select]
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?

chrisb2

  • NewMember
  • *
  • Posts: 6
  • Country: nz
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #7 on: August 31, 2015, 02:19:11 AM »
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():

Code: [Select]
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!


WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #8 on: January 17, 2016, 10:12:29 PM »
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.

emjay

  • Full Member
  • ***
  • Posts: 119
  • Country: nl
Re: Working bitrate configs for 1.2kbps (1200bps/baud) ?
« Reply #9 on: January 18, 2016, 08:28:50 AM »
@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.