Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Serial GW on RaspberryPI 3 doesn't start

Serial GW on RaspberryPI 3 doesn't start

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 6 Posters 2.7k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    capama
    wrote on last edited by
    #1

    Hello,
    I have problem with start my GW on Raspberry PI.
    I done:
    pi@raspberrypi:~ $ git clone https://github.com/mysensors/MySensors.git --branch master
    Cloning into 'MySensors'...
    remote: Counting objects: 14846, done.
    remote: Total 14846 (delta 0), reused 0 (delta 0), pack-reused 14846
    Receiving objects: 100% (14846/14846), 12.14 MiB | 1.32 MiB/s, done.
    Resolving deltas: 100% (8996/8996), done.

    pi@raspberrypi:~ $ cd MySensors

    pi@raspberrypi:~/MySensors $ ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15
    [SECTION] Detecting target machine.
    ./configure: line 111: warning: command substitution: ignored null byte in input
    [OK] machine detected: SoC=unknown, Type=unknown, CPU=armv7l.
    [SECTION] Checking GPIO Sysfs.
    [OK] /sys/class/gpio/export found
    [SECTION] Detecting SPI driver.
    [OK] SPI driver detected:SPIDEV.
    [SECTION] Detecting init system.
    [OK] init system detected: systemd.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.

    pi@raspberrypi:~/MySensors $ make
    gcc -MT build/drivers/Linux/log.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
    g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
    g++ -MT build/drivers/Linux/noniso.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
    g++ -MT build/drivers/Linux/GPIO.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o
    g++ -MT build/drivers/Linux/Print.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
    g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
    g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
    g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
    g++ -MT build/drivers/Linux/Stream.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
    g++ -MT build/drivers/Linux/interrupt.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o
    g++ -MT build/drivers/Linux/SerialSimulator.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialSimulator.cpp -o build/drivers/Linux/SerialSimulator.o
    g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
    g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
    g++ -MT build/examples_linux/mysgw.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
    g++ -MT build/drivers/SPIDEV/SPI.o -MMD -MP -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_SPIDEV -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_LINUX_SERIAL_PTY="/dev/ttyMySensorsGateway" -DMY_LINUX_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/SPIDEV/SPI.cpp -o build/drivers/SPIDEV/SPI.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/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/SPIDEV/SPI.o

    pi@raspberrypi:~/MySensors $ sudo make install
    Installing bin/mysgw to /usr/local/bin
    install -m0644 initscripts/mysgw.systemd /etc/systemd/system/mysgw.service
    systemctl daemon-reload
    MySensors gateway has been installed, to add to the boot run:
    sudo systemctl enable mysgw.service
    To start the gateway run:
    sudo systemctl start mysgw.service

    pi@raspberrypi:~/MySensors $ cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="9"
    VERSION="9 (stretch)"
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

    But if I tested GW in debug mode I have this error:

    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,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
    ^Cmysgw: Received SIGINT

    pi@raspberrypi:~/MySensors $

    Can somebody ask me where is a problem?
    Thank a lot!

    Best regards
    Capama

    1 Reply Last reply
    0
    • S Offline
      S Offline
      scalz
      Hardware Contributor
      wrote on last edited by scalz
      #2

      Hello,

      From logs, it looks like a bad wiring between your radio and rpi because radio can't initialize. or maybe try with another radio.

      C 1 Reply Last reply
      0
      • S scalz

        Hello,

        From logs, it looks like a bad wiring between your radio and rpi because radio can't initialize. or maybe try with another radio.

        C Offline
        C Offline
        capama
        wrote on last edited by
        #3

        @scalz
        thanks for answer...I checked it and try another radio and everythink looks good...:-(

        1 Reply Last reply
        0
        • pihomeP Offline
          pihomeP Offline
          pihome
          wrote on last edited by
          #4

          those chines radio are always problematic... :angry:

          PiHome - Smart Heating Control

          1 Reply Last reply
          0
          • X Offline
            X Offline
            xmonika
            wrote on last edited by
            #5

            Try to install version 2.2.0 beta, this helped me and it is described in other post. The gateway still may be unstable but not only I don't know why 2.1.1 doesn't work.

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #6

              I'd suggest to use ethernet gateway instead of serial since you are at it :)

              1 Reply Last reply
              0
              • X Offline
                X Offline
                xmonika
                wrote on last edited by
                #7

                In my case the problem is related to MQTT gateway, so not sure if that helps.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  capama
                  wrote on last edited by
                  #8

                  Hi,
                  it seems, that 2.2.0 beta version works fine...:-)

                  wimdW 1 Reply Last reply
                  0
                  • C capama

                    Hi,
                    it seems, that 2.2.0 beta version works fine...:-)

                    wimdW Offline
                    wimdW Offline
                    wimd
                    wrote on last edited by
                    #9

                    I got a similar issue. Installed 2.2.0 beta and the gateway worked fine for some hours and then it stopped.
                    When I check the gateway function with :
                    sudo ./bin/mysgw -d
                    I only get these messages :

                    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
                    mysgw: Starting gateway...
                    mysgw: Protocol version - 2.2.0-rc.1
                    mysgw: MCO:BGN:INIT GW,CP=RNNGL-Q-,VER=2.2.0-rc.1
                    mysgw: TSF:LRT:OK
                    mysgw: TSM:INIT
                    mysgw: TSF:WUR:MS=0

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    16

                    Online

                    12.0k

                    Users

                    11.2k

                    Topics

                    113.4k

                    Posts


                    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • MySensors
                    • OpenHardware.io
                    • Categories
                    • Recent
                    • Tags
                    • Popular