Hello all fellow moteino coders.
I would need little help with my configuration.
I have used moteino for big push button to launch game in crowded environments (fairs, festivals etc.) where there are quite a lot interference from people's phones etc. I have used 19200 bitrate successfully in shorter range. I have had some mixed results when using 1200 bitrate for longer range 100-300m. Sometimes the link is very good but sometimes I have problems also in very short range.
Here is my radio configuration:
19200 bitrate:
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_19200); //RegBitrateMsb 19200 bitrate RegBitRate (bits/sec)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_19200); //RegBitrateLsb 19200 bitrate
radio.writeReg(REG_FDEVMSB, RF_FDEVMSB_25000); //Default is 25000 RegFdev - frequency deviation (Hz)
radio.writeReg(REG_FDEVLSB, RF_FDEVLSB_25000); //Default is 25000
radio.writeReg(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_3); //RegRxBw DccFreq:010, RxBw_Mant:24, RxBw_Exp: 3 = 41.7 kHz, 5 = 10.4 kHz, 6 = 5.2 kHz (BitRate < 2 x RxBw p. 26 http://www.hoperf.com/upload/rf/RFM69HW-V1.3.pdf)
radio.writeReg(0x18, RF_LNA_ZIN_50 | RF_LNA_GAINSELECT_MAX); //RegLna (LnaZin, LnaCurrentGain (readonly), LnaGainSelect), LnaZin:50ohm = 0x00; 200ohm = 0x80, CurrentGain: (MAX=0x01, auto=0x00)
retryWaitTime = RETRYTIMEOUTHIGHBW;
Serial.println("Bitrate 19200");
radio.setPowerLevel(31); // max = 31
With 19200 bitrate I'm using following arguments when sending:
(radio.sendWithRetry(GATEWAYID, message, strlen(message), 10, 50))
1200 bitrate:
radio.writeReg(REG_BITRATEMSB, RF_BITRATEMSB_1200); //RegBitrateMsb 1200 bitrate RegBitRate (bits/sec)
radio.writeReg(REG_BITRATELSB, RF_BITRATELSB_1200); //RegBitrateLsb 1200 bitrate
radio.writeReg(REG_FDEVMSB, RF_FDEVMSB_2000); //Default is 5000 RegFdev - frequency deviation (Hz)
radio.writeReg(REG_FDEVLSB, RF_FDEVLSB_2000); //Default is 5000
radio.writeReg(REG_RXBW, RF_RXBW_DCCFREQ_010 | RF_RXBW_MANT_24 | RF_RXBW_EXP_6); //RegRxBw DccFreq:010, RxBw_Mant:24, RxBw_Exp: 5 = 10.4 kHz 6 = 5.2 kHz (BitRate < 2 x RxBw p. 26 http://www.hoperf.com/upload/rf/RFM69HW-V1.3.pdf)
radio.writeReg(0x18, RF_LNA_ZIN_50 | RF_LNA_GAINSELECT_MAX); //RegLna (LnaZin, LnaCurrentGain (readonly), LnaGainSelect), LnaZin:50ohm = 0x00; 200ohm = 0x80, CurrentGain: (MAX=0x01, auto=0x00)
retryWaitTime = RETRYTIMEOUTLOWBW;
Serial.println("Bitrate 1200");
With 1200 bitrate I'm using following arguments when sending:
(radio.sendWithRetry(GATEWAYID, message, strlen(message), 10, 255))
My message is 10 characters. The information I need to send is either button press, and press no e.g. (B1021) or battery charge status (V4100 100).
My understanding of radio technology is quite poor. I have found these settings from reading the forum and rfm69hw specification.
I'm wondering that what can cause my setup sometimes fail also in short range (about 1 meter). Is the radio too sensitive and getting some kind of overload from different interference. Because with 19200 It's working always, but with 1200 it sometimes need's reset before working. Should I use shorter messages or what could I do?
These are the antennas I have been using:
button:
http://www.farnell.com/datasheets/1641089.pdf
receiver:
http://www.farnell.com/datasheets/1696738.pdf
Any help and guidance to get me in to correct direction will be highly appreciated.
-Timo-
How are the antennas aligned? They should both be in the same plane orientation, Vertically or Horizontally, for maximum signal to get trough. Also, did you tried the 7 cm simple wire antennas on both modules? That would take the antenna problem out of the troubleshooting, if they are the reason of your problem.
The patch antenna does mention 433MHZ but at the it refers to GSM. One of the references is surely wrong, as there is no GSM band at 433Mhz freq.
Antennas are both vertically. With these antennas I have got longest range. I have tried many other antennas also plain wire. The problem is not the range. Sometimes it's working very well. The problem ks that sometimes in 1200 bitrate. It's not working at all, not even in short range.
Are you using the examples node and gateway sketches available in the RF69 library?