How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
-
@Christian-Simonsen Additionally, you may need to use CleerEEPROM sketch (in Arduino, examples - MySensors) on your sensor to make sure it is clean BEFORE proceeding with a new sketch.
-
Thanks for all the tips.
I've now installed a new 100 uF (16V) Capacitor in parallell with the current 4.7 uF (50V) capacitor on both the units, I also double checked the writing just to be sure. It all looks good. See images below.


**After adding the capacitor, I uninstalled and cleaned the setting on the Raspberry Pi. **
Sudo make uninstall
pi@raspberrypi:~/MySensors $ sudo make uninstall Stopping daemon mysgateway (ignore errors) removing files rm /etc/systemd/system/mysgateway.service /usr/local/bin/mysGatewaySudo make clean
pi@raspberrypi:~/MySensors $ sudo make clean [Cleaning] rm -rf build drivers/Linux/log.o drivers/Linux/noniso.o drivers/Linux/SoftEeprom.o drivers/Linux/EthernetClient.o drivers/Linux/SerialPort.o drivers/Linux/Stream.o drivers/Linux/Print.o drivers/Linux/IPAddress.o drivers/Linux/compatibility.o drivers/Linux/EthernetServer.o examples_linux/mysGateway.o drivers/RPi/piHiPri.o drivers/RPi/bcm2835.o drivers/RPi/rpi_util.o drivers/RPi/Wire.o drivers/RPi/SPI.o examples_linux/mysGateway drivers/Linux/log.d drivers/Linux/noniso.d drivers/Linux/SoftEeprom.d drivers/Linux/EthernetClient.d drivers/Linux/SerialPort.d drivers/Linux/Stream.d drivers/Linux/Print.d drivers/Linux/IPAddress.d drivers/Linux/compatibility.d drivers/Linux/EthernetServer.d examples_linux/mysGateway.d drivers/RPi/piHiPri.d drivers/RPi/bcm2835.d drivers/RPi/rpi_util.d drivers/RPi/Wire.d drivers/RPi/SPI.d**After uninstalling, reset the configuration, and installed and started the gateway. **
pi@raspberrypi:~/MySensors $ ./configure --my-debug=enable --my-gateway=serial --my-serial-is-pty --my-serial-pty=ttyMySensorsGateway --my-transport=nrf24 --my-rf24-channel=76 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041. [OK] init system detected: systemd [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished.Make all
pi@raspberrypi:~/MySensors $ sudo make all cc -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SoftEeprom.o drivers/Linux/SoftEeprom.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp cc -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/piHiPri.o drivers/RPi/piHiPri.c cc -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/bcm2835.o drivers/RPi/bcm2835.c g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/rpi_util.o drivers/RPi/rpi_util.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/Wire.o drivers/RPi/Wire.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/SPI.o drivers/RPi/SPI.cpp g++ -pthread -o examples_linux/mysGateway drivers/Linux/log.o drivers/Linux/noniso.o drivers/Linux/Print.o drivers/Linux/EthernetClient.o drivers/Linux/SerialPort.o drivers/Linux/Stream.o drivers/Linux/IPAddress.o drivers/Linux/compatibility.o drivers/Linux/SoftEeprom.o drivers/Linux/EthernetServer.o examples_linux/mysGateway.o drivers/RPi/piHiPri.o drivers/RPi/bcm2835.o drivers/RPi/rpi_util.o drivers/RPi/Wire.o drivers/RPi/SPI.oSudo make install
pi@raspberrypi:~/MySensors $ sudo make install Installing examples_linux/mysGateway to /usr/local/bin install -m0644 initscripts/mysgateway.systemd /etc/systemd/system/mysgateway.service systemctl daemon-reload MySensors gateway has been installed, to add to the boot run: sudo systemctl enable mysgateway.service To start the gateway run: sudo systemctl start mysgateway.servicestart the gateway
pi@raspberrypi:~/MySensors $ sudo systemctl start mysgateway.serviceStart the debug on the gateway:
pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d mysGateway: Starting gateway... mysGateway: Protocol version - 2.0.1-beta mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta mysGateway: TSF:LRT:OK mysGateway: TSM:INIT mysGateway: TSM:INIT:TSP OK mysGateway: TSM:INIT:GW MODE mysGateway: TSM:READY mysGateway: MCO:REG:NOT NEEDED mysGateway: MCO:BGN:STP mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,0!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,0!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,0!=7Now, the gateway on the Raspberry Pi 2 seem ok and up and running. Moving over to the sensor node, the Arduino Uno with NRF24L01+.
Uploaded and ran the Clear_EPROM sketch
/* * * This sketch clears radioId, relayId and routing info in EEPROM * */ #include <SPI.h> #include <EEPROM.h> void setup() { for (int i=0;i<512;i++) { EEPROM.write(i, 0xff); } Serial.println("EEPROM cleared"); } void loop() { // Nothing to do here... }After this I uploaded your recommended default sketch. However I added "#define MY_RF24_CHANNEL 76"
// Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_NODE_ID 1 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_RADIO_NRF24 #define MY_RF24_CHANNEL 76 #include <MySensors.h> #define CHILD_ID_LIGHT 0 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Light Sensor", "1.0"); // Register all sensors to gateway (they will be created as child devices) present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); } void loop() { int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { send(msg.set(lightLevel)); lastLightLevel = lightLevel; } sleep(SLEEP_TIME); }The result, enoyingly is the same it seems based on the output from the Serial Monitor from the Arduino Uno.
Starting sensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: !TSM:FPAR:FAIL !TSM:FAILURE TSM:PDT TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: !TSM:FPAR:FAIL !TSM:FAILURE TSM:PDTFrustrating... Can it be other modules, libraries than what I've not installed on the Raspberry Pi that is the reason for the error?
-
@Christian-Simonsen ok, you have an amplified version of nrf24l01+. It does require more power and could be a problem. How are feeding it from Raspberry please?
Can you try a normal nrf24l01+ on Raspberry? Just like the one you have on a sensor and report back?
-
@Christian-Simonsen ok, you have an amplified version of nrf24l01+. It does require more power and could be a problem. How are feeding it from Raspberry please?
Can you try a normal nrf24l01+ on Raspberry? Just like the one you have on a sensor and report back?
Again thanks for all the help, very much appreciated.
I started last evening putting together a few more NRF24L01 sensors such as the one on the Node. I will also setup a new extra Arduino Gateways, so I also can test communication between two Arduinos, before testing the same with the Raspberry Pi. Ill report back later tonight when I know the results.
-
@Christian-Simonsen I bet the problem is with your GW radio
-
@Christian-Simonsen I bet the problem is with your GW radio
You are 100 % correct :+1: :)
I changed the NRF24L01 module with the antenna, with a standard NRF24L01+ module. And it works like a charm.
Here are the Serial Monitor code from the Arduino (Sensor node). I don't currently understand what all the code says, but it seems like they are communicating.
Starting sensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSP:MSG:FPAR RES (ID=0, dist=0) TSP:MSG:FPAR (PPAR FOUND) TSP:MSG:PAR OK (ID=0, dist=1) TSM:FPAR:OK TSM:ID TSM:CHKID:OK (ID=1) TSM:UPL TSP:PING:SEND (dest=0) TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1 TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1 TSP:MSG:PONG RECV (hops=1) TSP:CHKUPL:OK TSM:UPL:OK TSM:READY TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0 TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0 TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok: Request registration... !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=fail:2 !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=fail:2 !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=2,st=fail:2 !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=3,st=fail:2 Init complete, id=1, parent=0, distance=1, registration=1 50 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:50 56 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:56 !TSM:UPL FAIL, STATP 58 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:58 58 58And from the Raspberry Pi
mysGateway: TSM:INIT:TSP OK mysGateway: TSM:INIT:GW MODE mysGateway: TSM:READY mysGateway: MCO:REG:NOT NEEDED mysGateway: MCO:BGN:STP mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,8!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,0!=7 mysGateway: TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0: mysGateway: TSF:MSG:BC mysGateway: TSF:MSG:FPAR REQ,ID=1 mysGateway: TSF:PNG:SEND,TO=0 mysGateway: TSF:CKU:OK mysGateway: TSF:MSG:GWL OK mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 mysGateway: TSF:MSG:PINGED,ID=1,HP=1 mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 mysGateway: TSF:MSG:READ,0-1-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,8!=7 -
I have connection, however the communication seem to fail after a while. Seems to get worse and worse. I'm currently sending a msg every 30 seconds from the node. See code below.
Gateway on the Raspberry Pi:
pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d mysGateway: Starting gateway... mysGateway: Protocol version - 2.0.1-beta mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta mysGateway: TSF:LRT:OK mysGateway: TSM:INIT mysGateway: TSM:INIT:TSP OK mysGateway: TSM:INIT:GW MODE mysGateway: TSM:READY mysGateway: MCO:REG:NOT NEEDED mysGateway: MCO:BGN:STP mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 mysGateway: TSF:MSG:PINGED,ID=1,HP=1 mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:50 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57 mysGateway: !TSF:MSG:LEN,0!=9 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:56 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57And the code from the Arduino Uno Node
Starting sensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSP:MSG:FPAR RES (ID=0, dist=0) TSP:MSG:PAR OK (ID=0, dist=1) TSM:FPAR:OK TSM:ID TSM:CHKID:OK (ID=1) TSM:UPL TSP:PING:SEND (dest=0) TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1 TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1 TSP:MSG:PONG RECV (hops=1) TSP:CHKUPL:OK TSM:UPL:OK TSM:READY TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0 TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0 TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok: Request registration... TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2 TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1 Node registration=1 Init complete, id=1, parent=0, distance=1, registration=1 50 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:50 55 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:55 57 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57 57 56 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:56 56 57 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57 58 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:58 57 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57 58 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:58 56 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:56 55 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=1,st=fail:55 55 55 59 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=2,st=fail:59 58 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=3,st=fail:58 56 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:56 58 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:58 !TSM:UPL FAIL, SNP TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: 56 !TSP:SEND:TNR``` -
My sensors are located about 3 meters apart with nothing in between. To mitigate the packet loss I've increased by the Gateway to RF24_PA_HIGH and the Arduino to RF24_PA_MAX. I tested MAX on the Gateway aswell, but it didn't seem to handle this setting.
Note I've changed the code of the Node - it now sends a number per msg, and it increases by 1 for each message. This way I found it easier to track which msg that succeeded and which didn't.
First it looked ok, but the msg started to fail after some time (note: I have 3 seconds between each message now)
When I start the Gateway by using "sudo ./examples_linux/mysGateway -d" it starts fine, and connects with the Arduino which I restart at the same time as I type the code above in terminal to start the Gateway on the Raspberry Pi.
After the setup it seems like most of the first 13 messages go through successfully. Then the next 10 messages fail (atleast looks like it on the GW debug info). Then there is another good period from 23-40, but with a few lost. Then the rest fail, and the sensor also starts reporting the messages as failed. After this I have to restart the Sensor node to be able to regain communication.
Do anyone know what is wrong... ?
The Raspberry Pi Gateway:
pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d mysGateway: Starting gateway... mysGateway: Protocol version - 2.0.1-beta mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta mysGateway: TSF:LRT:OK mysGateway: TSM:INIT mysGateway: TSM:INIT:TSP OK mysGateway: TSM:INIT:GW MODE mysGateway: TSM:READY mysGateway: MCO:REG:NOT NEEDED mysGateway: MCO:BGN:STP mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:2 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 mysGateway: !TSF:MSG:LEN,0!=8 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:3 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:4 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,17!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:8 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:9 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:10 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:11 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13 mysGateway: !TSF:MSG:LEN,0!=9 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,0!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:23 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:25 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:25 mysGateway: !TSF:MSG:LEN,0!=9 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:28 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:30 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,9!=7 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:31 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:33 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:34 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:37 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:40 mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:40 mysGateway: !TSF:MSG:LEN,0!=9And the Arduino sensor node:
Starting sensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSP:MSG:FPAR RES (ID=0, dist=0) TSP:MSG:PAR OK (ID=0, dist=1) TSM:FPAR:OK TSM:ID TSM:CHKID:OK (ID=1) TSM:UPL TSP:PING:SEND (dest=0) TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1 TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1 TSP:MSG:PONG RECV (hops=1) TSP:CHKUPL:OK TSM:UPL:OK TSM:READY TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0 TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100 TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0 TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok: Request registration... TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2 TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1 Node registration=1 Init complete, id=1, parent=0, distance=1, registration=1 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:0 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:1 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:2 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:3 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:4 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:5 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:6 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:7 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:8 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:9 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:10 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:11 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:12 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:13 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:14 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:15 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:16 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:17 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:18 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:19 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:20 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:21 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:22 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:23 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:24 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:25 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:26 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:27 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:28 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:29 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:30 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:31 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:32 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:33 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:34 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:35 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:36 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:37 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:38 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:39 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:40 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:41 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:42 TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:43 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:44 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=1,st=fail:45 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=2,st=fail:46 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=3,st=fail:47 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:48 !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:49 !TSM:UPL FAIL, SNP TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: !TSP:SEND:TNR !TSP:SEND:TNR !TSP:SEND:TNR !TSP:SEND:TNR -
HI,
I've been doing some testing. I have two Gateways
- Raspberry Pi 2 with a NRF24L01+ module connected to the GPIO pins
- Arduino Nano with a NRF24L01+ module connected via a breadboard to my MacBook Pro
The sensor node is an Arduino Uno with a NRF24L01+ module. This sensor is sending out a higher number for each packet (eg. 1, 2, 3, 4)
Between the Raspberry Pi 2 gateway is have a lot of data loss as shown in earlier posts even with just 3 meters a part. However using the Arduino Nano as the gateway I can walk across the apartment with loosing anything (10+ meters away).
I've switched the NRF24L01 modules around and the result is the same.
I have now two possible reasons:
- Something is wrong related to the Raspberry Pi 2 - The code, libraries, power to the NRF24L01 etc.
- The Raspberry Pi is next to my ASUS RT-AC87U wireless router... maybe it is interfering (I don't think it is this, as I didn't have any packet loss with the Arduino Nano when I held it next to the router)
I therefore think it is related to point 1. The Raspberry Pi 2. But don't know what it could be...
Any ideas?
-
HI,
I've been doing some testing. I have two Gateways
- Raspberry Pi 2 with a NRF24L01+ module connected to the GPIO pins
- Arduino Nano with a NRF24L01+ module connected via a breadboard to my MacBook Pro
The sensor node is an Arduino Uno with a NRF24L01+ module. This sensor is sending out a higher number for each packet (eg. 1, 2, 3, 4)
Between the Raspberry Pi 2 gateway is have a lot of data loss as shown in earlier posts even with just 3 meters a part. However using the Arduino Nano as the gateway I can walk across the apartment with loosing anything (10+ meters away).
I've switched the NRF24L01 modules around and the result is the same.
I have now two possible reasons:
- Something is wrong related to the Raspberry Pi 2 - The code, libraries, power to the NRF24L01 etc.
- The Raspberry Pi is next to my ASUS RT-AC87U wireless router... maybe it is interfering (I don't think it is this, as I didn't have any packet loss with the Arduino Nano when I held it next to the router)
I therefore think it is related to point 1. The Raspberry Pi 2. But don't know what it could be...
Any ideas?
@Christian-Simonsen I have been testing RPi 3 with nrf24l01+ for a month or so - it works just fine.
Your problem (TSM:MSG:LEN) is more related to a communication error between the transceiver and RPi/Arduino. Firstly, try adding the following#define MY_RF24_SANITY_CHECKThe way I have it setup on my RPi is that I feed nrf24l01+ via 5V pin through AMS1117 3.3
Remember that 3.3v is limited in terms of current (hence your problem with PA version).
I recommend using one of these boards designed by @GertSandersWhat transceivers do you have nrf24l01 or nrf2401+?
In relation to the data rate use the lower RF24_250KBPS (by default).
Another issue is RF24_PA_LEVEL_GW and RF24_PA_LEVEL
See - https://forum.mysensors.org/topic/4034/my-first-gateway
Remember if you have modules too close and set the PA leave high, the modules will be screaming to each other.Finally, appreciate your GW on Mac works fine as supposed to your RPi GW. There can be a few reasons for this. Just try to eliminate issues one by one. You have to do a lot of readings on this forum and some DIY trial and error.
-
@Christian-Simonsen I have been testing RPi 3 with nrf24l01+ for a month or so - it works just fine.
Your problem (TSM:MSG:LEN) is more related to a communication error between the transceiver and RPi/Arduino. Firstly, try adding the following#define MY_RF24_SANITY_CHECKThe way I have it setup on my RPi is that I feed nrf24l01+ via 5V pin through AMS1117 3.3
Remember that 3.3v is limited in terms of current (hence your problem with PA version).
I recommend using one of these boards designed by @GertSandersWhat transceivers do you have nrf24l01 or nrf2401+?
In relation to the data rate use the lower RF24_250KBPS (by default).
Another issue is RF24_PA_LEVEL_GW and RF24_PA_LEVEL
See - https://forum.mysensors.org/topic/4034/my-first-gateway
Remember if you have modules too close and set the PA leave high, the modules will be screaming to each other.Finally, appreciate your GW on Mac works fine as supposed to your RPi GW. There can be a few reasons for this. Just try to eliminate issues one by one. You have to do a lot of readings on this forum and some DIY trial and error.
Hi Alex,
I tested the Sanity check on the the Arduino sensor node, and status came back OK. However I could get this to work on the Raspberry Pi, seems like this function is not yet supported. At least I couldn't find any info on it using the "./configuration -h".
I don't have a AMS1117 available so I can test that.
I connected my Arduino Nano and NRF24L01+ to the Raspberry Pi via USB, that would really well. So I might just use this solution instead as I see little benefit of connecting the NRF24L01 directly to the GPIO pins on the Raspberry Pi.
Next step is to start building some battery powered sensors that I can use, and get MyController setup properly.