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 1.0m 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.
  • gohanG gohan

    @aglock I put a note on the raspberry gateway page to use latest development in case of problems with stable. Did you try?

    A Offline
    A Offline
    aglock
    wrote on last edited by
    #684

    @gohan yes. Interesting though when I used git to switch between branches it said all files where the same?
    Do you think the fault is in the gateway somehow?

    1 Reply Last reply
    0
    • gohanG gohan

      @aglock I put a note on the raspberry gateway page to use latest development in case of problems with stable. Did you try?

      A Offline
      A Offline
      aglock
      wrote on last edited by
      #685

      @gohan Tried it again
      configure now recognizes the rpi:

      pi@raspberrypi:~/mys_dev $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24
      [SECTION] Detecting target machine.
        [OK] machine detected: SoC=BCM2836, Type=rpi2, 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.
      

      But make fails with the following error:

      -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/bcm2835.c -o build/drivers/BCM/bcm2835.o
      drivers/BCM/bcm2835.c: In function ‘bcm2835_delayMicroseconds’:
      drivers/BCM/bcm2835.c:441:40: error: expected ‘)’ before ‘PRIu64’
         printf("bcm2835_delayMicroseconds %" PRIu64 "\n", micros);
                                              ^
      drivers/BCM/bcm2835.c:441:40: warning: spurious trailing ‘%’ in format [-Wformat=]
      Makefile:102: recipe for target 'build/drivers/BCM/bcm2835.o' failed
      make: *** [build/drivers/BCM/bcm2835.o] Error 1
      pi@raspberrypi:~/mys_dev $ 
      

      What to do about it?

      mfalkviddM 1 Reply Last reply
      0
      • A aglock

        @gohan Tried it again
        configure now recognizes the rpi:

        pi@raspberrypi:~/mys_dev $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24
        [SECTION] Detecting target machine.
          [OK] machine detected: SoC=BCM2836, Type=rpi2, 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.
        

        But make fails with the following error:

        -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/bcm2835.c -o build/drivers/BCM/bcm2835.o
        drivers/BCM/bcm2835.c: In function ‘bcm2835_delayMicroseconds’:
        drivers/BCM/bcm2835.c:441:40: error: expected ‘)’ before ‘PRIu64’
           printf("bcm2835_delayMicroseconds %" PRIu64 "\n", micros);
                                                ^
        drivers/BCM/bcm2835.c:441:40: warning: spurious trailing ‘%’ in format [-Wformat=]
        Makefile:102: recipe for target 'build/drivers/BCM/bcm2835.o' failed
        make: *** [build/drivers/BCM/bcm2835.o] Error 1
        pi@raspberrypi:~/mys_dev $ 
        

        What to do about it?

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #686

        @aglock see https://forum.mysensors.org/post/79403

        A 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @aglock see https://forum.mysensors.org/post/79403

          A Offline
          A Offline
          aglock
          wrote on last edited by
          #687

          @mfalkvidd Wow, thanks that works! :D

          1 Reply Last reply
          1
          • WoekaW Offline
            WoekaW Offline
            Woeka
            wrote on last edited by
            #688

            Got mysensors gateway working on gpio of my Pi again using ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-gateway=ethernet --my-port=5003

            However on tx or tx always the two leds connected to pin 16 and 18 are lit. More people with the same problem?

            S 1 Reply Last reply
            0
            • WoekaW Woeka

              Got mysensors gateway working on gpio of my Pi again using ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-gateway=ethernet --my-port=5003

              However on tx or tx always the two leds connected to pin 16 and 18 are lit. More people with the same problem?

              S Offline
              S Offline
              sineverba
              Hardware Contributor
              wrote on last edited by
              #689

              @Woeka There is (on Arduino Gateway) a function named "DEFINE INVERSE BLINK". Try to search for same for PI....

              1 Reply Last reply
              0
              • R Offline
                R Offline
                romeo01
                wrote on last edited by romeo01
                #690

                Can we use the "debug ota log" features with the raspberryPi gateway ??

                My node is not accessible and runs MYSBootloader.
                My gateway is raspberryPI.

                Now, I need to update the firmware on my node. Via MYSController, no problems, upload runs like a charm.

                But how to do for debugging my sketch ? Some bugs appear...... , I need to take a look on some vars values.
                Usually, I use the serial port with serial.print(some vars).
                Which alternative I have to use without serial port, only OTA features ?

                Thanks for the great work !!

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

                  Unless you are using an esp8266, I don't think you can remote debug a pro mini. @sundberg84 is working on a serial logger to microsd card, maybe it could help you in some way

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    romeo01
                    wrote on last edited by
                    #692

                    In fact, I do not need to log, but need to look what's happen in my sketch.
                    The new "OTALog" function, MY_OTA_LOG_SENDER_FEATURE or MY_DEBUG_OTA seems to be the good way.
                    From the docs, it allows to send a debug message to another node or gateway via OTA.

                    But how to got the debug message from OTA node, on the gateway side (RaspberryPi) ?

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

                      @romeo01 said in 💬 Building a Raspberry Pi Gateway:

                      MY_DEBUG_OTA

                      I'd start reading from here https://www.mysensors.org/apidocs-beta/group__SerialDebugGrpPub.html#ga6bd5956352d3a184a0cb02783b8d35ff

                      R 1 Reply Last reply
                      0
                      • gohanG gohan

                        @romeo01 said in 💬 Building a Raspberry Pi Gateway:

                        MY_DEBUG_OTA

                        I'd start reading from here https://www.mysensors.org/apidocs-beta/group__SerialDebugGrpPub.html#ga6bd5956352d3a184a0cb02783b8d35ff

                        R Offline
                        R Offline
                        romeo01
                        wrote on last edited by
                        #694

                        @gohan said in 💬 Building a Raspberry Pi Gateway:

                        @romeo01 said in 💬 Building a Raspberry Pi Gateway:

                        MY_DEBUG_OTA

                        I'd start reading from here https://www.mysensors.org/apidocs-beta/group__SerialDebugGrpPub.html#ga6bd5956352d3a184a0cb02783b8d35ff

                        Well, you found the starting point !

                        MY_OTA_LOG_SENDER_FEATURE & MY_DEBUG_OTA are enabled on my OTA node.

                        Again the same question: What I have to do on the gateway side ?
                        Is it possible with the raspberry Gateway ?

                        I'm still looking for debugging my sketch in remote. I need to have a look on the debug messages. I reminder, the node is not accessible and runs MYSbootloader.

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

                          If I understood well, you need to set a target node ID that will receive the debug and then make a node with that ID in order to get the debug messages

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            romeo01
                            wrote on last edited by
                            #696

                            Exactly, but I would like to use the gateway (raspberry) as target.
                            Is that possible ?
                            If yes, how to display the debug message on the gateway.
                            I have an access to my gateway only via SSH.

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

                              I have no idea if can do it, but you could just have a node connected to USB port of the rpi and do a "cat" on the USB port and you can read the debug from the node

                              1 Reply Last reply
                              0
                              • signal15S Offline
                                signal15S Offline
                                signal15
                                wrote on last edited by
                                #698

                                Is it possible to build a gateway that is MQTT, but also listens on port 5003? I want to send my data up to AWS IoT, but I also need port 5003 for Vera integration.

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

                                  You can use node-red to bridge the ethernet gateway and the aws service. Are you sure vera plug in doesn't support mqtt?

                                  1 Reply Last reply
                                  1
                                  • signal15S Offline
                                    signal15S Offline
                                    signal15
                                    wrote on last edited by
                                    #700

                                    @gohan, there are two MQTT plugins for the Vera with varying capabilities. But, the mysensors plugin for Vera doesn't appear to support MQTT at all. I could probably get one of those MQTT plugins working, but I'm not sure how stable they are. I hate installing unstable plugins and having them crash LUUP. I need to maintain a positive WAF (Wife Acceptance Factor), and broken HA doesn't help with that. :)

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

                                      I guess node-red is the best option for you

                                      1 Reply Last reply
                                      0
                                      • pepsonP Offline
                                        pepsonP Offline
                                        pepson
                                        wrote on last edited by
                                        #702

                                        Hi
                                        I start build MySensors Gateway on my Rpi3. I use radio RFM69HW and connected it as show on page to GPIO.
                                        https://www.mysensors.org/build/raspberry
                                        I build it by command:
                                        ./configure --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB1

                                        Then make. But in Domoticz when i run and add to hardware i have error:
                                        2017-12-27 17:05:09.419 MySensors: Using serial port: /dev/ttyUSB1
                                        2017-12-27 17:05:09.419 MySensors: Gateway Version: 2.2.0-rc.2
                                        2017-12-27 17:05:09.420 Error: Serial Port closed!... Error: End of file
                                        2017-12-27 17:05:10.419 MySensors: retrying in 30 seconds...
                                        2017-12-27 17:05:39.422 MySensors: Using serial port: /dev/ttyUSB1
                                        2017-12-27 17:05:39.422 Error: Serial Port closed!... Error: End of file
                                        2017-12-27 17:05:40.422 MySensors: retrying in 30 seconds...
                                        2017-12-27 17:06:09.425 MySensors: Using serial port: /dev/ttyUSB1
                                        2017-12-27 17:06:09.425 Error: Serial Port closed!... Error: End of file
                                        2017-12-27 17:06:10.425 MySensors: retrying in 30 seconds...
                                        2017-12-27 17:06:39.427 MySensors: Using serial port: /dev/ttyUSB1
                                        2017-12-27 17:06:39.428 Error: Serial Port closed!... Error: End of file
                                        2017-12-27 17:06:40.428 MySensors: retrying in 30 seconds...
                                        2017-12-27 17:07:09.430 MySensors: Using serial port: /dev/ttyUSB1
                                        2017-12-27 17:07:09.430 Error: Serial Port closed!... Error: End of file

                                        port ttyUSB1 is empty as i check.
                                        Please help me where is the problem...

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • pepsonP pepson

                                          Hi
                                          I start build MySensors Gateway on my Rpi3. I use radio RFM69HW and connected it as show on page to GPIO.
                                          https://www.mysensors.org/build/raspberry
                                          I build it by command:
                                          ./configure --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB1

                                          Then make. But in Domoticz when i run and add to hardware i have error:
                                          2017-12-27 17:05:09.419 MySensors: Using serial port: /dev/ttyUSB1
                                          2017-12-27 17:05:09.419 MySensors: Gateway Version: 2.2.0-rc.2
                                          2017-12-27 17:05:09.420 Error: Serial Port closed!... Error: End of file
                                          2017-12-27 17:05:10.419 MySensors: retrying in 30 seconds...
                                          2017-12-27 17:05:39.422 MySensors: Using serial port: /dev/ttyUSB1
                                          2017-12-27 17:05:39.422 Error: Serial Port closed!... Error: End of file
                                          2017-12-27 17:05:40.422 MySensors: retrying in 30 seconds...
                                          2017-12-27 17:06:09.425 MySensors: Using serial port: /dev/ttyUSB1
                                          2017-12-27 17:06:09.425 Error: Serial Port closed!... Error: End of file
                                          2017-12-27 17:06:10.425 MySensors: retrying in 30 seconds...
                                          2017-12-27 17:06:39.427 MySensors: Using serial port: /dev/ttyUSB1
                                          2017-12-27 17:06:39.428 Error: Serial Port closed!... Error: End of file
                                          2017-12-27 17:06:40.428 MySensors: retrying in 30 seconds...
                                          2017-12-27 17:07:09.430 MySensors: Using serial port: /dev/ttyUSB1
                                          2017-12-27 17:07:09.430 Error: Serial Port closed!... Error: End of file

                                          port ttyUSB1 is empty as i check.
                                          Please help me where is the problem...

                                          mfalkviddM Offline
                                          mfalkviddM Offline
                                          mfalkvidd
                                          Mod
                                          wrote on last edited by
                                          #703

                                          @pepson what output did you get when you tested the gateway?

                                          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


                                          20

                                          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