Author Topic: RFM69 Continuous Mode support  (Read 5299 times)

Ruch

  • NewMember
  • *
  • Posts: 2
  • Country: ca
RFM69 Continuous Mode support
« on: January 06, 2017, 01:55:29 AM »
Hi,

I wonder if the current library for RFM69 supports Continuous Mode operation?
Basically, I'd like to feed my data directly to DIO2/DATA pin, but I believe some configurations has to be done with the RFM69 chip.

Thanks!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: RFM69 Continuous Mode support
« Reply #1 on: January 06, 2017, 09:47:59 AM »
RFM69 lib currently supports packet mode only.
Continuous mode is still going to require passing data through SPI, not through a digital pin/PWM-ing.
Continuous mode works by passing the data stream on DIO1/DIO2 pins directly, and to be demodulated at the other end on the same pins, by the receiving MCU, this is described in the sx1231h datasheet on pages 49/50.

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: RFM69 Continuous Mode support
« Reply #2 on: January 06, 2017, 05:23:07 PM »
Felix, continuous mode actually needs the data on dio2. AFAIK it's not possible to use SPI to transmit/receive data in continuous mode.

Joe

Ruch

  • NewMember
  • *
  • Posts: 2
  • Country: ca
Re: RFM69 Continuous Mode support
« Reply #3 on: January 07, 2017, 08:06:07 PM »
Hi,

Thanks for your replies.

Have anybody tried using the continuous mode on RFM69 chip? I browsed through the datasheet and it seems it's not recommended to use and there's not a lot of info on how to do it except for the block diagram.

For those who wonder why I want to use continuous mode, I actually want the RFM69 (or the RFM95 LoRa) to work as a "wireless serial transparent link". I noticed that if I use the packet version of the wireless, it requires me to wait a bit for the transmission to finish before I can send the next packet of data. This presents some timing issue with the receiver on the other end, which expects a continuous uninterrupted stream of data. With Continuous Mode, I am hoping that the receiver on the other end will not notice at all that I have replaced the wired serial link with a wireless one, as the bits will just stream as if it's the same as with using a wired one (no wait cycles for the transmit to finish).

Thanks!

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RFM69 Continuous Mode support
« Reply #4 on: January 07, 2017, 08:50:27 PM »
These problems are usually solved with FIFOs in software. It depends whether the data stream the other end has to be continuous with exact timing (such as an audio or video interface), or whether it can send bursts of data when it gets them. The first one is easy to deal with, the second may require more complex control logic. Genlocking (i.e. output datastream has exactly the same timing as the input stream and has a known phase offset) is another level of complexity that usually requires custom hardware.

So it all depends on what your datastream is and what you're doing with it, and whether the receiving device can handle burst type data. The RFM69 does have a limitless packet mode that uses it's internal transmit and receive FIFOs, and the user can read the FIFO flags flags via SPI such as empty, full, almost empty and almost full, but you run the risk of missing packets on the receiver and it won't be very kind to the radio network and will violate regulations. Remember also that radio is inherently unreliable, even with continuous mode you're going to miss data. 

Mark.

ulli

  • Jr. Member
  • **
  • Posts: 87
Re: RFM69 Continuous Mode support
« Reply #5 on: January 08, 2017, 04:46:34 AM »
The continuous mode is not a big deal. I already  implemented it for burst messages and the eth protocol (heating thermostats).
You just need to keep the fifo of the rfm69 be filled during transmission.
-> fill up the fifo -> start tx -> track the fifo buffer size (be sure that it never goes empty) and continue the data transfer into the fifo
That's it.

Nima

  • NewMember
  • *
  • Posts: 2
  • Country: us
Re: RFM69 Continuous Mode support
« Reply #6 on: February 06, 2017, 07:42:39 PM »
Sorry for distracting this topic. I have a problem with Receiver Continuous mode and I appreciate if anybody can help.
I have configured the RFM69HCW in receiver mode with OOK modulation. My transmitter is not a RFM69 and has a pre-existing configuration. I am seeing some data coming on G2 (DIO2) when transmitter starts transmission.
The issue is that the received bits are not those that my transmitter sends. The transmitter bit rate is about 5kbps (not sure about the exact value). It sends a known pattern of 0's and 1's. I am putting the receiver module in Continuous mode without Bit Synchronizer, I then assume need the receiver to sample the bits at a speed of at least such a bit rate. I tried RF_BITRATEMSB_9600 and supposedly to get 2 bits per every bit transmitted. I see bits received on G2 but they look garbage. I also tried the RF_BITRATEMSB_4800. I think some settings are wrong with the module BitSync.
Any idea this?

