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 424.3k 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.
  • phildeferP phildefer

    Re: πŸ’¬ Building a Raspberry Pi Gateway

    Hi all,

    i compile with success the gateway in Raspberry PI 4 (with some code modification)

    this is not perfect.. but it works.

    if someone wants to try, i upload the gateway compiled with this options :

    --my-transport=rf24 --my-gateway=ethernet --my-port=5003
    

    https://gofile.io/?c=fRxeF7

    AnticimexA Offline
    AnticimexA Offline
    Anticimex
    Contest Winner
    wrote on last edited by
    #1024

    @phildefer could you please share what you changed? The security concerned might not be comfortable running a binary with unspecified changes that manages their home automation setup. Especially not a project supposed to be open source.

    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

    1 Reply Last reply
    0
    • phildeferP phildefer

      Re: πŸ’¬ Building a Raspberry Pi Gateway

      Hi all,

      i compile with success the gateway in Raspberry PI 4 (with some code modification)

      this is not perfect.. but it works.

      if someone wants to try, i upload the gateway compiled with this options :

      --my-transport=rf24 --my-gateway=ethernet --my-port=5003
      

      https://gofile.io/?c=fRxeF7

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

      @phildefer would you mind sharing the code modifications that were needed?

      phildeferP 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @phildefer would you mind sharing the code modifications that were needed?

        phildeferP Offline
        phildeferP Offline
        phildefer
        wrote on last edited by
        #1026

        @mfalkvidd @Anticimex : yes i sharing the code perhaps this week end. I need to find time to make a PR to GITHUB
        As I said, my code may not be as clean as you'd like, but it works.

        1 Reply Last reply
        2
        • P Offline
          P Offline
          patrikr76
          wrote on last edited by patrikr76
          #1027

          Hey all,

          I got the same problem as @swedchef and saw the warnings @alowhum mentioned.
          Simply upping the buffer that is declared in GPIO.cpp solved the warnings and made it compile without issue but the radio still won't work.
          Maybe it has to do with the soc not being detected, as mentioned, and that the pin positions on the new soc are different from previous ones.

          @phildefer, weekend has come and gone buddy. Patience is a virtue some do not have. :)

          Edit: So looking a little more through the files today i see that configure looks for the soc type in /proc/cpuinfo and funnily my raspi 4 reports a BCM2835

          mfalkviddM 1 Reply Last reply
          0
          • P patrikr76

            Hey all,

            I got the same problem as @swedchef and saw the warnings @alowhum mentioned.
            Simply upping the buffer that is declared in GPIO.cpp solved the warnings and made it compile without issue but the radio still won't work.
            Maybe it has to do with the soc not being detected, as mentioned, and that the pin positions on the new soc are different from previous ones.

            @phildefer, weekend has come and gone buddy. Patience is a virtue some do not have. :)

            Edit: So looking a little more through the files today i see that configure looks for the soc type in /proc/cpuinfo and funnily my raspi 4 reports a BCM2835

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

            @patrikr76 I beleive @phildefer pushed the code 4 days ago. See https://github.com/mysensors/MySensors/pull/1353

            Something has seriously mangled whitespace in the modified code, but apart from that it looks good to me, but I am not that familiar with the rpi code and I have not tested it myself.

            P K 2 Replies Last reply
            0
            • mfalkviddM mfalkvidd

              @patrikr76 I beleive @phildefer pushed the code 4 days ago. See https://github.com/mysensors/MySensors/pull/1353

              Something has seriously mangled whitespace in the modified code, but apart from that it looks good to me, but I am not that familiar with the rpi code and I have not tested it myself.

              P Offline
              P Offline
              patrikr76
              wrote on last edited by patrikr76
              #1029

              @mfalkvidd said in πŸ’¬ Building a Raspberry Pi Gateway:

              @patrikr76 I beleive @phildefer pushed the code 4 days ago. See https://github.com/mysensors/MySensors/pull/1353

              You are correct.
              @phildefer, thank you.
              There were a couple of minor warnings about indentations and the buffer size i mentioned earlier fixed by upping the declared buffer in GPIO.cpp. Not sure if that is a good fix or not, the warning goes away though.
              A few other warnings looks like this:

              In member function β€˜char* MyMessage::getString(char*) const’,
                  inlined from β€˜bool transportSendWrite(uint8_t, MyMessage&)’ at ./core/MyTransport.cpp:987:2,
                  inlined from β€˜bool transportRouteMessage(MyMessage&)’ at ./core/MyTransport.cpp:560:40,
                  inlined from β€˜void stUplinkTransition()’ at ./core/MyTransport.cpp:252:29:
              ./core/MyMessage.cpp:284:17: warning: β€˜char* strncpy(char*, const char*, size_t)’ output may be truncated copying between 0 and 25 bytes from a string of length 25 [-Wstringop-truncation]
                  (void)strncpy(buffer, this->data, this->getLength());
                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              

              Not sure how to fix those.

              Edit: Forgot to mention, it seems to be working though.

              1 Reply Last reply
              0
              • franz-unixF Offline
                franz-unixF Offline
                franz-unix
                wrote on last edited by
                #1030

                Thanks guys for the effort to port MySensors for the Pi 4.

                I'm very interested, but my coding skills are not sufficient to help in the development. Maybe I can do some debug when my Pi4 will arrive

                MySensors for the Pi4 is a must-have!😊

                1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  @patrikr76 I beleive @phildefer pushed the code 4 days ago. See https://github.com/mysensors/MySensors/pull/1353

                  Something has seriously mangled whitespace in the modified code, but apart from that it looks good to me, but I am not that familiar with the rpi code and I have not tested it myself.

                  K Offline
                  K Offline
                  kiesel
                  wrote on last edited by
                  #1031

                  @mfalkvidd @phildefer

                  I can confirm that the code compiles and runs on my rasbperry pi 4 model b. I am using a rfm69 radio and that seems to be working too. I couldn't test it yet though since I haven't wired any rfm69 nodes up yet.

                  franz-unixF 1 Reply Last reply
                  1
                  • K kiesel

                    @mfalkvidd @phildefer

                    I can confirm that the code compiles and runs on my rasbperry pi 4 model b. I am using a rfm69 radio and that seems to be working too. I couldn't test it yet though since I haven't wired any rfm69 nodes up yet.

                    franz-unixF Offline
                    franz-unixF Offline
                    franz-unix
                    wrote on last edited by
                    #1032

                    @kiesel Good news!πŸ˜‰
                    I will test both (nrf24 and rfm69) when my Pi 4 arrive.

                    1 Reply Last reply
                    0
                    • franz-unixF Offline
                      franz-unixF Offline
                      franz-unix
                      wrote on last edited by
                      #1033

                      Ok my Pi 4 is arrived. I have 2 gateway, one RFM69 and one NRF24 connected respectively to spi0 and spi1. Details here.

                      With a Raspberry Pi 3 all works fine (compilation and execution) with both Rasbian Stretch and with Raspbian Buster.

                      With a Raspberry Pi 4 and the same version of Rasbian Buster the situation is a bit different:

                      • The RFM69 gateway on the SPI0 compiles and can be executed without problems. In this days I don't have an RFM69 radio module, so I don't know if it works, but the daemon start in a regular way.

                      • The NRF24 gateway compile, but after few seconds of execution the daemon stops with the following error.

                      Oct 26 13:59:47 ERROR Could not open /sys/class/gpio/gpio12/direction
                      

                      Considering that the same configuration works for a Pi 3, it is possible that the error is caused by the autodetect of SoC issue mentioned above?

                      The details of my /boot/config.txt file are here

                      1 Reply Last reply
                      0
                      • franz-unixF Offline
                        franz-unixF Offline
                        franz-unix
                        wrote on last edited by
                        #1034

                        Update:

                        • tested the RFM69 gateway with a radio module attached -> Not working

                        • tried to compile and execute the NRF24 gateway on the first spi bus (--spi-spidev-device=/dev/spidev0.0) -> same error as above

                        ERROR Could not open /sys/class/gpio/gpio12/direction
                        

                        I have checked my Makefile and configure files and they don't contain the modification proposed by @phildefer . Is this normal? I'm using the development branch.

                        1 Reply Last reply
                        0
                        • franz-unixF Offline
                          franz-unixF Offline
                          franz-unix
                          wrote on last edited by
                          #1035

                          Tested with this commit of @phildefer, now both gateways compiles and starts but for both I got this error.

                          Oct 27 20:50:41 DEBUG !TSM:INIT:TSP FAIL
                          
                          1 Reply Last reply
                          0
                          • franz-unixF Offline
                            franz-unixF Offline
                            franz-unix
                            wrote on last edited by
                            #1036

                            Hi, if someone needs more info (debug, log, etc...) I'm here.

                            I can perform tests on Rpi 3 and Rpi 4 (Raspbian Buster) with NRF24 and RFM69 radio modules and then report the results. Not so much but maybe this can help the development.

                            1 Reply Last reply
                            0
                            • jerseyguy1996J Offline
                              jerseyguy1996J Offline
                              jerseyguy1996
                              wrote on last edited by jerseyguy1996
                              #1037

                              I'm doing a brand new install of Openhab2 and the mysensors gateway on a new Raspberry Pi 4 after having run Openhab(1) and the mysensors gateway successfully on a Raspberry Pi 3 for years. I used the development branch of the mysensorsgateway as discussed here: https://github.com/mysensors/MySensors/pull/1364

                              I wrote down my step by step procedure here in case it helps someone else. I'm starting out with the pre-built Openhabian image found here: https://www.openhab.org/docs/installation/openhabian.html

                              Install the PiGatewaySerial using these instructions:

                              1. First get to your Downloads directory
                              cd
                              cd Downloads
                              
                              1. Clone the MySensors repository into your Downloads directory and then go into that folder
                              git clone https://github.com/mysensors/MySensors.git --branch development
                              cd MySensors
                              
                              1. Set configuration options (you can use β€œ./configure β€”help” to see your options)
                                a. In this case we are choosing to use the serial gateway with a pseudo terminal and a symbolic link to that pseudoterminal called ttyUSB20 in /dev. We then set the group to tty.
                              ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB20 --my-serial-groupname=tty
                              

                              Edit: If building this on a 64bit operating system you will need to edit the configure file before running make. Do the following:

                              cp configure configure_bk
                              nano configure
                              

                              Find this function

                              function gcc_cpu_flags {
                                  local soc=$1
                                  case $soc in
                              

                              and find your CPU. In my case it is the BCM2711 (I've only done this on this one CPU so your mileage may vary) and I changed this:

                               BCM2711)
                                      flags="-march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
                              

                              to this:

                              BCM2711)
                                      flags="-march=armv8-a+crc -mtune=cortex-a72"
                              

                              Then proceed to step 4 below.

                              1. Run make and make install
                              make
                              sudo make install
                              
                              1. We can set it to launch on boot up by running
                              sudo systemctl enable mysgw.service
                              
                              1. To launch it manually right now run (skip this step to run and see output for confirmation that it works)
                              sudo systemctl start mysgw.service
                              
                              1. Executable in located:
                              cd /usr/local/bin
                              
                              1. need root to run it:
                              sudo mysgw
                              

                              That's pretty much it. I was happily greeted with:

                              Dec 29 16:01:50 INFO Starting gateway...
                              Dec 29 16:01:50 INFO Protocol version - 2.4.0-alpha
                              Dec 29 16:01:50 DEBUG Serial port /dev/ttyUSB20 (115200 baud) created
                              Dec 29 16:01:50 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=0,VER=2.4.0-alpha
                              Dec 29 16:01:50 DEBUG TSF:LRT:OK
                              Dec 29 16:01:50 DEBUG TSM:INIT
                              Dec 29 16:01:50 DEBUG TSF:WUR:MS=0
                              Dec 29 16:01:50 DEBUG TSM:INIT:TSP OK
                              Dec 29 16:01:50 DEBUG TSM:INIT:GW MODE
                              Dec 29 16:01:50 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                              Dec 29 16:01:50 DEBUG MCO:REG:NOT NEEDED
                              Dec 29 16:01:50 DEBUG MCO:BGN:STP
                              Dec 29 16:01:50 DEBUG MCO:BGN:INIT OK,TSP=1
                              Dec 29 16:01:50 DEBUG TSM:READY:NWD REQ
                              Dec 29 16:01:50 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                              Dec 29 16:01:50 DEBUG TSF:MSG:READ,4-4-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0
                              Dec 29 16:01:50 DEBUG TSF:MSG:READ,0-4-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
                              Dec 29 16:01:50 DEBUG TSF:MSG:BC
                              Dec 29 16:01:52 DEBUG TSF:MSG:READ,4-4-0,s=1,c=1,t=2,pt=2,l=2,sg=0:0
                              Dec 29 16:01:52 DEBUG TSF:MSG:READ,4-4-0,s=2,c=1,t=2,pt=2,l=2,sg=0:0
                              Dec 29 16:01:52 DEBUG TSF:MSG:READ,4-4-0,s=3,c=1,t=2,pt=2,l=2,sg=0:1
                              Dec 29 16:01:52 DEBUG TSF:MSG:READ,4-4-0,s=4,c=1,t=2,pt=2,l=2,sg=0:1
                              ^CDec 29 16:02:35 NOTICE Received SIGINT

                              1 Reply Last reply
                              1
                              • K Offline
                                K Offline
                                kiesel
                                wrote on last edited by
                                #1038

                                Be advised that there seems to be an issue with rfm69HW on the raspberry pi:

                                When using the radio directly on the pi (not as a serial gateway) the range drops significantly:

                                https://github.com/mysensors/MySensors/issues/1367

                                Apparently this wasn't an issue with mysensors 2.2, so using that is an option if you can compile it for you raspberry pi.

                                1 Reply Last reply
                                0
                                • SebexS Offline
                                  SebexS Offline
                                  Sebex
                                  wrote on last edited by
                                  #1039

                                  I'm getting a bad file descriptor error, any advice? Seems only 1 instance to be running.

                                  pi@raspberrypi:~ $ sudo mysgw
                                  Mar 19 20:14:04 INFO  Starting gateway...
                                  Mar 19 20:14:04 INFO  Protocol version - 2.3.2
                                  Mar 19 20:14:04 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=255,VER=2.3.2
                                  Mar 19 20:14:04 DEBUG TSF:LRT:OK
                                  Mar 19 20:14:04 DEBUG TSM:INIT
                                  Mar 19 20:14:04 DEBUG TSF:WUR:MS=0
                                  Mar 19 20:14:04 DEBUG TSM:INIT:TSP OK
                                  Mar 19 20:14:04 DEBUG TSM:INIT:GW MODE
                                  Mar 19 20:14:04 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                                  Mar 19 20:14:04 DEBUG MCO:REG:NOT NEEDED
                                  Mar 19 20:14:04 ERROR bind: Address already in use
                                  Mar 19 20:14:04 ERROR Failed to bind!
                                  Mar 19 20:14:04 DEBUG MCO:BGN:STP
                                  Mar 19 20:14:04 DEBUG MCO:BGN:INIT OK,TSP=1
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 DEBUG TSM:READY:NWD REQ
                                  Mar 19 20:14:04 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                  
                                  mfalkviddM 1 Reply Last reply
                                  0
                                  • SebexS Sebex

                                    I'm getting a bad file descriptor error, any advice? Seems only 1 instance to be running.

                                    pi@raspberrypi:~ $ sudo mysgw
                                    Mar 19 20:14:04 INFO  Starting gateway...
                                    Mar 19 20:14:04 INFO  Protocol version - 2.3.2
                                    Mar 19 20:14:04 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=255,VER=2.3.2
                                    Mar 19 20:14:04 DEBUG TSF:LRT:OK
                                    Mar 19 20:14:04 DEBUG TSM:INIT
                                    Mar 19 20:14:04 DEBUG TSF:WUR:MS=0
                                    Mar 19 20:14:04 DEBUG TSM:INIT:TSP OK
                                    Mar 19 20:14:04 DEBUG TSM:INIT:GW MODE
                                    Mar 19 20:14:04 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                                    Mar 19 20:14:04 DEBUG MCO:REG:NOT NEEDED
                                    Mar 19 20:14:04 ERROR bind: Address already in use
                                    Mar 19 20:14:04 ERROR Failed to bind!
                                    Mar 19 20:14:04 DEBUG MCO:BGN:STP
                                    Mar 19 20:14:04 DEBUG MCO:BGN:INIT OK,TSP=1
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 DEBUG TSM:READY:NWD REQ
                                    Mar 19 20:14:04 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    Mar 19 20:14:04 ERROR accept: Bad file descriptor
                                    
                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #1040

                                    @Sebex don't run multiple instances that try to listen to the same tcp port.

                                    SebexS 1 Reply Last reply
                                    0
                                    • mfalkviddM mfalkvidd

                                      @Sebex don't run multiple instances that try to listen to the same tcp port.

                                      SebexS Offline
                                      SebexS Offline
                                      Sebex
                                      wrote on last edited by
                                      #1041

                                      @mfalkvidd thanks, I was wrongly under the impression that sudo mysgw would show the logs but it creates a second instance. Thanks for helping :smile:!

                                      1 Reply Last reply
                                      1
                                      • OldSurferDudeO Offline
                                        OldSurferDudeO Offline
                                        OldSurferDude
                                        wrote on last edited by
                                        #1042

                                        I have an Arduino Mesh network (see https://tmrh20.github.io/RF24Mesh/) (master and 4 nodes)
                                        networkChannel 120, networkDataRate RF24_1MBPS, nodes 0-4

                                        Now I want to have my master be an RPi because it can talk to the real world.

                                        It looks like I have the RPi wired up and software loaded (per https://www.mysensors.org/build/raspberry). Now I need to know how to talk to my Arduino's.

                                        Now how do I talk to my Arduino's?

                                        o- general description of what you are trying to do
                                        Raspberry Pi controller with serial gateway with nrf24l01+ to connect to Arduino's
                                        o- the exact configure command you used
                                        git clone https://github.com/mysensors/MySensors.git --branch master
                                        cd MySensors
                                        ./configure --my-transport=rf24 --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyMySensorsGateway
                                        make
                                        sudo ./bin/mysgw
                                        [reboot RPi]
                                        cd MySensors
                                        sudo make install
                                        sudo systemctl enable mysgw.service
                                        sudo systemctl start mysgw.service
                                        ls -als /dev/ttyMySensorsGateway [yeilds: 0 lrwxrwxrwx 1 root root 10 Apr 9 19:22 /dev/ttyMySensorsGateway -> /dev/pts/1]

                                        o- the output from the test
                                        Apr 09 18:47:32 INFO Config file /etc/mysensors.conf does not exist, creating new file.
                                        Apr 09 18:47:32 INFO Starting gateway...
                                        Apr 09 18:47:32 INFO Protocol version - 2.3.2
                                        Apr 09 18:47:32 DEBUG Serial port /dev/ttyMySensorsGateway (115200 baud) created
                                        Apr 09 18:47:32 INFO EEPROM file /etc/mysensors.eeprom does not exist, creating new file.
                                        Apr 09 18:47:32 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=255,VER=2.3.2
                                        Apr 09 18:47:32 DEBUG TSF:LRT:OK
                                        Apr 09 18:47:32 DEBUG TSM:INIT
                                        Apr 09 18:47:32 DEBUG TSF:WUR:MS=0
                                        Apr 09 18:47:32 DEBUG TSM:INIT:TSP OK
                                        Apr 09 18:47:32 DEBUG TSM:INIT:GW MODE
                                        Apr 09 18:47:32 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                                        Apr 09 18:47:32 DEBUG MCO:REG:NOT NEEDED
                                        Apr 09 18:47:32 DEBUG MCO:BGN:STP
                                        Apr 09 18:47:32 DEBUG MCO:BGN:INIT OK,TSP=1
                                        Apr 09 18:47:32 DEBUG TSM:READY:NWD REQ
                                        Apr 09 18:47:32 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                        [did not return to command prompt]
                                        o- the settings you used in your controller
                                        n/a

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • OldSurferDudeO OldSurferDude

                                          I have an Arduino Mesh network (see https://tmrh20.github.io/RF24Mesh/) (master and 4 nodes)
                                          networkChannel 120, networkDataRate RF24_1MBPS, nodes 0-4

                                          Now I want to have my master be an RPi because it can talk to the real world.

                                          It looks like I have the RPi wired up and software loaded (per https://www.mysensors.org/build/raspberry). Now I need to know how to talk to my Arduino's.

                                          Now how do I talk to my Arduino's?

                                          o- general description of what you are trying to do
                                          Raspberry Pi controller with serial gateway with nrf24l01+ to connect to Arduino's
                                          o- the exact configure command you used
                                          git clone https://github.com/mysensors/MySensors.git --branch master
                                          cd MySensors
                                          ./configure --my-transport=rf24 --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyMySensorsGateway
                                          make
                                          sudo ./bin/mysgw
                                          [reboot RPi]
                                          cd MySensors
                                          sudo make install
                                          sudo systemctl enable mysgw.service
                                          sudo systemctl start mysgw.service
                                          ls -als /dev/ttyMySensorsGateway [yeilds: 0 lrwxrwxrwx 1 root root 10 Apr 9 19:22 /dev/ttyMySensorsGateway -> /dev/pts/1]

                                          o- the output from the test
                                          Apr 09 18:47:32 INFO Config file /etc/mysensors.conf does not exist, creating new file.
                                          Apr 09 18:47:32 INFO Starting gateway...
                                          Apr 09 18:47:32 INFO Protocol version - 2.3.2
                                          Apr 09 18:47:32 DEBUG Serial port /dev/ttyMySensorsGateway (115200 baud) created
                                          Apr 09 18:47:32 INFO EEPROM file /etc/mysensors.eeprom does not exist, creating new file.
                                          Apr 09 18:47:32 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=255,VER=2.3.2
                                          Apr 09 18:47:32 DEBUG TSF:LRT:OK
                                          Apr 09 18:47:32 DEBUG TSM:INIT
                                          Apr 09 18:47:32 DEBUG TSF:WUR:MS=0
                                          Apr 09 18:47:32 DEBUG TSM:INIT:TSP OK
                                          Apr 09 18:47:32 DEBUG TSM:INIT:GW MODE
                                          Apr 09 18:47:32 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                                          Apr 09 18:47:32 DEBUG MCO:REG:NOT NEEDED
                                          Apr 09 18:47:32 DEBUG MCO:BGN:STP
                                          Apr 09 18:47:32 DEBUG MCO:BGN:INIT OK,TSP=1
                                          Apr 09 18:47:32 DEBUG TSM:READY:NWD REQ
                                          Apr 09 18:47:32 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                                          [did not return to command prompt]
                                          o- the settings you used in your controller
                                          n/a

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

                                          @OldSurferDude if you want your nodes to use MySensors, you'll need to upload MySensors sketches to them.

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


                                          30

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          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