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 428.4k 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.
  • Robinek70R Robinek70

    Hello everyone,
    I've been working gateway on RPi, but I don't know how to configure MY_SIGNING_SOFT .
    File mysgw.cpp contains MY_SIGNING_SOFT definition and I can uncomment it, but I don't know where and how I should define: SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY ?
    Could you give more details how to configure soft signing on RPi?
    thanks
    //Robert

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

    @Robinek70

    $ sudo mysgw -h
    Usage: mysgw [options]
    
    Options:
      -h, --help                 Display a short summary of all program options.
      -d, --debug                Enable debug.
      -b, --background           Run as a background process.
      --gen-soft-hmac-key        Generate and print a soft hmac key.
      --gen-soft-serial-key      Generate and print a soft serial key.
      --gen-aes-key              Generate and print an aes encryption key.
      --print-soft-hmac-key      Print the soft hmac key from the config file.
      --print-soft-serial-key    Print the soft serial key from the config file.
      --print-aes-key            Print the aes encryption key from the config file.
      --set-soft-hmac-key        Write a soft hmac key to the config file.
      --set-soft-serial-key      Write a soft serial key to the config file.
      --set-aes-key              Write an aes encryption key to the config file.
    

    To generate a soft hmac key, run:

    sudo mysgw --gen-soft-hmac-key
    

    and set it using:

    sudo mysgw  --set-soft-hmac-key=KEY
    

    For example:

    $ sudo mysgw --gen-soft-hmac-key
    SOFT_HMAC_KEY | 7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
    
    The next line is intended to be used in SecurityPersonalizer.ino:
    #define MY_SOFT_HMAC_KEY 0X7F,0X3F,0X1A,0X1C,0X1E,0XA3,0X2B,0X72,0XBF,0X4B,0XED,0XE2,0XD1,0X65,0X43,0X97,0X1C,0X26,0X44,0X2F,0X69,0X57,0X21,0X77,0XD9,0XCC,0XDE,0X39,0X3B,0XFB,0X81,0X26
    
    To use this key, run mysgw with:
     --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
    
    $ sudo mysgw --set-soft-hmac-key=7F3F1A1C1EA32B72BF4BEDE2D16543971C26442F69572177D9CCDE393BFB8126
    

    The same process applies to generate/set the other key types.

    1 Reply Last reply
    1
    • M Offline
      M Offline
      marceloaqno
      Code Contributor
      wrote on last edited by marceloaqno
      #191

      @aand @Tag @jirm MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future.

      jirmJ T 2 Replies Last reply
      0
      • M marceloaqno

        @aand @Tag @jirm MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future.

        jirmJ Offline
        jirmJ Offline
        jirm
        wrote on last edited by
        #192

        @marceloaqno

        You mean the error posted @aand is because that?

        You mean mysgw use own NRF24 drivers that is not supported on OPI although he have running Raspbian version?.

        In any case, if so will be really fine if mysgw software allowed (or provide information about how to do it) to use any NRF24 driver (ex. TMRh20 fork that is working fine on OPI) and maybe too Hope RFMXX (I´m most interested in this last transceivers) because I think that generally speaking make a rigidly link with a type of hardware is not the best thing that can be done to really give the best functionality to any application.

        Still keep waiting for anyone here than can help to install mysgw softw on OPI.

        Thanks for your information

        Best regards

        M 1 Reply Last reply
        0
        • Robinek70R Offline
          Robinek70R Offline
          Robinek70
          wrote on last edited by
          #193

          @marceloaqno, Thanks a lot

          luizrrochaL 1 Reply Last reply
          0
          • Robinek70R Robinek70

            @marceloaqno, Thanks a lot

            luizrrochaL Offline
            luizrrochaL Offline
            luizrrocha
            wrote on last edited by
            #194

            Ditto, @Robinek70 !

            Thank you, Marcelo Aquino, for your fantastic work .

            I have Domoticz, Cacti, Heyu and MySensors Gateway running in a 30 dollars RASPBERRY PI 2, all without a glitch, all talking to each other and hopefully soon will also have Alexa for RASPBERRY PI running there also.

            If in doubt, by a RASPBERRY PI and thank people who develop and support it for free instead of complaining all the time.

            'nuff said.

            Luiz Roberto

            M 1 Reply Last reply
            0
            • jirmJ jirm

              @marceloaqno

              You mean the error posted @aand is because that?

              You mean mysgw use own NRF24 drivers that is not supported on OPI although he have running Raspbian version?.

              In any case, if so will be really fine if mysgw software allowed (or provide information about how to do it) to use any NRF24 driver (ex. TMRh20 fork that is working fine on OPI) and maybe too Hope RFMXX (I´m most interested in this last transceivers) because I think that generally speaking make a rigidly link with a type of hardware is not the best thing that can be done to really give the best functionality to any application.

              Still keep waiting for anyone here than can help to install mysgw softw on OPI.

              Thanks for your information

              Best regards

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

              @jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:

              In file included from examples_linux/mysgw.cpp:74:0:
              ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
              #error No support for nRF24 radio on this platform
              

              For @aand error, it's what you mention in your early post, a gcc compiler issue.

              MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.

              I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.

              jirmJ 1 Reply Last reply
              0
              • M musthafa

                Can I install mysensors on a openhab installed RPi ?

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

                @musthafa I'll give it a try. What version of openhab are you using?

                T M 2 Replies Last reply
                0
                • M marceloaqno

                  @musthafa I'll give it a try. What version of openhab are you using?

                  T Offline
                  T Offline
                  Tag
                  wrote on last edited by Tag
                  #197

                  @marceloaqno

                  Thank you for your help here!! would be great to have mysgw on the OPI!
                  I am using armbian on a OPI zero, so let me know if you need any further info.

                  (Also using an RPI, which runs mysgw with direct connected radio like a charm!)
                  Kind regards,

                  Tag

                  1 Reply Last reply
                  0
                  • aandA Offline
                    aandA Offline
                    aand
                    wrote on last edited by
                    #198

                    @marceloaqno said "MySensors uses its own nrf24 drivers, and OrangePi is not currently supported. It will be in the future."

                    I wish it worked now, but I don't mind waiting. Just to clarify where I'm coming from -- Orange Pi One hardware running Armbian. Thanks!

                    I'll be keeping watching the updates!

                    1 Reply Last reply
                    0
                    • M marceloaqno

                      @musthafa I'll give it a try. What version of openhab are you using?

                      M Offline
                      M Offline
                      musthafa
                      wrote on last edited by
                      #199

                      @marceloaqno

                      OpenHab 2

                      M 1 Reply Last reply
                      0
                      • M marceloaqno

                        @jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:

                        In file included from examples_linux/mysgw.cpp:74:0:
                        ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
                        #error No support for nRF24 radio on this platform
                        

                        For @aand error, it's what you mention in your early post, a gcc compiler issue.

                        MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.

                        I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.

                        jirmJ Offline
                        jirmJ Offline
                        jirm
                        wrote on last edited by jirm
                        #200

                        @marceloaqno

                        Really thanks a lot for your work and very much appreciate you try to help us on our "fight" with the OPI board.
                        Sadly in this moment I cannot work because I'm out of time to try install all softw stuff on my OPI and try help much more to push it working with mysgw and so on.
                        I don't understand so much why is not working out of the box and the driver issue found and/what hardware communication issue are only on OPI with that similar derived Raspbian OS like Raspberry, and too not understand why cannot work on OPI because that SPI bus issue you say.
                        @aand reported nrf24 module work very well with TMRh20 driver, so seems hardware are OK on OPI for the module and I suppose still only discover and hopefully make it work avoiding the driver issue you say to compile properly mysgw softw.
                        Anyway, I only hope that anyone can help mainly here to make work mysgw on OPI too, and adapt it to work on Armbian, because OPI is a really good choice for HA controller board and sure in near future much people use it.

                        Is there any chance to substitute own nfr24 driver mysgw with the TMR20h, at least for testing purposes on OPI?

                        If any mysgw "code" people are reading this maybe can try to help us with some idea to try workaround the compilation issue on OPI.

                        Best regards and again many thanks!

                        PD: Only for test SPI purposses on armbian this can help (post 248) :
                        https://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/page-9#entry5747

                        Only for info, other interesting post about how to make work nrf24l01 module on OPI and armbian:
                        https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

                        Another one interesting post OPI One with armbian using NRF24 module:
                        https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

                        1 Reply Last reply
                        0
                        • M musthafa

                          @marceloaqno

                          OpenHab 2

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

                          @musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki

                          M 1 Reply Last reply
                          0
                          • H Offline
                            H Offline
                            hausinger
                            wrote on last edited by
                            #202

                            Hello.

                            I'm also using a orangepi one and wanted to build the gateway on it. But i didn't want to use the nrf24 but a usb to rs485 converter. But if i want to compile it, i get also the same error with the nrf24 and that it is not supporting platform. Why?

                            Also if i want to build a serial gateway with a connected arduino on usb port, i got the same error with the nrf24

                            1 Reply Last reply
                            0
                            • M marceloaqno

                              @musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki

                              M Offline
                              M Offline
                              musthafa
                              wrote on last edited by
                              #203

                              @marceloaqno thank you.

                              I have already installed OpenHAB 2 on my RPi. Can I install mysgw on to the same RPi ?

                              M 1 Reply Last reply
                              0
                              • aandA Offline
                                aandA Offline
                                aand
                                wrote on last edited by
                                #204

                                @hausinger -- are you running armbian on your orange pi one?

                                H 1 Reply Last reply
                                0
                                • OliO Offline
                                  OliO Offline
                                  Oli
                                  wrote on last edited by
                                  #205

                                  How can I update MySensors Gateway from 2.1.0 beta to 2.1.0 stable/final release?

                                  M 1 Reply Last reply
                                  0
                                  • M musthafa

                                    @marceloaqno thank you.

                                    I have already installed OpenHAB 2 on my RPi. Can I install mysgw on to the same RPi ?

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

                                    @musthafa Yes, set the IP Address to 127.0.0.1 in your openhab for the ethernet gateway.

                                    M 1 Reply Last reply
                                    0
                                    • aandA aand

                                      @hausinger -- are you running armbian on your orange pi one?

                                      H Offline
                                      H Offline
                                      hausinger
                                      wrote on last edited by
                                      #207

                                      @aand said:

                                      @hausinger -- are you running armbian on your orange pi one?

                                      Yes, I'm running on armbian on my orange pi one

                                      1 Reply Last reply
                                      0
                                      • aandA aand

                                        @jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.

                                        I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:

                                        ./configure
                                        [SECTION] Detecting target machine.
                                        [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                                        [OK] init system detected: sysvinit
                                        [SECTION] Saving configuration.
                                        [SECTION] Cleaning previous builds.
                                        [OK] Finished.

                                        make
                                        gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
                                        DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
                                        .c -o build/drivers/Linux/log.o
                                        cc1: error: bad value (armv8-a) for -march switch
                                        cc1: error: bad value (cortex-a53) for -mtune switch
                                        Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
                                        make: *** [build/drivers/Linux/log.o] Error 1

                                        jirmJ Offline
                                        jirmJ Offline
                                        jirm
                                        wrote on last edited by
                                        #208

                                        @aand

                                        Hi again!

                                        I spend some time seeing and reading some of the files from the mysensors github build and I see some things that can help to understand why the error raised to @aand trying to compile on OPI.

                                        First say that I´m not a coding expert, so please be nice with my if I´m wrong and say something stupid ;-)

                                        I see in the .configure file that the machine detection have H3 Soc and this are fine detected , but then I see that selecting type and CPU flags seems not properly selected to match OPI specs , because on OPI soc H3 have a cpu armv7 (not armv8) and is a A20 and not A53.
                                        So maybe that cpu "selection" is not correct for H3 soc , and is so easy try if anyone that have OPI and have time can change only that values in the config file and try to compile.
                                        All the values on the A20 line seems correct for the OPI H3 soc, so only needed copy them from the A20 line to the H3 line, and give a try.

                                        File Configure

                                        .......

                                        function gcc_cpu_flags {
                                        local soc=$1
                                        case $soc in
                                        BCM2835)
                                        flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
                                        ;;
                                        BCM2836)
                                        flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
                                        ;;
                                        AM33XX)
                                        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
                                        ;;
                                        A10)
                                        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
                                        ;;
                                        A13)
                                        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
                                        ;;
                                        A20)
                                        flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
                                        ;;
                                        H3)
                                        flags="-march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard"

                                        ;;
                                        *)

                                        1 Reply Last reply
                                        1
                                        • M marceloaqno

                                          @musthafa Yes, set the IP Address to 127.0.0.1 in your openhab for the ethernet gateway.

                                          M Offline
                                          M Offline
                                          musthafa
                                          wrote on last edited by
                                          #209

                                          @marceloaqno Thank you!

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


                                          23

                                          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