Sadly not. I ended up creating an serial gateway (arduino with NRF24L01 and a USB connector) and connected this to the Raspberry Pi, rather than connecting the NRF24L01 directly to the GPIO pins. This worked perfectly straight away.
Posts made by Christian Simonsen
-
RE: 💬 Building a Raspberry Pi Gateway
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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.
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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?
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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!=9
And 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
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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:57
And 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```
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
You are 100 % correct
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 58
And 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
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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.
-
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno said:
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
looks like a power issue with the nrf24 module.
Ok,
I've tested with the Voltmeter and the NRF24L01 module do get a steady 3.26 V. Both the gateway module and the Arduino sensor node...
Im now building a few extra sensor nodes, so I can test without the Raspberry pi. Hopefully I can atleast get them talking based on Arduinos first. Before testing the Raspberry Pi.
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
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/mysGateway
Sudo 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.o
Sudo 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.service
start the gateway
pi@raspberrypi:~/MySensors $ sudo systemctl start mysgateway.service
Start 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!=7
Now, 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:PDT
Frustrating... Can it be other modules, libraries than what I've not installed on the Raspberry Pi that is the reason for the error?
-
RE: How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
@alexsh1 said:
FPAR: FAIL = Find Parent Fail. The sensor is looking for a parent, but cannot find it. There can be several reasons for this:
- Try to add larger capacitors to both radios on GW and the sensor.
- Please use a default sketch on the sensor, no signing etc.
- Double check if the channel is the same. You are using channel 0 on RPi. What about the sensor? Did you change it from a default 76?
- Did you upload both sketches using MySensors 2.0?
- Please check the power feed on both GW and the sensor.
Hi thanks for the support. Hope you are able to elaborate a bit on your points.
-
Try to add larger capacitors to both radios on GW and the sensor.
I'm using a 4.7 uF Capacitator on both the NRF24L01 on the Raspberry Pi, and on the NRF24L01 on the Arduino. Do you think I still need a bigger capacitor? -
** Please use a default sketch on the sensor, no signing etc.**
Can you share a default sketch to use?
I have tried the below sketch from this page https://www.mysensors.org/download/sensor_api_20#sensor-nodes
But the sketch do not compile due to non defined NODE_ID. I tried to updated the code by changing NODE_ID to MY_NODE_ID and added a line to #DEFINE MY_NODE_ID 1Is this correct? See the updated code that I've used below
#define MY_RADIO_NRF24 #define MY_DEBUG #include <MySensors.h> #include <SPI.h> #define MY_NODE_ID 1 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC MyMessage msg(MY_NODE_ID, V_TRIPPED); void presentation() { present(MY_NODE_ID, S_DOOR); } void loop() { }
With this code I still get an error (this is the Arduino Uno sensor node)
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
- Did you upload both sketches using MySensors 2.0?
Not sure how you upload the sketch to the RPI 2 using MySenors 2.0. However I have atleast tried to follow this tutorial. https://www.mysensors.org/build/raspberry
The actual steps I did are repeated below.
git clone https://github.com/mysensors/MySensors.git cd MySensors
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24
sudo make all
sudo make install
sudo systemctl enable mysgateway.service
sudo ./examples_linux/mysGateway -d
- Please check the power feed on both GW and the sensor.
How do you do this?
-
How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
Hi,
I'm stuck trying to setup my Raspberry Pi 2 with NRF24L01 to the GPIO pins as a Gateway and as a controller (MyController.org). Im trying to use MySensors 2.0 library. I will gladly pay a bit if someone can help with 1-to-1 via Skype or similar to get this working. As Im close to giving up on my own...
Any help is very much appreciated.
Configuration of the gateway on the Raspberry Pi 2
pi@raspberrypi:~/MySensors $ ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24 --my-rf24-channel=0 [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 command on the Raspberry Pi 2 via Terminal on my Mac.
pi@raspberrypi:~/MySensors $ make 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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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=0 -DMY_LINUX_SERIAL_PTY=\"/dev/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.o
I then ran the mysGateway
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!=7 --Continues with same code a lot longer - just cut it short here
Then over to the Arduino Uno that is also connect with an NRF24L01
The sketch I'm running on the Arduino
/* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* */ #include <stdint.h> #include <pins_arduino.h> #define MY_DEBUG #define MY_DEBUG_VERBOSE_SIGNING #define MY_RF24_CHANNEL 0 #define MY_RADIO_NRF24 //#define MY_SIGNING_SOFT #define MY_SIGNING_ATSHA204 #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} #define MY_SIGNING_REQUEST_SIGNATURES #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 #endif #ifndef MY_SIGNING_ATSHA204_PIN #define MY_SIGNING_ATSHA204_PIN 17 #endif #define MY_RF24_ENABLE_ENCRYPTION #include <SPI.h> #include <MySensors.h>
However with this sketch I'm recieving an error that I can read on the Serial Monitor on my Mac (output from the Arduino sensor node)
Starting sensor (RNNNAA, 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
I don't understand what is wrong. I do believe all the wires are correct, so I believe it is related to the Arduino sketch, or more likely the gateway setup on the Raspberry Pi.
I hope someone can help. I'll gladly pay someone to give me some 1-to-1 support over Skype or similar.
-
RE: 💬 Building a Raspberry Pi Gateway
Hi,
Is there anyone here that can give me some one-to-one support this evening to setup the Raspberry Pi + NRF24L01 as a gateway with MyController, and a Arduino Uno + NRF24L01 as Sensor node. I'm stuck after trying various things over the past week, so looks like I need some additional skills/knowledge to get the first setup working.
Maybe we can use Skype or some other medium. I will gladly pay a bit for this support if anyone is interested. I have some free time from 18:00 CET - 23:30 CET today...
-
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno said:
cd MySensors
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --myThanks for letting me know, didn't know that not running it from the specific folder would have an impact.
I reconfigured it as you recommended. and restarted the gateway, with the result below.
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!=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!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,14!=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!=7 mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysGateway: !TSF:MSG:LEN,14!=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
What is the best way to test if the gateway work? What sketch should I use on the arduino? and how do I see in Terminal that the mysGateway receive the transfer successfully?
-
RE: 💬 Building a Raspberry Pi Gateway
Seems I'm closing in to working solution. I didn't understand how to use the ./configure element before now. However I ended up with these configurations
pi@raspberrypi:~ $ ./MySensors/configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24 --my-rf24-irq-pin=15 [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. make: *** No rule to make target 'clean'. Stop. [OK] Finished. pi@raspberrypi:~ $ sudo ./MySensors/examples_linux/mysGateway -d mysGateway: Starting gateway... mysGateway: Protocol version - 2.0.1-beta mysGateway: MCO:BGN:INIT GW,CP=RNNG--Q,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: TSM:READY:NWD REQ mysGateway: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: mysGateway: TSF:SRT:OK
Based on this it seem to all be ok on the Raspberry Pi side.. So I uploaded the "MockMySensors" sketch to my Arduino Uno with NRF24 connected. Below is the code and failure message I get from the Arduino. Do I need to set a gateway address or something?
Starting sensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=254) TSM:FPAR TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSM:FPAR TSP:MSG:SEND 254-254-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```
-
RE: 💬 Building a Raspberry Pi Gateway
Thanks I'll test it. But it seems like I've jumped over a step or two. Or something isn't working. Nothing happened when I wrote "Make" in Terminal, so I jumped over this step. I guess that might be the problem.
Do I have to configure (./configure -help) or can I use the default values when I connect the NRF24L01 to the GPIO pins?
-
RE: 💬 Building a Raspberry Pi Gateway
Hi,
Background: I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. I have also set up the raspberry pi as a gateway in the MyController Gateway setup page in Safari. It found it and it seem to work.
However to my question. How do I know if the Raspberry Pi gateway with NRF24L01 work? How can I monitor what the Raspberry Pi gateway receive? Is there a similar way as the "Serial Monitor" that I use in the Arduino application, when accessing Arduino Uno via USB?
If there is I need to monitor this via OSX Terminal.
-
Gateway do not receive info from sensor node
Hi guys,
I feel Im getting closer.
I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. I've managed to add the Raspberry Pi as a controller in MyController.
Next step is to be able to send something from a Arduino based sensor node. I have an Arduino Uno, with an NRF24L01 module connected.
I uploaded the
"hard_signing_whitelisting_full_debug_nrf24_rsa" sketch and the result was this in the Serial Monitor.Starting sensor (RNNNAA, 2.0.0)
TSM:INIT
TSM:RADIO:OK
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
!TSM:FAILURE
TSM:PDTSeem to fail, but not sure why... any suggestions?
-
RE: 💬 Building a Raspberry Pi Gateway
@Christian-Simonsen said:
I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. And I have followed the steps under "install and build", which seem to have worked fine. I didn't make any changes to the conf file. However now Im stuck. How do I setup the Raspberry Pi with the NRF24L01+ as a gateway in the MyController Gateway setup page in Safari?
Thanks that did the trick
-
RE: 💬 Building a Raspberry Pi Gateway
Hi,
I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. And I have followed the steps under "install and build", which seem to have worked fine. I didn't make any changes to the conf file. However now Im stuck. How do I setup the Raspberry Pi with the NRF24L01+ as a gateway in the MyController Gateway setup page in Safari?
-
RE: Issues with setting up my Arduino Nano SerialGateway
Hi,
Now I have also tried the original RF24 library by ManiacBug (link). And I got this results in the Serial Terminal.
STATUS = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0 RX_ADDR_P0-1 x00 = 0x0000000000 0x0000000000 RX_ADDR_P2-5 x00 = 0x00 0x00 0x00 0x00 TX_ADDR = 0x0000000000 RX_PW_P0-6 x00 = 0x00 0x00 0x00 0x00 0x00 0x00 EN_AA = 0x00 EN_RXADDR x00 = 0x00 RF_CH = 0x00 RF_SETUP x00 = 0x00 CONFIG = 0x00 DYNPD/FEATURE x00 = 0x00 0x00 Data Rate = 1MBPS Model = nRF24L01 CRC Length = Disabled PA Power = PA_MIN
From what I can understand the Arduino is able to send and receive responses (even though I only have one NRFmodule running... so not sure what is given the response to the NRF... )
Now sending 55497...ok...Got response 4294967295, round-trip delay: 55499 Now sending 56500...ok...Got response 4294967295, round-trip delay: 56502 Now sending 57502...failed. Got response 4294967295, round-trip delay: 58083 Now sending 59082...failed. Got response 4294967295, round-trip delay: 59675 Now sending 60675...ok...Got response 4294967295, round-trip delay: 60691 Now sending 61690...ok...Got response 4294967295, round-trip delay: 61692 Now sending 62693...ok...Got response 4294967295, round-trip delay: 62695 Now sending 63695...ok...Got response 4294967295, round-trip delay: 63711
On in the other mode I'm getting this...
Got payload 4294967295...Sent response. Got payload 4294967295...Sent response. Got payload 4294967295...Sent response. Got payload 4294967295...Sent response. Got payload 4294967295...Sent response. Got payload 4294967295...Sent response
The odd part is, why do I then not get the MySensor SerialGateway sketch to work... any thoughts?
-
RE: Issues with setting up my Arduino Nano SerialGateway
Hi,
I found the TMRh20/RF24 library on GitHub and I uploaded the GetStarted sketch to the Arduino. Not sure if it is working but atleast a lot started happening in the Serial Monitor.
RF24/examples/GettingStarted *** PRESS 'T' to begin transmitting to the other node Sent response 16908288 Sent response 0 Sent response 1040677376 Sent response 0 Sent response 671495 Sent response 4294903807 Sent response 50331648 Sent response 50331648 Sent response 65536 Sent response 16777292 Sent response 0 Sent response 33554434 Sent response 0 Sent response 167903239 Sent response 167903239 Sent response 32639 Sent response 2 Sent response 512 Sent response 33554434 Sent response 1057423360 Sent response 1057423360 Sent response 1057161279 Sent response 4294967295 Sent response 0
Then I pressed "T" in the Serial Monitor and then this happend:
*** CHANGING TO TRANSMIT ROLE -- PRESS 'R' TO SWITCH BACK Now sending failed Failed, response timed out. Now sending Sent 127157552, Got response 0, Round-trip delay 1730592 microseconds Now sending Sent 129889960, Got response 0, Round-trip delay 3673784 microseconds Now sending Sent 134565556, Got response 0, Round-trip delay 4033292 microseconds Now sending Sent 139600664, Got response 0, Round-trip delay 4093332 microseconds Now sending Sent 144695808, Got response 0, Round-trip delay 16792 microseconds Now sending Sent 145714324, Got response 0, Round-trip delay 3975708 microseconds Now sending Sent 150691860, Got response 0, Round-trip delay 4035408 microseconds Now sending Sent 155729096, Got response 0, Round-trip delay 4196592 microseconds Now sending Sent 160927500, Got response 0, Round-trip delay 3815552 microseconds
To me it seems to work..
-
RE: Issues with setting up my Arduino Nano SerialGateway
Ok,
Is there a sketch that I can use that I can use to test/debug the NRF module specifically that might help identify what I am doing wrong or the if the module is bad?
I see some refer to running "Get Started".... but can't seem to find out what they are referring to...
-
RE: Issues with setting up my Arduino Nano SerialGateway
Fake NRF chips seems like the most plausible reason so far. The chips do look of bad quality.... but whether the chips are the issues or not is difficult to say..
Can you judge from the pictures?
-
RE: Issues with setting up my Arduino Nano SerialGateway
The chip marking is "NRF M 24L01+ 1452AB" - so I assume it is a + module.
I've tried to rewire it multiple times, I will try again.
-
RE: Issues with setting up my Arduino Nano SerialGateway
I've also tried to switch the MISO and MOSI just in case I had got it wrong. No effect. Still the same error.. Running out of ideas...
-
RE: Issues with setting up my Arduino Nano SerialGateway
I have now also tried the long-range version (link) and Im getting the same error. "0;0;3;0;9;radio init fail"
-
RE: Issues with setting up my Arduino Nano SerialGateway
In case it was something wrong with the Arduino Nano, I've replaced it and tried another. However Im still getting the same error. "0;0;3;0;9;radio init fail".
-
RE: Issues with setting up my Arduino Nano SerialGateway
Ref your suggestions.
-
Always power the radio with 3.3V never 5V (which I assume is your VCC pin).
So I guess my wiring is correct then if I understood you correctly. VCC is 5V and should not be used in my case. -
Add a capacitor (4.7uF) as close to the radio as possible. (I always stick them, in the female pins of the Dupont cable).
- I already have a 4.7uF (50V) capacitor between GND and VCC on the NRF board, done the same way as you describe. -
Double check the wiring. Make sure that MOSI and MISO aren't changed e.t.c.
- I've checked the NRF chip on the board and traced the connections to the PIN, and I can verify that the output pins are in the same way as the tutorial linked to above (Chip marking: NRF M 24L01+ 1452AB) - And double checked the wiring, can't find any errors -
Select the correct board and processor in your Arduino IDE/
I uploaded the sketch again to the Arduino, and this removed the strange symbols in the Serial Monitor. Now I get "St0;0;3;0;9;radio init fail".
I've also replaced the NRF module with another one ( I have 10). This didn't work either.
Do I need to change anything in the sketch? eg. the input pins on the Arduino?
By the way - I see no lights (LEDs) or signs that the NRF module receive any power. Not sure if there are any tiny LEDs on it... but it seems like it is..
-
-
Issues with setting up my Arduino Nano SerialGateway
Hi,
I have a Arduino Nano (link) bought on eBay. And the NRF24L01 module also bought on ebay (link).
The NRF module do not have any markings of the pins and the ebay product page do not contain any information either. I've therefore assumed that the pins are the same as on the tutorial page (link).
I've uploaded the SerialGateway sketch to the Arduino Nano successfully without any changes. When looking at the Serial Monitor I get this message. "K��0;0;3;0;9;radio init fail" or "�RV��#�0;0;3;0;9;radio init fail" after trying to rewire it all from scratch.
The Arduino Nano have the possibility to output 3.3 and 5 V, I've therefore used the Arduino Nano 3.3v pin rather than the recommended VCC pin (that I assume output 5V). Not sure if this is wrong...
I'm using OSX 10.11.3 and Arduino 1.6.7. Though not sure if that is relevant.
Do you have any tips as to what I'm doing wrong?
-
What is the best controller for Apple devices (OSX and iOS)
Hi,
I have mainly Apple devices and hope to integrate my various smart sensors in a way that they can easily send notifications to my iOS devices and be controlled to/from the iOS devices. If possible it would be great to integrate it with HomeKit to be able to controll the various devices / smart sensors with Siri.
Examples:
- What is the temperature in the living room?
- Do I have any mail in the mailbox?
- Turn on the light in the living room
- Turn on the Apple TV
- Turn on Netflix on my TV
- What is the moisture level of my Rosemary herbs
I see that there is a new app named "Home - Smart Home Automation" which looks really nice, but I haven't tested it yet. And of course there is Vera controller, but I understand it is not expected that it will support HomeKit and Siri.
What do you recommend?