MySensors Library & Examples  2.3.2
Macros
+ Collaboration diagram for RFM95:

Detailed Description

These options are specific to the RFM95 family of wireless transport modules.

The following chips are supported by this driver:

Macros

#define MY_RADIO_RFM95
 Define this to use RFM95 based radios for sensor network communication.
 
#define MY_DEBUG_VERBOSE_RFM95
 Define this for verbose debug prints related to the RFM95 driver.
 
#define MY_RFM95_ENABLE_ENCRYPTION
 Define this to enable software based AES encryption. More...
 
#define MY_RFM95_FREQUENCY   (RFM95_868MHZ)
 The frequency to use. More...
 
#define MY_RFM95_MODEM_CONFIGRUATION   RFM95_BW125CR45SF128
 RFM95 modem configuration. More...
 
#define MY_RFM95_MODEM_CONFIGRUATION
 RFM95 modem configuration. More...
 
#define MY_RFM95_RST_PIN
 Define this to use the RFM95 reset pin (optional).
 
#define MY_RFM95_POWER_PIN
 Define this to use the RFM95 power pin (optional).
 
#define MY_RFM95_IRQ_PIN   DEFAULT_RFM95_IRQ_PIN
 Define this to use the RFM95 IRQ pin.
 
#define MY_RFM95_IRQ_NUM   digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
 RFM95 IRQ number.
 
#define MY_RFM95_CS_PIN   DEFAULT_RFM95_CS_PIN
 RFM95 SPI chip select pin.
 
#define MY_RFM95_SPI_SPEED   (4*1000000ul)
 Set to overrule default RFM95 SPI speed.
 
#define MY_RFM95_TX_POWER_DBM   (13u)
 Set TX power level, default 13dBm (overridden if ATC mode enabled) More...
 
#define MY_RFM95_ATC_MODE_DISABLED
 Define to disable ATC mode of RFM95 driver.
 
#define MY_RFM95_ATC_TARGET_RSSI   (-70)
 Target RSSI level (in dBm) for RFM95 ATC mode.
 
#define MY_RFM95_MAX_POWER_LEVEL_DBM
 Set max TX power in dBm if local legislation requires this. More...
 
#define MY_RFM95_TCXO
 Enable to force your radio to use an external frequency source (e.g. TCXO, if present). More...
 

Macro Definition Documentation

◆ MY_RFM95_ENABLE_ENCRYPTION

#define MY_RFM95_ENABLE_ENCRYPTION

Define this to enable software based AES encryption.

All nodes and gateway must have this enabled, and all must be personalized with the same AES key.

See also
personalization
Warning
This driver always sets the initialization vector to 0 so encryption is weak.

Definition at line 2359 of file MyConfig.h.

◆ MY_RFM95_FREQUENCY

#define MY_RFM95_FREQUENCY   (RFM95_868MHZ)

The frequency to use.

  • RFM95_169MHZ
  • RFM95_315MHZ
  • RFM95_434MHZ
  • RFM95_868MHZ
  • RFM95_915MHZ
  • Custom frequency in Hz

This must match the hardware version of the RFM95 radio. Additional information: https://en.wikipedia.org/wiki/Short_Range_Devices

Definition at line 855 of file MyConfig.h.

◆ MY_RFM95_MAX_POWER_LEVEL_DBM

#define MY_RFM95_MAX_POWER_LEVEL_DBM

Set max TX power in dBm if local legislation requires this.

  • 1mW = 0dBm
  • 10mW = 10dBm
  • 25mW = 14dBm
  • 100mW = 20dBm

See here: https://en.wikipedia.org/wiki/Short_Range_Devices

Definition at line 2365 of file MyConfig.h.

◆ MY_RFM95_MODEM_CONFIGRUATION [1/2]

#define MY_RFM95_MODEM_CONFIGRUATION   RFM95_BW125CR45SF128

RFM95 modem configuration.

BW = Bandwidth in kHz CR = Error correction code SF = Spreading factor, chips / symbol

CONFIG BW CR SF Comment
RFM95_BW125CR45SF128 125 4/5 128 Default, medium range
RFM95_BW500CR45SF128 500 4/5 128 Fast, short range
RFM95_BW31_25CR48SF512 31.25 4/8 512 Slow, long range
RFM95_BW125CR48SF4096 125 4/8 4096 Slow, long range

Definition at line 2362 of file MyConfig.h.

◆ MY_RFM95_MODEM_CONFIGRUATION [2/2]

#define MY_RFM95_MODEM_CONFIGRUATION

RFM95 modem configuration.

BW = Bandwidth in kHz CR = Error correction code SF = Spreading factor, chips / symbol

CONFIG BW CR SF Comment
RFM95_BW125CR45SF128 125 4/5 128 Default, medium range
RFM95_BW500CR45SF128 500 4/5 128 Fast, short range
RFM95_BW31_25CR48SF512 31.25 4/8 512 Slow, long range
RFM95_BW125CR48SF4096 125 4/8 4096 Slow, long range

Definition at line 2362 of file MyConfig.h.

◆ MY_RFM95_TCXO

#define MY_RFM95_TCXO

Enable to force your radio to use an external frequency source (e.g. TCXO, if present).

This allows for better stability using SF 9 to 12.

Definition at line 2364 of file MyConfig.h.

◆ MY_RFM95_TX_POWER_DBM

#define MY_RFM95_TX_POWER_DBM   (13u)

Set TX power level, default 13dBm (overridden if ATC mode enabled)

See here https://en.wikipedia.org/wiki/Short_Range_Devices

Definition at line 929 of file MyConfig.h.