Problems with the Raspberry Pi gateway
-
Hello! Please help to solve the problem.
Here's what is written at startup:mysgw: Starting gateway... mysgw: Protocol version - 2.2.0 mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0 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 mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TIN:ETH OK mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TPS:ETH OK mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TPS:ETH OK mysgw: connect: Connection refused mysgw: failed to connect
Here's what I wrote in the console:
git clone https://github.com/mysensors/MySensors.git --branch master cd MySensors ./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=192.168.1.2 make sudo ./bin/mysgw -d
-
Here, all that was written in the console:
[00:24:15] openhabian@openHABianPi:~$ git clone https://github.com/mysensors/MySensors.git --branch master Cloning into 'MySensors'... remote: Counting objects: 15830, done. remote: Total 15830 (delta 0), reused 0 (delta 0), pack-reused 15830 Receiving objects: 100% (15830/15830), 20.48 MiB | 3.49 MiB/s, done. Resolving deltas: 100% (9639/9639), done. [00:24:46] openhabian@openHABianPi:~$ cd MySensors [00:25:34] openhabian@openHABianPi:~/MySensors$ ./configure --my-transport=nrf24 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2837, Type=rpi3, CPU=armv7l. [SECTION] Detecting SPI driver. [OK] SPI driver detected:BCM. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. [00:26:09] openhabian@openHABianPi:~/MySensors$ ./configure --my-gateway=ethernet --my-port=5003 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2837, Type=rpi3, CPU=armv7l. [SECTION] Detecting SPI driver. [OK] SPI driver detected:BCM. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. [00:27:08] openhabian@openHABianPi:~/MySensors$ ./configure --my-gateway=ethernet --my-controller-ip-address=192.168.1.2 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2837, Type=rpi3, CPU=armv7l. [SECTION] Detecting SPI driver. [OK] SPI driver detected:BCM. [SECTION] Detecting init system. [OK] init system detected: systemd. [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. [00:27:40] openhabian@openHABianPi:~/MySensors$ make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/log.c -o build/drivers/Linux/log.o g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o g++ -MT build/drivers/Linux/GPIO.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o g++ -MT build/drivers/Linux/SPIDEV.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SPIDEV.cpp -o build/drivers/Linux/SPIDEV.o g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o g++ -MT build/drivers/Linux/interrupt.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o gcc -MT build/drivers/BCM/bcm2835.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/bcm2835.c -o build/drivers/BCM/bcm2835.o g++ -MT build/drivers/BCM/BCM.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/BCM.cpp -o build/drivers/BCM/BCM.o g++ -MT build/drivers/BCM/SPIBCM.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/SPIBCM.cpp -o build/drivers/BCM/SPIBCM.o g++ -MT build/drivers/BCM/Wire.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/Wire.cpp -o build/drivers/BCM/Wire.o g++ -MT build/drivers/BCM/RPi.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_CONTROLLER_IP_ADDRESS=192,168,1,2 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/RPi.cpp -o build/drivers/BCM/RPi.o g++ -pthread -o bin/mysgw build/drivers/Linux/log.o build/drivers/Linux/IPAddress.o build/drivers/Linux/noniso.o build/drivers/Linux/GPIO.o build/drivers/Linux/SPIDEV.o build/drivers/Linux/Print.o build/drivers/Linux/EthernetClient.o build/drivers/Linux/compatibility.o build/drivers/Linux/SerialPort.o build/drivers/Linux/Stream.o build/drivers/Linux/interrupt.o build/drivers/Linux/SerialSimulator.o build/drivers/Linux/SoftEeprom.o build/drivers/Linux/EthernetServer.o build/examples_linux/mysgw.o build/drivers/BCM/bcm2835.o build/drivers/BCM/BCM.o build/drivers/BCM/SPIBCM.o build/drivers/BCM/Wire.o build/drivers/BCM/RPi.o [00:30:01] openhabian@openHABianPi:~/MySensors$ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0 mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0 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 mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TIN:ETH OK mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TPS:ETH OK mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TPS:ETH OK mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:TPS:ETH OK mysgw: connect: Connection refused mysgw: failed to connect
-
All configure parameters needs to be on the same line. In your case just use these
./configure --my-gateway=ethernet --my-port=5003 as the others are not needed
-
@gohan many thanks!
-
Hey @gohan I'm having a similiar issue, I've pasted my
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --my-gateway=ethernet --my-controller-ip-address=192.168.10.12 as a single line, then "make", and created the service, but I still get the same that Vladimir was getting.May 28 19:17:46 ERROR failed to connect
May 28 19:17:46 DEBUG GWT:TPS:ETH OK
May 28 19:17:46 ERROR connect: Connection refused
May 28 19:17:46 ERROR failed to connect
May 28 19:17:46 DEBUG GWT:TPS:ETH OK
May 28 19:17:46 ERROR connect: Connection refused
May 28 19:17:46 ERROR failed to connect
May 28 19:17:46 DEBUG GWT:TPS:ETH OK
May 28 19:17:46 ERROR connect: Connection refused
^CMay 28 19:17:46 NOTICE Received SIGINTI've tried the Master and development branch, and have triple checked the nrf24 wiring, made sure SPI was enabled on my pi, I'm at a loss of ideas, can anyone offer some suggestions?
-
@gfink port 5003 on 192.168.10.12 isn't open for oncoming connections. What controller are you using? Does that controller support incoming connections from MySensors ethernet gateways? Most controllers prefer to connect to the gateway instead of having the gatewayconect to them.
-
This post is deleted!
-
@mfalkvidd Also, fyi, the drawing may need to be updated, as it's referencing pings 24/26 whereas the charts shows 22/24. If I'm reading it correctly: https://www.mysensors.org/build/raspberry
-
@mfalkvidd I'm using openhab2.4 on the same pi, I'd initially tried it w/o port 5003, similiar to below to no avail. So am I mistaken to even try to run openhab2, and try to run the mySensor's ethernet gateway on the same pi? I was trying to conserve resources.
./configure --my-gateway=ethernet --my-controller-url-address=192.168.10.12 --my-transport=rf24 --my-rf24-irq-pin=15
-
@gfink I can't find a reference to 26 on that page. Could you explain what I'm missing?
-
@gfinkrunning on the same pi is ok.
I don't have any experience with OpenHab but according to https://github.com/tobof/openhab2-addons/wiki/Configuration OpenHab connects to the gateway, not the other way around. Remove my-controller-url-address from the gateway configuration and re-run make and install.
-
@mfalkvidd
This image is referencing (SPI0 CS0 = pin 24) and (SPI0 CS1 = pin 26). and below that image on the same URL, references this chart. I'm assuming that this is for the RPI (2-3)'s. So should the pic be updated to reference 22/24 and not 24/26 or the chart? Just asking to try to help others as I'd tripped over this for a short while.Raspberry NRF24L01+ Color
GND GND Black
3.3V(*) VCC Red
22 CE Orange
24 CSN/CS Yellow
23 SCK Green
19 MOSI Blue
21 MISO Violet
15(**) IRQ Gray
-
@gfink sorry, I don't see how it is referencing pin 26. Yes, pin 26 is present in the picture but so are pins 36, 39 and lots of other pins that are not used.
-
@mfalkvidd I guess I was under the impression that the purple labels signified the CE / CSN-CS pins for the nrf. That was a little confusing for a slow learner like myself.
-
@mfalkvidd You're correct again sir. I ran "./configure --my-gateway=ethernet --my-transport=rf24 --my-rf24-irq-pin=15" and then make/install. and it now works. Thanks for all of your time, wisdom, and helping us along this journey.
-
@gfink great work, thanks for reporting back