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. Announcements
  3. 💬 Building a Raspberry Pi Gateway

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 422.6k Views 131 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #465

    @gohan said in 💬 Building a Raspberry Pi Gateway:

    lready installed mysgw as service to start at boot, it is normal that you can not run another process in debug mode and it conflicts

    Oh, Ok. Thanks.
    Another thing is that when i close PuTTY, the gateway doesn't retrieve anymore the data...

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

      You need to install it as service so it always runs in background

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #467

        Is it this process :

        1421 ?        Rs    40:25 /usr/local/bin/mysgw
        

        Seems it runs for 40 minutes, but no the gateway sees no data...

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

          what gateway did you compile? What option in ./configure did you use?

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by A Former User
            #469

            First of all : thanks for helping !

            I compiled an Ethernet gateway
            The options are the following:

            ./configure --my-gateway=ethernet --my-port=5003 --my-rf24-irq-pin=15 --my-transport=nrf24
            

            The only way I make the GW working is through the debug mode (by switching off the service process)

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #470

              Hello, it seems I found the problem: Complete newbie thing: :beginner:
              sudo ./bin/mysgw -h worked, but /usr/local/bin/mysgw didn't
              I just gave the right to the folder, and now it's working.
              Thanks for taking time to help beginners !

              cadetC 1 Reply Last reply
              1
              • S Offline
                S Offline
                sillicius
                wrote on last edited by
                #471

                @Richard van der Plas : i was have the same error with my raspberry zero. I have succed with the devellopement branch version...

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gdekeijzer
                  wrote on last edited by
                  #472

                  Trying to setup a Rpi1, as i got one lying around here.

                  All work untill i want to 'make'

                  Generates an error:

                  pi@mysgw:~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-irq-pin=15
                  [SECTION] Detecting target machine.
                    [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
                  [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.
                  pi@mysgw:~/MySensors $ make
                  gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/noniso.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/IPAddress.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/interrupt.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/BCM -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
                  In file included from ./MySensors.h:109:0,
                                   from examples_linux/mysgw.cpp:83:
                  ./hal/architecture/MyHwLinuxGeneric.cpp: In function ‘ssize_t hwGetentropy(void*, size_t)’:
                  ./hal/architecture/MyHwLinuxGeneric.cpp:79:17: error: ‘SYS_getrandom’ was not declared in this scope
                    return syscall(SYS_getrandom, __buffer, __length, GRND_NONBLOCK);
                                   ^
                  ./hal/architecture/MyHwLinuxGeneric.cpp:79:52: error: ‘GRND_NONBLOCK’ was not declared in this scope
                    return syscall(SYS_getrandom, __buffer, __length, GRND_NONBLOCK);
                                                                      ^
                  ./hal/architecture/MyHwLinuxGeneric.cpp:80:1: warning: control reaches end of non-void function [-Wreturn-type]
                   }
                   ^
                  Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
                  make: *** [build/examples_linux/mysgw.o] Error 1
                  pi@mysgw:~/MySensors $
                  

                  Has this to do with a limitation of Rpi being v1?

                  Regards

                  Gerwin

                  M 1 Reply Last reply
                  0
                  • G gdekeijzer

                    Trying to setup a Rpi1, as i got one lying around here.

                    All work untill i want to 'make'

                    Generates an error:

                    pi@mysgw:~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-irq-pin=15
                    [SECTION] Detecting target machine.
                      [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
                    [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.
                    pi@mysgw:~/MySensors $ make
                    gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/noniso.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/IPAddress.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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/interrupt.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -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=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DRPI_TYPE=\"rpi1\" -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -DMY_PORT=5003  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/BCM -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
                    In file included from ./MySensors.h:109:0,
                                     from examples_linux/mysgw.cpp:83:
                    ./hal/architecture/MyHwLinuxGeneric.cpp: In function ‘ssize_t hwGetentropy(void*, size_t)’:
                    ./hal/architecture/MyHwLinuxGeneric.cpp:79:17: error: ‘SYS_getrandom’ was not declared in this scope
                      return syscall(SYS_getrandom, __buffer, __length, GRND_NONBLOCK);
                                     ^
                    ./hal/architecture/MyHwLinuxGeneric.cpp:79:52: error: ‘GRND_NONBLOCK’ was not declared in this scope
                      return syscall(SYS_getrandom, __buffer, __length, GRND_NONBLOCK);
                                                                        ^
                    ./hal/architecture/MyHwLinuxGeneric.cpp:80:1: warning: control reaches end of non-void function [-Wreturn-type]
                     }
                     ^
                    Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
                    make: *** [build/examples_linux/mysgw.o] Error 1
                    pi@mysgw:~/MySensors $
                    

                    Has this to do with a limitation of Rpi being v1?

                    Regards

                    Gerwin

                    M Offline
                    M Offline
                    marceloaqno
                    Code Contributor
                    wrote on last edited by marceloaqno
                    #473

                    @gdekeijzer There was a recent update on the random number generator for the RPi port, but unfortunately not all linux versions support the new method. @d00616 is working on a solution to this problem #856. Please use the master branch for the time being.

                    1 Reply Last reply
                    1
                    • G Offline
                      G Offline
                      gdekeijzer
                      wrote on last edited by
                      #474

                      Ah great. Thanx for the response. I'll go try that for now.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gdekeijzer
                        wrote on last edited by
                        #475

                        Installed master branche. That did the job. Thanx.

                        1 Reply Last reply
                        1
                        • Luc3asL Offline
                          Luc3asL Offline
                          Luc3as
                          wrote on last edited by Luc3as
                          #476

                          Hello, did anyone tried gateway on pi with RS485 wired network ? It looks like node with ID set is looking for parrent and gateway does not respond to the node and therefore there is no succesfull presentation.
                          example from GW mysgw:

                          TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                          mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                          mysgw: TSF:MSG:BC
                          mysgw: TSF:MSG:FPAR REQ,ID=5
                          mysgw: TSF:PNG:SEND,TO=0
                          mysgw: TSF:CKU:OK
                          mysgw: TSF:MSG:GWL OK
                          mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                          mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                          mysgw: TSF:MSG:BC
                          mysgw: TSF:MSG:FPAR REQ,ID=5
                          mysgw: TSF:CKU:OK,FCTRL
                          mysgw: TSF:MSG:GWL OK
                          mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                          mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                          mysgw: TSF:MSG:BC
                          mysgw: TSF:MSG:FPAR REQ,ID=5
                          mysgw: TSF:CKU:OK,FCTRL
                          mysgw: TSF:MSG:GWL OK
                          mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                          mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                          mysgw: TSF:MSG:BC
                          mysgw: TSF:MSG:FPAR REQ,ID=5
                          mysgw: TSF:CKU:OK,FCTRL
                          mysgw: TSF:MSG:GWL OK
                          mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                          

                          and from node :

                          0 MCO:BGN:INIT NODE,CP=RSNNA--,VER=2.1.1
                          3 TSM:INIT
                          4 TSF:WUR:MS=0
                          5 TSM:INIT:TSP OK
                          7 TSM:INIT:STATID=5
                          9 TSF:SID:OK,ID=5
                          10 TSM:FPAR
                          27 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          2035 !TSM:FPAR:NO REPLY
                          2037 TSM:FPAR
                          2055 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          4063 !TSM:FPAR:NO REPLY
                          4065 TSM:FPAR
                          4082 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          6090 !TSM:FPAR:NO REPLY
                          6092 TSM:FPAR
                          6110 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          8118 !TSM:FPAR:FAIL
                          8119 TSM:FAIL:CNT=1
                          
                          Luc3asL 1 Reply Last reply
                          0
                          • Luc3asL Luc3as

                            Hello, did anyone tried gateway on pi with RS485 wired network ? It looks like node with ID set is looking for parrent and gateway does not respond to the node and therefore there is no succesfull presentation.
                            example from GW mysgw:

                            TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                            mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                            mysgw: TSF:MSG:BC
                            mysgw: TSF:MSG:FPAR REQ,ID=5
                            mysgw: TSF:PNG:SEND,TO=0
                            mysgw: TSF:CKU:OK
                            mysgw: TSF:MSG:GWL OK
                            mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                            mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                            mysgw: TSF:MSG:BC
                            mysgw: TSF:MSG:FPAR REQ,ID=5
                            mysgw: TSF:CKU:OK,FCTRL
                            mysgw: TSF:MSG:GWL OK
                            mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                            mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                            mysgw: TSF:MSG:BC
                            mysgw: TSF:MSG:FPAR REQ,ID=5
                            mysgw: TSF:CKU:OK,FCTRL
                            mysgw: TSF:MSG:GWL OK
                            mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                            mysgw: TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                            mysgw: TSF:MSG:BC
                            mysgw: TSF:MSG:FPAR REQ,ID=5
                            mysgw: TSF:CKU:OK,FCTRL
                            mysgw: TSF:MSG:GWL OK
                            mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                            

                            and from node :

                            0 MCO:BGN:INIT NODE,CP=RSNNA--,VER=2.1.1
                            3 TSM:INIT
                            4 TSF:WUR:MS=0
                            5 TSM:INIT:TSP OK
                            7 TSM:INIT:STATID=5
                            9 TSF:SID:OK,ID=5
                            10 TSM:FPAR
                            27 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            2035 !TSM:FPAR:NO REPLY
                            2037 TSM:FPAR
                            2055 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            4063 !TSM:FPAR:NO REPLY
                            4065 TSM:FPAR
                            4082 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            6090 !TSM:FPAR:NO REPLY
                            6092 TSM:FPAR
                            6110 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                            8118 !TSM:FPAR:FAIL
                            8119 TSM:FAIL:CNT=1
                            
                            Luc3asL Offline
                            Luc3asL Offline
                            Luc3as
                            wrote on last edited by
                            #477

                            @Luc3as Okay, Again I found answer while after asking, I used dev branch of mysensors and it is working like a charm.

                            1 Reply Last reply
                            1
                            • Z Offline
                              Z Offline
                              zavracky
                              wrote on last edited by
                              #478

                              I am a novice, trying to get the raspberry pi gateway to work. I did get it to work on one pi, but while installing it on the second, it produces the following error:

                              In file included from examples_linux/mysgw.cpp:74:0:
                              ./MySensors.h:254:2: error: #error No support for nRF24 radio on this platform
                              #error No support for nRF24 radio on this platform
                              ^
                              In file included from ./drivers/RF24/RF24.cpp:23:0,
                              from ./MySensors.h:290,
                              from examples_linux/mysgw.cpp:74:
                              ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
                              #include <SPI.h>

                              I can see that the SPI.h library is among the files downloaded.

                              Any ideas?

                              Paul

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

                                what raspberry version is that? What library version did you download?

                                Z 1 Reply Last reply
                                0
                                • Luc3asL Offline
                                  Luc3asL Offline
                                  Luc3as
                                  wrote on last edited by
                                  #480

                                  do you have SPI enabled through raspi-config ?

                                  Z 1 Reply Last reply
                                  1
                                  • gohanG gohan

                                    what raspberry version is that? What library version did you download?

                                    Z Offline
                                    Z Offline
                                    zavracky
                                    wrote on last edited by
                                    #481

                                    @gohan Thanks for the response. I downloaded the MySensors Library 2.1.1. Sorting through it I can see that SPI.h is included.

                                    I installed a complete system in FL (I'm retired and a snowbird). Included are a Bunch of Arduino sensors, a Foscam Camera and Wemo switches. So I used a lot of material from MySensors to get the Arduino sensors up and running (great stuff: thanks to all those folks who created it). I then created a Raspberry Wireless (RF24) Gateway and installed Mosquitto to communicate with HomeAssistant. Took a while to configure HA, and I'm still learning.

                                    I do not recall having a problem with the SPI library when assembling all this stuff. Upon return to Boston, I have made a number of improvements talking to the Raspberry in FL through TeamViewer (a great app). However, along the way, I corrupted the system in FL. It now limps. So, I started recreating the stuff in FL on a new SD card, encountering the SPI problem.

                                    Since sending out my request for help, I found a backup version of my FL system on an SD card. Looking at it, the system seems to be whole and boots with no issues. mysgw works fine on it. So, I've added all my new stuff to this SD card and have tested it to make sure its working. Things are looking good and so, my immediate problem is solved (circumvented).

                                    I still want to know what I am doing wrong with the gateway. I've learned a little bit of Python along the way. There, one installs a library. I know effectively nothing about C++. So, I've done nothing to install the library, only followed the instructions on the MySensors Raspberry Pi Gateway page.

                                    BTW, this stuff is great.

                                    Paul

                                    1 Reply Last reply
                                    0
                                    • Luc3asL Luc3as

                                      do you have SPI enabled through raspi-config ?

                                      Z Offline
                                      Z Offline
                                      zavracky
                                      wrote on last edited by
                                      #482

                                      @Luc3as Thanks for your response. No, in fact it was not enabled. Please read my reply to gohan. As you see, I've cheated my way out of this problem. In the process, I've lost track of the SD card on which I encountered this problem. Nonetheless, I will circle back to test your suggestion.

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

                                        Try to enable the SPI first. Then you could also try different linux distributions and see which one you like better ( I personally like dietpi more than the others ). You may also want to try to use Mysensors library from development branch that is now 2.2.0.
                                        I now have a dietpi + mysensors 2.2.0 + nrf24 and all running fine

                                        1 Reply Last reply
                                        0
                                        • M marceloaqno

                                          @Roberto-Mo-Ca If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator otherwise you can connect to the 3.3v pin.

                                          S Offline
                                          S Offline
                                          subutux
                                          wrote on last edited by
                                          #484

                                          @marceloaqno said in 💬 Building a Raspberry Pi Gateway:

                                          @Roberto-Mo-Ca If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator otherwise you can connect to the 3.3v pin.

                                          But why do we need to convert down from 5v to 3.3v? The pi does supply 3.3 on some pins.. Is this because the PA/LNA uses more mA?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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