Gateway on Raspberry Pi not responding properly [SOLVED]
-
@Sparkman as Mentioned in the post:
radios have 4.7uF electrolytic capacitors between the Vcc and Gnd pins on the NRF24L01+ chip, with the > side connected to ground. 3.3V power to the Arduino is through a FTDI FT232RL.I have not selected the parent id (not that I am aware of anyway)
-
@mfalkvidd Sorry, missed that part. Do you have sensor acting as a repeater somewhere with that node id? It looks like (to me anyways) that both the gateway and sensor are trying to send to node 194. Do you know what that is?
Cheers
Al -
No problem :)
No, I don't know what that node is. Could it be my old Raspberry Pi 1? It used a low parent id (1 I think) though, and it is powered off now. The Raspberry Pi 2 has been rebooted after the Raspberry Pi 1 was shut down, and the Arduino has had its eeprom cleared so they shouldn't be able to remember anything (I think).
Could be a neighbor's Gateway I guess? -
This is the output from the sensor after clearint the eeprom when I have no Gateway running
find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: sensor started, id=255, parent=255, distance=255 find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:since there are no replies, I don't think another Gateway is interfering.
-
Does the serial gateway store state somewhere? I have run the gateway through strace to see which files it opens and I've browsed the source code but I am not able to find any clues.
EDIT: Is there a way to make the Gateway be more verbose? (MyConfig.h already has #define DEBUG) with no // in front -
This is the output from the sensor at first start after clearing the eeprom, when my old Gateway is on:
find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: read: 0-0-255 s=255,c=3,t=8,pt=1,l=1,sg=0:0 parent=0, d=1 req id send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok: read: 0-0-255 s=255,c=3,t=4,pt=0,l=2,sg=0:7 send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 id=7 send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 read: 0-0-7 s=255,c=3,t=6,pt=0,l=2,sg=0:M sensor started, id=7, parent=0, distance=1 send: 7-7-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,st=ok:Energy Meter send: 7-7-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0 send: 7-7-0-0 s=0,c=0,t=17,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=1,c=0,t=23,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=2,c=0,t=14,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=0,c=2,t=24,pt=0,l=0,sg=0,st=fail: -
This is the output from the sensor at first start after clearing the eeprom, when my old Gateway is on:
find parent send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc: read: 0-0-255 s=255,c=3,t=8,pt=1,l=1,sg=0:0 parent=0, d=1 req id send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok: read: 0-0-255 s=255,c=3,t=4,pt=0,l=2,sg=0:7 send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 id=7 send: 7-7-0-0 s=255,c=0,t=17,pt=0,l=3,sg=0,st=ok:1.5 send: 7-7-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 read: 0-0-7 s=255,c=3,t=6,pt=0,l=2,sg=0:M sensor started, id=7, parent=0, distance=1 send: 7-7-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,st=ok:Energy Meter send: 7-7-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0 send: 7-7-0-0 s=0,c=0,t=17,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=1,c=0,t=23,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=2,c=0,t=14,pt=0,l=0,sg=0,st=fail: send: 7-7-0-0 s=0,c=2,t=24,pt=0,l=0,sg=0,st=fail:@mfalkvidd Looks like it was working much better with the old gateway as it found the parent and a node ID got assigned. There are still some communication issues though will all of the fails at the end. If the sensor is sending a bunch of info right after each other, it may be cause by power brownouts. Try putting a small delay between each send to see if that improves it. On your Rpi2, there must be some type of communication issue between the hardware and Domoticz. I believe the gateway is completely stateless. There may not be an easy way to make the gateway more verbose. You could add some println statements in the code manually.
Cheers
Al -
I took a step back and installed Domoticz from their Raspberry Pi image (the same version I used in my rpi1, v2.2563). Installed the Gateway the same way as before. Same problem, the Gatway forwards all traffic to node 192!
I then re-compiled the Gateway with librf24-bcm instead of tmrh20. Voilà, it works!I have no idea why tmrh20 tricks the Gateway into forwarding everything for node 192, but I'm happy now that the communication works again.
-
I took a step back and installed Domoticz from their Raspberry Pi image (the same version I used in my rpi1, v2.2563). Installed the Gateway the same way as before. Same problem, the Gatway forwards all traffic to node 192!
I then re-compiled the Gateway with librf24-bcm instead of tmrh20. Voilà, it works!I have no idea why tmrh20 tricks the Gateway into forwarding everything for node 192, but I'm happy now that the communication works again.
@mfalkvidd Glad you got it resolved!
Cheers
Al