update: I changed the transmitter frequency to 315MHz and the RFM69 frequency to RF69_315MHZ in my Arduino IDE, and I am seeing clean bits decoded on pin G2. The issue sounds to be specific to 433MHz! Any comment?
« Last Edit: February 07, 2017, 03:19:27 PM by Nima »

stevestrong

  • NewMember
  • *
  • Posts: 2
  • Country: de
Re: RFM69 Continuous Mode support
« Reply #7 on: February 16, 2017, 05:25:14 PM »
Hello everyone,

I hope I post my issue on the right place, if not please move it where you consider better placed.

I am struggling since 3 days to setup the RFM69CW to receive data from an nRF905 chip.
The signal is known as being transmitted over 868.4MHz, GFSK with 100kbps bitrate (Manchester encoded), 50kHz deviation.
Unfortunately, preamble and sync words are not know.
That's why I tried to setup the RFM69 in continuous mode with following data:

Code: [Select]
regWrite(REG_OPMODE, RF_OPMODE_SEQUENCER_ON | RF_OPMODE_LISTEN_OFF | RF_OPMODE_STANDBY); // standby
// modulation type
regWrite(REG_DATAMODUL, RF_DATAMODUL_DATAMODE_CONTINUOUS | RF_DATAMODUL_MODULATIONTYPE_FSK | RF_DATAMODUL_MODULATIONSHAPING_01); // GFSK, 0.5 shaping
// bitrate 100kbps, values taken from Table 9, chapter 3.3.2 of user manual
regWrite(REG_BITRATEMSB, RF_BITRATEMSB_100000);
regWrite(REG_BITRATELSB, RF_BITRATELSB_100000);
// deviation 50kHz
regWrite(REG_FDEVMSB, RF_FDEVMSB_50000);
regWrite(REG_FDEVLSB, RF_FDEVLSB_50000);
// carrier frequency
regWrite(REG_FRFMSB, RF_FRFMSB_868); // RF_FRFMSB_315, RF_FRFMSB_433, RF_FRFMSB_868, RF_FRFMSB_915
regWrite(REG_FRFMID, RF_FRFMID_868); // RF_FRFMID_315, RF_FRFMID_433, RF_FRFMID_868, RF_FRFMID_915
regWrite(REG_FRFLSB, RF_FRFLSB_868); // RF_FRFLSB_315, RF_FRFLSB_433, RF_FRFLSB_868, RF_FRFLSB_915
// reception gain
regWrite(REG_LNA, RF_LNA_ZIN_200 | RF_LNA_GAINSELECT_AUTO); //RF_LNA_GAINSELECT_MAXMINUS12);
// filter bandwidth 100kHz
regWrite(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_20 | RF_RXBW_EXP_2); // (BitRate < 2 * RxBw)
regWrite(0x0B, 0x20); // AfcCtrl, afclowbetaon
// no sync detection
regWrite(REG_SYNCCONFIG, 0);
regWrite(REG_TESTDAGC, RF_DAGC_IMPROVED_LOWBETA0); // run DAGC continuously in RX mode for Fading Margin Improvement, recommended default for AfcLowBetaOn=0
Finally, I put it into receive mode.
If I set RSSI threshold to 0xE4, as suggested in the spec, then I get continuous garbage output on DIO2, even if nothing is sent from the host (nRF905).
If I set RSSI threshold to 166 (experimentally detected as being lowest value at which no garbage is output), then I get nothing at DIO2, even if the host sends data.
I am pretty sure that the host sends the data because my ventilation system recognize the signal and replies to it.
So, can anyone give me some hint what should I explore more?
Which registers should I try to setup, or which values am I maybe using incorrectly?

Any answer is appreciated.
Thank in advance.

« Last Edit: February 16, 2017, 05:36:30 PM by stevestrong »