💬 Building a Raspberry Pi Gateway
-
Yes, I don't want signing. But what you wrote said that it wil ENABLE signing. Check your sentence. Probably a typo, but I wanted to make sure :-)
-
Yes, I don't want signing. But what you wrote said that it wil ENABLE signing. Check your sentence. Probably a typo, but I wanted to make sure :-)
-
@alowhum said in 💬 Building a Raspberry Pi Gateway:
--my-signing-weak_security
But does the "--my-signing-weak_security" enable signing?
I want to disable signing completely. What flags do I need to use when building a gateway that only uses encryption?
-
@alowhum said in 💬 Building a Raspberry Pi Gateway:
--my-signing-weak_security
But does the "--my-signing-weak_security" enable signing?
I want to disable signing completely. What flags do I need to use when building a gateway that only uses encryption?
-
@masmat it needs to be defined prior to the inclusion of mysensors.h. That should be it. (on the arduino node that is).
@anticimex I've built a new node, DHT11 that sends temp&hum data. I reconfigured Rpi with this:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18This is what I get in gw syslog:
Apr 2 22:53:11 DietPi mysgw: Starting gateway... Apr 2 22:53:11 DietPi mysgw: Protocol version - 2.2.0 Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0 Apr 2 22:53:11 DietPi mysgw: !SGN:BND:PWD<8 Apr 2 22:53:11 DietPi mysgw: !SGN:INI:BND FAIL Apr 2 22:53:11 DietPi mysgw: TSF:LRT:OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT Apr 2 22:53:11 DietPi mysgw: TSF:WUR:MS=0 Apr 2 22:53:11 DietPi mysgw: TSM:INIT:TSP OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT:GW MODE Apr 2 22:53:11 DietPi mysgw: TSM:READY:ID=0,PAR=0,DIS=0 Apr 2 22:53:11 DietPi mysgw: MCO:REG:NOT NEEDED Apr 2 22:53:11 DietPi mysgw: MCO:BGN:STP Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT OK,TSP=1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT RECONNECT Apr 2 22:53:11 DietPi mysgw: connected to 127.0.0.1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT CONNECTED Apr 2 22:53:11 DietPi mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT Apr 2 22:53:23 DietPi mysgw: TSF:MSG:READ,99-99-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Apr 2 22:53:23 DietPi mysgw: TSF:MSG:BC Apr 2 22:53:23 DietPi mysgw: TSF:MSG:FPAR REQ,ID=99 Apr 2 22:53:23 DietPi mysgw: TSF:PNG:SEND,TO=0 Apr 2 22:53:23 DietPi mysgw: TSF:CKU:OK Apr 2 22:53:23 DietPi mysgw: TSF:MSG:GWL OK Apr 2 22:53:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=8 Apr 2 22:53:23 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:READ,99-99-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=24 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:PINGED,ID=99,HP=1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=25 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 Apr 2 22:54:18 DietPi mysgw: TSF:MSG:READ,99-99-0,s=1,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:18 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:18 DietPi mysgw: !SGN:NCE:GEN Apr 2 22:54:23 DietPi mysgw: TSF:MSG:READ,99-99-0,s=0,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:23 DietPi mysgw: !SGN:NCE:GENThis is kicking my butt... I cant understand that last part about the nonce :(
I will add the code from the node as soon as possible. -
@anticimex I've built a new node, DHT11 that sends temp&hum data. I reconfigured Rpi with this:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18This is what I get in gw syslog:
Apr 2 22:53:11 DietPi mysgw: Starting gateway... Apr 2 22:53:11 DietPi mysgw: Protocol version - 2.2.0 Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0 Apr 2 22:53:11 DietPi mysgw: !SGN:BND:PWD<8 Apr 2 22:53:11 DietPi mysgw: !SGN:INI:BND FAIL Apr 2 22:53:11 DietPi mysgw: TSF:LRT:OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT Apr 2 22:53:11 DietPi mysgw: TSF:WUR:MS=0 Apr 2 22:53:11 DietPi mysgw: TSM:INIT:TSP OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT:GW MODE Apr 2 22:53:11 DietPi mysgw: TSM:READY:ID=0,PAR=0,DIS=0 Apr 2 22:53:11 DietPi mysgw: MCO:REG:NOT NEEDED Apr 2 22:53:11 DietPi mysgw: MCO:BGN:STP Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT OK,TSP=1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT RECONNECT Apr 2 22:53:11 DietPi mysgw: connected to 127.0.0.1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT CONNECTED Apr 2 22:53:11 DietPi mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT Apr 2 22:53:23 DietPi mysgw: TSF:MSG:READ,99-99-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Apr 2 22:53:23 DietPi mysgw: TSF:MSG:BC Apr 2 22:53:23 DietPi mysgw: TSF:MSG:FPAR REQ,ID=99 Apr 2 22:53:23 DietPi mysgw: TSF:PNG:SEND,TO=0 Apr 2 22:53:23 DietPi mysgw: TSF:CKU:OK Apr 2 22:53:23 DietPi mysgw: TSF:MSG:GWL OK Apr 2 22:53:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=8 Apr 2 22:53:23 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:READ,99-99-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=24 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:PINGED,ID=99,HP=1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=25 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 Apr 2 22:54:18 DietPi mysgw: TSF:MSG:READ,99-99-0,s=1,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:18 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:18 DietPi mysgw: !SGN:NCE:GEN Apr 2 22:54:23 DietPi mysgw: TSF:MSG:READ,99-99-0,s=0,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:23 DietPi mysgw: !SGN:NCE:GENThis is kicking my butt... I cant understand that last part about the nonce :(
I will add the code from the node as soon as possible. -
@anticimex I've built a new node, DHT11 that sends temp&hum data. I reconfigured Rpi with this:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18This is what I get in gw syslog:
Apr 2 22:53:11 DietPi mysgw: Starting gateway... Apr 2 22:53:11 DietPi mysgw: Protocol version - 2.2.0 Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0 Apr 2 22:53:11 DietPi mysgw: !SGN:BND:PWD<8 Apr 2 22:53:11 DietPi mysgw: !SGN:INI:BND FAIL Apr 2 22:53:11 DietPi mysgw: TSF:LRT:OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT Apr 2 22:53:11 DietPi mysgw: TSF:WUR:MS=0 Apr 2 22:53:11 DietPi mysgw: TSM:INIT:TSP OK Apr 2 22:53:11 DietPi mysgw: TSM:INIT:GW MODE Apr 2 22:53:11 DietPi mysgw: TSM:READY:ID=0,PAR=0,DIS=0 Apr 2 22:53:11 DietPi mysgw: MCO:REG:NOT NEEDED Apr 2 22:53:11 DietPi mysgw: MCO:BGN:STP Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT OK,TSP=1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT RECONNECT Apr 2 22:53:11 DietPi mysgw: connected to 127.0.0.1 Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT CONNECTED Apr 2 22:53:11 DietPi mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT Apr 2 22:53:23 DietPi mysgw: TSF:MSG:READ,99-99-255,s=255,c=3,t=7,pt=0,l=0,sg=0: Apr 2 22:53:23 DietPi mysgw: TSF:MSG:BC Apr 2 22:53:23 DietPi mysgw: TSF:MSG:FPAR REQ,ID=99 Apr 2 22:53:23 DietPi mysgw: TSF:PNG:SEND,TO=0 Apr 2 22:53:23 DietPi mysgw: TSF:CKU:OK Apr 2 22:53:23 DietPi mysgw: TSF:MSG:GWL OK Apr 2 22:53:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=8 Apr 2 22:53:23 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:READ,99-99-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=24 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:PINGED,ID=99,HP=1 Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=25 Apr 2 22:53:25 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 Apr 2 22:54:18 DietPi mysgw: TSF:MSG:READ,99-99-0,s=1,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:18 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:18 DietPi mysgw: !SGN:NCE:GEN Apr 2 22:54:23 DietPi mysgw: TSF:MSG:READ,99-99-0,s=0,c=3,t=16,pt=0,l=0,sg=0: Apr 2 22:54:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16 Apr 2 22:54:23 DietPi mysgw: !SGN:NCE:GENThis is kicking my butt... I cant understand that last part about the nonce :(
I will add the code from the node as soon as possible. -
@mfalkvidd Made the password 10 characters. From looks of the logs, it's working now.
I cant believe I skipped the step of making the password longer... Just got too fixated on the password I came up with. -
@mfalkvidd Made the password 10 characters. From looks of the logs, it's working now.
I cant believe I skipped the step of making the password longer... Just got too fixated on the password I came up with. -
I just discovered these USB-to-NRF24 devices. Would it be possible to use that instead of connecting to the GPIO pins?
-
I just discovered these USB-to-NRF24 devices. Would it be possible to use that instead of connecting to the GPIO pins?
-
Background: I use signing software on some nodes + whitelisting on a node (of course only PI serial is on the whitelist).
With current --development branch (I think 2.3.0alpha) I cannot anymore set my previous personalized flags on gateway RPI3.
In detail, with current master (2.2.0) I can do:
sudo mysgw --set-soft-hmac-key=F618D4[...]848992B sudo mysgw --set-soft-serial-key=26[...]9 sudo mysgw --set-aes-key=EC7[...]CEB4WIth development I did see only the
--get[...]flags and cannot set anymore. Can you confirm?How can I set my previous values for signing?
-
Background: I use signing software on some nodes + whitelisting on a node (of course only PI serial is on the whitelist).
With current --development branch (I think 2.3.0alpha) I cannot anymore set my previous personalized flags on gateway RPI3.
In detail, with current master (2.2.0) I can do:
sudo mysgw --set-soft-hmac-key=F618D4[...]848992B sudo mysgw --set-soft-serial-key=26[...]9 sudo mysgw --set-aes-key=EC7[...]CEB4WIth development I did see only the
--get[...]flags and cannot set anymore. Can you confirm?How can I set my previous values for signing?
@sineverba I believe this change alters how rPi port handles signing related personalisation: https://github.com/mysensors/MySensors/commit/3c0b2727a56907277d4d04c985fd72b14e4a483c
And, as usual, the documentation is a good place to start ;) https://www.mysensors.org/apidocs-beta/group__MySigninggrpPub.html#MySigninggrphowuse
-
I'm currently compiling the code for connecting the NRF24l01+ directly to the Raspberry PI. Since I'm running the controller (on this case OpenHab) on the same Raspberry PI, would it be recommended the Ethernet or the serial flavor of it?
In the case of ethernet, can I place the own machine IP (127.0.0.1)? This way, if I need to change the IP address of the PI it wouldn't affect the communication between the controller and the MySensors code, right?
--my-gateway=ethernet --my-controller-url-address=127.0.0.1And by the way, for the signing configuration, it is mentioned in the documentation "Update the gateway config file with the generated keys/valeus", what file is that (name, path)?
I should be able to re-use the keys I have defined before, right? So I just go to step 2 (no need to generate new keys).
I'm refering to this link.Thanks,
-
I found that the configuration file is /etc/mysensors.conf but " The first time you start the gateway the configuration file will be created if it does not already exist.", so that's why I wasn't finding it.
Anyway, the file states that:
"Note: The gateway must have been built with signing support to use the options below."What flags should I include to have signing support?
OK, found it: just run ./configure -h and there is a list of options. Leaving it here just for future reference
-
I found that the configuration file is /etc/mysensors.conf but " The first time you start the gateway the configuration file will be created if it does not already exist.", so that's why I wasn't finding it.
Anyway, the file states that:
"Note: The gateway must have been built with signing support to use the options below."What flags should I include to have signing support?
OK, found it: just run ./configure -h and there is a list of options. Leaving it here just for future reference
-
I found that the configuration file is /etc/mysensors.conf but " The first time you start the gateway the configuration file will be created if it does not already exist.", so that's why I wasn't finding it.
Anyway, the file states that:
"Note: The gateway must have been built with signing support to use the options below."What flags should I include to have signing support?
OK, found it: just run ./configure -h and there is a list of options. Leaving it here just for future reference
-
Thanks for the replies.
I've changed the PI from a PI1 to a PI3 and was able to make it working with signing. Its running smoothly, I guess the GW is chosen :).
I'll now focus on the nodes, specially the SenseBender micros that are 2xAA battery powered and are consuming ~3% bat per day, but that will be for another post...
Thanks!
Joaoabs -
Hi, is there any way to check the current gateway operating parameters? My purpose is to check the radio channel and power level set before compilation but I would be glad if I could check other configurable parameters. I looked at Makefile.inc and found some flags set, but not the information I was looking for (does it mean that the default values are set)? Debug logs neither provide these informations.