Where to define RF24 Datarate
-
I am using the developer branch because I switched to the MQTT Client. Becuase I still have longer range connection issues I would like to set the datarate to 250 KBs. I change the setting in MyConfig.h to :
#define MY_RF24_DATARATE RF24_250KBPS
But if I look in my debug information I see:
CONFIG 0x0E
DYNPD/FEATURE 0x3F 06
Data Rate 1MBPS
Model nRF24L01+
CRC Length 16 bitsDo I need to define the datarate somewhere else ?
-
I confirm I see this too...
-
Do you print debug information before or after configuration has been set?
It happens here:
https://github.com/mysensors/Arduino/blob/a7580d124e7424cb1a19ba0b4649a72a1029d692/libraries/MySensors/core/MyTransportNRF24.cpp#L56
-
@hek Excuse the lack of knowledge... I have this at the top of my sketch:
// Enable and select radio type attached
#define MY_RADIO_NRF24
// #define MY_RADIO_RFM69// Set RF24L01 channel number
#define MY_RF24_CHANNEL 125// Define nRF24L01 datarate
#define MY_RF24_DATARATE RF24_250KBPS// Enable nRF24L01 debug messages
#define MY_DEBUG_VERBOSE
-
Looks correct. Are you saying it still goes into 1MBS mode?
-
@hek I see this when the node / gateway is started:
TATUS 0x0E RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 0x0F0F3B3F03 0F0F3B3F03
RX_ADDR_P2-5 0xFF C4 C5 C6
TX_ADDR 0x0F0F3B3F0E
RX_PW_P0-6 0x20 20 20 00 00 00
EN_AA 0x3B
EN_RXADDR 0x07
RF_CH 0x4C
RF_SETUP 0x07
CONFIG 0x0E
DYNPD/FEATURE 0x3F 06
Data Rate 1MBPS
Model nRF24L01+
CRC Length 16 bits
PA Power PA_MAX
-
Trying to understand where the extended debug prints comes from.
Did you un-comment this line?
https://github.com/mysensors/Arduino/blob/a7580d124e7424cb1a19ba0b4649a72a1029d692/libraries/MySensors/core/MyTransportNRF24.cpp#L73
-
-
Ok.. found it... printDetails happens here:
https://github.com/mysensors/Arduino/blob/a7580d124e7424cb1a19ba0b4649a72a1029d692/libraries/MySensors/drivers/RF24/RF24.cpp#L553This is printed before we set the data-rate to 1MBPS. So I guess everything is ok.
-
@hek said:
Ok.. found it... printDetails happens here:
https://github.com/mysensors/Arduino/blob/a7580d124e7424cb1a19ba0b4649a72a1029d692/libraries/MySensors/drivers/RF24/RF24.cpp#L553This is printed before we set the data-rate to 1MBPS. So I guess everything is ok.
Okay, I'll trust you it's being set to 250 kbps then
-
You can always uncomment the line I pointed to earlier if you don't believe me
-
@hek I did (Not that I don't trust you), and you're right. Go get yourself a beer and pat yourself on the back
Now if I could just get my ESP8266 to actually not reply to 50% off messages with st=fail.
I've only been trying to get this all working for 3 weeks (sigh).