💬 Building a Raspberry Pi Gateway
-
I was able to compile it after doing what you're suggesting. It's still have error message during communication with the gateway but that is probably a noobs-error in my config. so I have to investigate a bit more.
-
Hi
I enabled SPI. For Rasberry PI B it was under 5. Interfacing options. The build completed successfully. Thanks!
But there is a problem...When I run mysqgw -d I get:
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:PDTI also tried development release. Works perfectly. Looks like there is problem with stable.
-
Have the same problem with the stable branch as @Oliviakrk using the NRF24 transport on an Raspberry PI B, it might be a driver issue, is see that the make for the development branche builds the BCM drivers while the master branche does not.
-
Hi I followed the instructions, but I can't get it to work, I have a Raspberry Pi 1 Rev1 with NRF24 connected following the instructions.
First I configured it just using ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0 --soc=BCM2835 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-gateway=ethernet --my-port=5003
I also tried with almost every combination but I always get the same errors.
The idea is for it to be used as a standalone GW running from RPI with RF directly attached to it (SPI is enabled and I don't get any errors when compiling)
I can send the logs if needed, any help will be welcome, thanks!
pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:PDT
mysgw: TSM:FAIL:RE-INIT
mysgw: TSM:INIT
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=2
mysgw: TSM:FAIL:PDT -
Tried it and got the same output, I also tried with a different NRF24 just in case and doublechecked the connections. are the options I am using ok?
./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0 --soc=BCM2835 --my-debug=enable --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-gateway=ethernet --my-port=5003 -
@gohan, Thank you! I got it to work. First I tried with the development branch and it didn't work either, then I used the following instructions https://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection
And when that didn't work either I rechecked the wiring which ended up being the reason for it to fail previously, "faulty wires".
I got it to work with the master branch.pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED -
Hi.
I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
cu: open (/dev/ttyMySensorsGateway): Permission denied
cu: /dev/ttyMySensorsGateway: Line in use
With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
Could someone explain me what's ne next step for? -
Hi.
I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
cu: open (/dev/ttyMySensorsGateway): Permission denied
cu: /dev/ttyMySensorsGateway: Line in use
With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
Could someone explain me what's ne next step for?Welcome to the MySensors community @Djames-Suhanko
It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry
That version of the gateway has a debug mode where you can see the messages in the console.
The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network
-
I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it
@gohan Thank you to answer! Good tip, I will do that!
-
Welcome to the MySensors community @Djames-Suhanko
It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry
That version of the gateway has a debug mode where you can see the messages in the console.
The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network
@mfalkvidd Yes, I'm using 1.5. Thank you for suggest me the newer version. I will update it today!
-
Hello, all!
I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
"MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.I used this parameters in configure:
./configure --my-transport=nrf24 --my-gateway=ethernet
--my-port=5003 --my-controlle-ip-address=192.168.1.2
--my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1I couldn't find a solution yet. Can someone help me?
-
Hello, all!
I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
"MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.I used this parameters in configure:
./configure --my-transport=nrf24 --my-gateway=ethernet
--my-port=5003 --my-controlle-ip-address=192.168.1.2
--my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1I couldn't find a solution yet. Can someone help me?
-
wow, it's was really fast! Thanks to answer. I'm use an ethernet interface. It's up but have no cable on their. I didn't install a controller yet, so, is there no problem yet, right?
Sorry that, I'm really a newbie using MySensors.[updating]
ysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:PDT
mysgw: TSM:FAIL:RE-INIT
mysgw: TSM:INIT
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=2
mysgw: TSM:FAIL:PDT -
@Djames-Suhanko said in 💬 Building a Raspberry Pi Gateway:
--my-controlle-ip-address
this also is not necessary. Also for now remove all these --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1
and use it as ethernet gateway to keep it simple