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 Orange Pi Gateway

💬 Building a Orange Pi Gateway

Scheduled Pinned Locked Moved Announcements
110 Posts 24 Posters 31.6k Views 21 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.
  • 8 Offline
    8 Offline
    8667
    wrote on last edited by
    #69

    Thanks, I already have a broker and OpenHAB. Want this gateway to act as a client....maybe it will even support SSL MQTT. And encryption with

    #define MY_RF24_ENABLE_ENCRYPTION is wanted.

    In the article, there is no list of all available configurations...yea adding SD card does not make it cheaper

    mfalkviddM 1 Reply Last reply
    0
    • pansenP Offline
      pansenP Offline
      pansen
      wrote on last edited by
      #70

      i'm sorry, i do not have experience with encryption. essentially it depends on the code you want to write, since on the pi you are kind of limited to scripting, whereas microcontroller code is closer to hardware. also, if you need things like an adc or spi you're better of with a microcontroller. if it's just about some LEDs lighting up..

      Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

      1 Reply Last reply
      0
      • 8 8667

        Thanks, I already have a broker and OpenHAB. Want this gateway to act as a client....maybe it will even support SSL MQTT. And encryption with

        #define MY_RF24_ENABLE_ENCRYPTION is wanted.

        In the article, there is no list of all available configurations...yea adding SD card does not make it cheaper

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

        @8667 said in 💬 Building a Orange Pi Gateway:

        In the article, there is no list of all available configurations..

        From the article:

        For a complete list of configuration parameters, run:

        ./configure --help

        Did you miss this or is there something I'm not understanding?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BAsavaraj004
          wrote on last edited by
          #72

          mysgw: Could not open /sys/class/gpio/gpio10/direction
          Please help me to solve this error

          mfalkviddM 1 Reply Last reply
          0
          • B BAsavaraj004

            mysgw: Could not open /sys/class/gpio/gpio10/direction
            Please help me to solve this error

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

            @BAsavaraj004 could you describe what you did when you got that error?

            1 Reply Last reply
            0
            • B Offline
              B Offline
              BAsavaraj004
              wrote on last edited by
              #74

              @mfalkvidd
              When I executed sudo ./bin/mysgw -d this command after that i'm facing error like :

              mysgw: Starting gateway...
              mysgw: Protocol version - 2.2.0-beta
              mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta
              mysgw: TSF:LRT:OK
              mysgw: TSM:INIT
              mysgw: TSF:WUR:MS=0
              mysgw: Could not open /sys/class/gpio/gpio24/direction
              I followed all the steps provide in the site but still I am getting error.

              mfalkviddM 1 Reply Last reply
              0
              • B BAsavaraj004

                @mfalkvidd
                When I executed sudo ./bin/mysgw -d this command after that i'm facing error like :

                mysgw: Starting gateway...
                mysgw: Protocol version - 2.2.0-beta
                mysgw: MCO:BGN:INIT GW,CP=RNNG----,VER=2.2.0-beta
                mysgw: TSF:LRT:OK
                mysgw: TSM:INIT
                mysgw: TSF:WUR:MS=0
                mysgw: Could not open /sys/class/gpio/gpio24/direction
                I followed all the steps provide in the site but still I am getting error.

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

                @BAsavaraj004 thanks. Earlier posts indicate that the "Could not open" error could be caused by a problem with the pin mapping. I don't have an OrangePi myself so I don't know the details but maybe these posts can help:
                https://forum.mysensors.org/post/69656
                https://forum.mysensors.org/post/60943
                https://forum.mysensors.org/post/56374

                1 Reply Last reply
                0
                • S SdeWeb

                  Hi,
                  Well done finally i used the dedicated .fex file for Orange Pi Plus 2E here :
                  https://linux-sunxi.org/Xunlong_Orange_Pi_Plus_2E#Expansion_Port

                  at this point :
                  https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepiplus2e.fex

                  Read the .fex file in a text editor, u'll see important things about "gpio_config" for H3 cpu :

                  ; NOTE: This section is necessary only for "gpio_sunxi" driver
                  ; which is obsolete for H3 boards
                  [gpio_para]
                  gpio_used = 0
                  gpio_num = 0
                  

                  I connected my NRF24L01 on OPI P2E like this :

                  NRF24L01 Port Name / (Pin N°) ----- OPI Port (Pin N°) / Name
                                        GND (1)  <-----------> (20) / GND
                                        VCC (2)  <-----------> (17) / 3.3V PWR
                                        CE (3)   <-----------> (22) / (PA2 / GPIO2)
                                        CSN (4)  <-----------> (24) / (PC3 / GPIO67)
                                        SCK (5)  <-----------> (23)
                                        MOSI (6) <-----------> (19) MOSI
                                        MISO (7) <-----------> (21) MISO
                                        IRQ (8)  <-----------> NC
                  

                  So "MySensors" setup is :

                  ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67
                  

                  Then

                  ./bin/mysgw -d
                  

                  Return :

                  root@orangepiplus2e:~/MySensors# ./bin/mysgw -d
                  mysgw: Starting gateway...
                  mysgw: Protocol version - 2.2.0-beta
                  mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta
                  mysgw: TSM:INIT
                  mysgw: TSF:WUR:MS=0
                  mysgw: TSM:INIT:TSP OK
                  mysgw: TSM:INIT:GW MODE
                  mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                  mysgw: MCO:REG:NOT NEEDED
                  mysgw: Listening for connections on 0.0.0.0:5003
                  mysgw: MCO:BGN:STP
                  mysgw: MCO:BGN:INIT OK,TSP=1
                  

                  Best.
                  Seb.

                  E Offline
                  E Offline
                  ElDuderino
                  wrote on last edited by ElDuderino
                  #76

                  @SdeWeb said in 💬 Building a Orange Pi Gateway:

                  Hi,
                  Well done finally i used the dedicated .fex file for Orange Pi Plus 2E here :
                  https://linux-sunxi.org/Xunlong_Orange_Pi_Plus_2E#Expansion_Port

                  at this point :
                  https://github.com/igorpecovnik/lib/blob/master/config/fex/orangepiplus2e.fex

                  Read the .fex file in a text editor, u'll see important things about "gpio_config" for H3 cpu :

                  ; NOTE: This section is necessary only for "gpio_sunxi" driver
                  ; which is obsolete for H3 boards
                  [gpio_para]
                  gpio_used = 0
                  gpio_num = 0
                  

                  I connected my NRF24L01 on OPI P2E like this :

                  NRF24L01 Port Name / (Pin N°) ----- OPI Port (Pin N°) / Name
                                        GND (1)  <-----------> (20) / GND
                                        VCC (2)  <-----------> (17) / 3.3V PWR
                                        CE (3)   <-----------> (22) / (PA2 / GPIO2)
                                        CSN (4)  <-----------> (24) / (PC3 / GPIO67)
                                        SCK (5)  <-----------> (23)
                                        MOSI (6) <-----------> (19) MOSI
                                        MISO (7) <-----------> (21) MISO
                                        IRQ (8)  <-----------> NC
                  

                  So "MySensors" setup is :

                  ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67
                  

                  Then

                  ./bin/mysgw -d
                  

                  Return :

                  root@orangepiplus2e:~/MySensors# ./bin/mysgw -d
                  mysgw: Starting gateway...
                  mysgw: Protocol version - 2.2.0-beta
                  mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta
                  mysgw: TSM:INIT
                  mysgw: TSF:WUR:MS=0
                  mysgw: TSM:INIT:TSP OK
                  mysgw: TSM:INIT:GW MODE
                  mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                  mysgw: MCO:REG:NOT NEEDED
                  mysgw: Listening for connections on 0.0.0.0:5003
                  mysgw: MCO:BGN:STP
                  mysgw: MCO:BGN:INIT OK,TSP=1
                  

                  Best.
                  Seb.

                  This worked great on my Orange Pi Lite.
                  I was trying to follow the tutorial at Building a Orange Pi Gateway and I tried all sorts of things that didn't work.
                  IMO the main tutorial should have this as instruction to building a gateway with Orange Pi Lite/Plus.
                  Thanks!!
                  ( Sorry for quoting the entire original post, but this will help anyone searching for help with their Orange Pi Lite)

                  1 Reply Last reply
                  0
                  • 8 Offline
                    8 Offline
                    8667
                    wrote on last edited by
                    #77

                    I got the OrangeZero and was building the configuration command... can someone provide me more detailed instructions about using higher security?

                    1. Is it possible to use SSL for the connecting to the broker?
                    2. How whitelisting works with Pi? I moved away of Arduino as I do not want to recompile it everytime I need to include new node. So far I have
                    -my-signing-request-signatures --my-signing-debug --my-signing=password --my-signing-password=SOMETHING --my-rf24-encryption-enabled
                    

                    but this will not allow me to exclude stolen nodes right?

                    AnticimexA 1 Reply Last reply
                    0
                    • 8 8667

                      I got the OrangeZero and was building the configuration command... can someone provide me more detailed instructions about using higher security?

                      1. Is it possible to use SSL for the connecting to the broker?
                      2. How whitelisting works with Pi? I moved away of Arduino as I do not want to recompile it everytime I need to include new node. So far I have
                      -my-signing-request-signatures --my-signing-debug --my-signing=password --my-signing-password=SOMETHING --my-rf24-encryption-enabled
                      

                      but this will not allow me to exclude stolen nodes right?

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

                      @8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.

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

                      8 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        @8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.

                        8 Offline
                        8 Offline
                        8667
                        wrote on last edited by
                        #79

                        @Anticimex said in 💬 Building a Orange Pi Gateway:

                        @8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.

                        So how personalization works on the orange and how to pass the list of serials?

                        AnticimexA 1 Reply Last reply
                        0
                        • 8 8667

                          @Anticimex said in 💬 Building a Orange Pi Gateway:

                          @8667 no, it won't. As it is for the moment, whitelisting works no different compared to Arduino based devices. You will have to recompile your GW if you add new nodes as you will need to add their serials to the whitelist in the GW.

                          So how personalization works on the orange and how to pass the list of serials?

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

                          @8667 not sure. I have not been involved in the rPi port. I suggest you pass --help to the configure command. It should give a list of options.

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

                          1 Reply Last reply
                          0
                          • 8 Offline
                            8 Offline
                            8667
                            wrote on last edited by
                            #81

                            This should be in the wiki

                            root@pi0:~/MySensors# ./configure --help
                            configure script for MySensors gateway.
                            Options:
                            
                            Help:
                                -h, --help                  print this message
                            
                            SPI driver options:
                                --spi-driver=[BCM|SPIDEV]
                                --spi-spidev-device=<DEVICE>
                                                            Device path. [/dev/spidev0.0]
                            
                            Building options:
                                --soc=[BCM2835|BCM2836|BCM2837|AM33XX|A10|A13|A20|H3]
                                                            SoC type to be used. [configure autodetected]
                                --cpu-flags=<CPUFLAGS>      CPU defining/optimizing flags to be used. [configure autodetected]
                                --extra-cflags=<CFLAGS>     Extra C flags passed to C compilation. []
                                --extra-cxxflags=<CXXFLAGS> Extra C++ flags passed to C++ compilation. []
                                --extra-ldflags=<LDFLAGS>   Extra C flags passed to linking. []
                                --c_compiler=<CC>           C compiler. [arm-linux-gnueabihf-gcc][gcc]
                                --cxx_compiler=<CXX>        C++ compiler. [arm-linux-gnueabihf-g++][g++]
                                --build-dir=<DIR>           Compiler directory to store object files. [build]
                                --bin-dir=<DIR>             Compiler directory to store binary files. [bin]
                                --arduino-lib-dir=<DIR>     Arduino library directory.
                                --no-clean                  Don't clean previous build artifacts.
                            
                            Installation options:
                                --prefix=<PREFIX>           Installation prefix path. [/usr/local]
                                --gateway-dir=<DIR>         Gateway files installation directory. [PREFIX/bin]
                            
                            MySensors options:
                                --my-debug=[enable|disable] Enables or disables MySensors core debugging. [enable]
                                --my-config-file=<FILE>     Config file path. [/etc/mysensors.dat]
                                --my-gateway=[none|ethernet|serial|mqtt]
                                                            Set the protocol used to communicate with the controller.
                                                            [ethernet]
                                --my-node-id=<ID>           Disable gateway feature and run as a node with the specified id.
                                --my-controller-url-address=<URL>
                                                            Controller or MQTT broker url.
                                --my-controller-ip-address=<IP>
                                                            Controller or MQTT broker ip.
                                --my-port=<PORT>            The port to keep open on gateway mode.
                                                            If gateway is set to mqtt, it sets the broker port.
                                --my-serial-port=<PORT>     Serial port. [/dev/ttyACM0]
                                --my-serial-baudrate=<BAUD> Serial baud rate. [115200]
                                --my-serial-is-pty          Set the serial port to be a pseudo terminal. Use this if you want
                                                            to connect to a controller running on the same device.
                                --my-serial-pty=<NAME>      Symlink name for the PTY device. [/dev/ttyMySensorsGateway]
                                --my-serial-groupname=<GROUP>
                                                            Grant access to the specified system group for the serial device.
                                --my-mqtt-client-id=<ID>    MQTT client id.
                                --my-mqtt-user=<UID>        MQTT user id.
                                --my-mqtt-password=<PASS>   MQTT password.
                                --my-mqtt-publish-topic-prefix=<PREFIX>
                                                            MQTT publish topic prefix.
                                --my-mqtt-subscribe-topic-prefix=<PREFIX>
                                                            MQTT subscribe topic prefix.
                                --my-transport=[none|nrf24|rs485|rfm95|rfm69]
                                                            Set the transport to be used to communicate with other nodes.
                                                            [nrf24]
                                --my-rf24-channel=<0-125>   RF channel for the sensor net. [76]
                                --my-rf24-pa-level=[RF24_PA_MAX|RF24_PA_LOW]
                                                            RF24 PA level. [RF24_PA_MAX]
                                --my-rf24-ce-pin=<PIN>      Pin number to use for rf24 Chip-Enable.
                                --my-rf24-cs-pin=<PIN>      Pin number to use for rf24 Chip-Select.
                                --my-rf24-irq-pin=<PIN>     Pin number connected to nRF24L01 IRQ pin.
                                --my-rf24-encryption-enabled
                                                            Enables RF24 encryption.
                                                            All nodes and gateway must have this enabled, and all must be
                                                            personalized with the same AES key
                                --my-rx-message-buffer-size=<SIZE>
                                                            Buffer size for incoming messages when using rf24 interrupts. [20]
                                --my-rfm69-frequency=[315|433|868|915]
                                                            RFM69 Module Frequency. [868]
                                --my-is-rfm69hw             Enable high-powered rfm69hw.
                                --my-rfm69-irq-pin=<PIN>    Pin number connected to RFM69 IRQ pin.
                                --my-rfm69-cs-pin=<PIN>     Pin number to use for RFM69 Chip-Select.
                                --my-rs485-serial-port=<PORT>
                                                            RS485 serial port. You must provide a port.
                                --my-rs485-baudrate=<BAUD>  RS485 baudrate. [9600]
                                --my-rs485-de-pin=<PIN>     Pin number connected to RS485 driver enable pin.
                                --my-rs485-max-msg-length=<LENGTH>
                                                            The maximum message length used for RS485. [40]
                                --my-leds-err-pin=<PIN>     Error LED pin.
                                --my-leds-rx-pin=<PIN>      Receive LED pin.
                                --my-leds-tx-pin=<PIN>      Transmit LED pin.
                                --my-leds-blinking-inverse  Inverse the blinking feature.
                                --my-signing=[none|software|password]
                                                            Message signing. [none]
                                --my-signing-debug          Enable signing related debug.
                                --my-signing-request-signatures
                                                            Enable signature request from nodes that in turn requested
                                                            gateway signature.
                                --my-signing-weak_security  Enable this to permit downgrade of security preferences and
                                                            relaxed gateway signing requirements.
                                --my-signing-password=<PASSWORD>
                                                            If you are using password as the signature type, set your password here.
                            
                            root@pi0:~/MySensors# sudo ./bin/mysgw -h
                            mysgw: Config file /etc/mysensors.dat does not exist, creating new config file.
                            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.
                            
                            AnticimexA mfalkviddM 2 Replies Last reply
                            0
                            • 8 8667

                              This should be in the wiki

                              root@pi0:~/MySensors# ./configure --help
                              configure script for MySensors gateway.
                              Options:
                              
                              Help:
                                  -h, --help                  print this message
                              
                              SPI driver options:
                                  --spi-driver=[BCM|SPIDEV]
                                  --spi-spidev-device=<DEVICE>
                                                              Device path. [/dev/spidev0.0]
                              
                              Building options:
                                  --soc=[BCM2835|BCM2836|BCM2837|AM33XX|A10|A13|A20|H3]
                                                              SoC type to be used. [configure autodetected]
                                  --cpu-flags=<CPUFLAGS>      CPU defining/optimizing flags to be used. [configure autodetected]
                                  --extra-cflags=<CFLAGS>     Extra C flags passed to C compilation. []
                                  --extra-cxxflags=<CXXFLAGS> Extra C++ flags passed to C++ compilation. []
                                  --extra-ldflags=<LDFLAGS>   Extra C flags passed to linking. []
                                  --c_compiler=<CC>           C compiler. [arm-linux-gnueabihf-gcc][gcc]
                                  --cxx_compiler=<CXX>        C++ compiler. [arm-linux-gnueabihf-g++][g++]
                                  --build-dir=<DIR>           Compiler directory to store object files. [build]
                                  --bin-dir=<DIR>             Compiler directory to store binary files. [bin]
                                  --arduino-lib-dir=<DIR>     Arduino library directory.
                                  --no-clean                  Don't clean previous build artifacts.
                              
                              Installation options:
                                  --prefix=<PREFIX>           Installation prefix path. [/usr/local]
                                  --gateway-dir=<DIR>         Gateway files installation directory. [PREFIX/bin]
                              
                              MySensors options:
                                  --my-debug=[enable|disable] Enables or disables MySensors core debugging. [enable]
                                  --my-config-file=<FILE>     Config file path. [/etc/mysensors.dat]
                                  --my-gateway=[none|ethernet|serial|mqtt]
                                                              Set the protocol used to communicate with the controller.
                                                              [ethernet]
                                  --my-node-id=<ID>           Disable gateway feature and run as a node with the specified id.
                                  --my-controller-url-address=<URL>
                                                              Controller or MQTT broker url.
                                  --my-controller-ip-address=<IP>
                                                              Controller or MQTT broker ip.
                                  --my-port=<PORT>            The port to keep open on gateway mode.
                                                              If gateway is set to mqtt, it sets the broker port.
                                  --my-serial-port=<PORT>     Serial port. [/dev/ttyACM0]
                                  --my-serial-baudrate=<BAUD> Serial baud rate. [115200]
                                  --my-serial-is-pty          Set the serial port to be a pseudo terminal. Use this if you want
                                                              to connect to a controller running on the same device.
                                  --my-serial-pty=<NAME>      Symlink name for the PTY device. [/dev/ttyMySensorsGateway]
                                  --my-serial-groupname=<GROUP>
                                                              Grant access to the specified system group for the serial device.
                                  --my-mqtt-client-id=<ID>    MQTT client id.
                                  --my-mqtt-user=<UID>        MQTT user id.
                                  --my-mqtt-password=<PASS>   MQTT password.
                                  --my-mqtt-publish-topic-prefix=<PREFIX>
                                                              MQTT publish topic prefix.
                                  --my-mqtt-subscribe-topic-prefix=<PREFIX>
                                                              MQTT subscribe topic prefix.
                                  --my-transport=[none|nrf24|rs485|rfm95|rfm69]
                                                              Set the transport to be used to communicate with other nodes.
                                                              [nrf24]
                                  --my-rf24-channel=<0-125>   RF channel for the sensor net. [76]
                                  --my-rf24-pa-level=[RF24_PA_MAX|RF24_PA_LOW]
                                                              RF24 PA level. [RF24_PA_MAX]
                                  --my-rf24-ce-pin=<PIN>      Pin number to use for rf24 Chip-Enable.
                                  --my-rf24-cs-pin=<PIN>      Pin number to use for rf24 Chip-Select.
                                  --my-rf24-irq-pin=<PIN>     Pin number connected to nRF24L01 IRQ pin.
                                  --my-rf24-encryption-enabled
                                                              Enables RF24 encryption.
                                                              All nodes and gateway must have this enabled, and all must be
                                                              personalized with the same AES key
                                  --my-rx-message-buffer-size=<SIZE>
                                                              Buffer size for incoming messages when using rf24 interrupts. [20]
                                  --my-rfm69-frequency=[315|433|868|915]
                                                              RFM69 Module Frequency. [868]
                                  --my-is-rfm69hw             Enable high-powered rfm69hw.
                                  --my-rfm69-irq-pin=<PIN>    Pin number connected to RFM69 IRQ pin.
                                  --my-rfm69-cs-pin=<PIN>     Pin number to use for RFM69 Chip-Select.
                                  --my-rs485-serial-port=<PORT>
                                                              RS485 serial port. You must provide a port.
                                  --my-rs485-baudrate=<BAUD>  RS485 baudrate. [9600]
                                  --my-rs485-de-pin=<PIN>     Pin number connected to RS485 driver enable pin.
                                  --my-rs485-max-msg-length=<LENGTH>
                                                              The maximum message length used for RS485. [40]
                                  --my-leds-err-pin=<PIN>     Error LED pin.
                                  --my-leds-rx-pin=<PIN>      Receive LED pin.
                                  --my-leds-tx-pin=<PIN>      Transmit LED pin.
                                  --my-leds-blinking-inverse  Inverse the blinking feature.
                                  --my-signing=[none|software|password]
                                                              Message signing. [none]
                                  --my-signing-debug          Enable signing related debug.
                                  --my-signing-request-signatures
                                                              Enable signature request from nodes that in turn requested
                                                              gateway signature.
                                  --my-signing-weak_security  Enable this to permit downgrade of security preferences and
                                                              relaxed gateway signing requirements.
                                  --my-signing-password=<PASSWORD>
                                                              If you are using password as the signature type, set your password here.
                              
                              root@pi0:~/MySensors# sudo ./bin/mysgw -h
                              mysgw: Config file /etc/mysensors.dat does not exist, creating new config file.
                              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.
                              
                              AnticimexA Offline
                              AnticimexA Offline
                              Anticimex
                              Contest Winner
                              wrote on last edited by
                              #82

                              @8667 if there is no option for the whitelist, you should still be able to set it using the same #define as mentioned in the signing documentation. The implementation is shared.
                              It makes sense to keep it like that since the list could be quite long.

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

                              1 Reply Last reply
                              0
                              • 8 8667

                                This should be in the wiki

                                root@pi0:~/MySensors# ./configure --help
                                configure script for MySensors gateway.
                                Options:
                                
                                Help:
                                    -h, --help                  print this message
                                
                                SPI driver options:
                                    --spi-driver=[BCM|SPIDEV]
                                    --spi-spidev-device=<DEVICE>
                                                                Device path. [/dev/spidev0.0]
                                
                                Building options:
                                    --soc=[BCM2835|BCM2836|BCM2837|AM33XX|A10|A13|A20|H3]
                                                                SoC type to be used. [configure autodetected]
                                    --cpu-flags=<CPUFLAGS>      CPU defining/optimizing flags to be used. [configure autodetected]
                                    --extra-cflags=<CFLAGS>     Extra C flags passed to C compilation. []
                                    --extra-cxxflags=<CXXFLAGS> Extra C++ flags passed to C++ compilation. []
                                    --extra-ldflags=<LDFLAGS>   Extra C flags passed to linking. []
                                    --c_compiler=<CC>           C compiler. [arm-linux-gnueabihf-gcc][gcc]
                                    --cxx_compiler=<CXX>        C++ compiler. [arm-linux-gnueabihf-g++][g++]
                                    --build-dir=<DIR>           Compiler directory to store object files. [build]
                                    --bin-dir=<DIR>             Compiler directory to store binary files. [bin]
                                    --arduino-lib-dir=<DIR>     Arduino library directory.
                                    --no-clean                  Don't clean previous build artifacts.
                                
                                Installation options:
                                    --prefix=<PREFIX>           Installation prefix path. [/usr/local]
                                    --gateway-dir=<DIR>         Gateway files installation directory. [PREFIX/bin]
                                
                                MySensors options:
                                    --my-debug=[enable|disable] Enables or disables MySensors core debugging. [enable]
                                    --my-config-file=<FILE>     Config file path. [/etc/mysensors.dat]
                                    --my-gateway=[none|ethernet|serial|mqtt]
                                                                Set the protocol used to communicate with the controller.
                                                                [ethernet]
                                    --my-node-id=<ID>           Disable gateway feature and run as a node with the specified id.
                                    --my-controller-url-address=<URL>
                                                                Controller or MQTT broker url.
                                    --my-controller-ip-address=<IP>
                                                                Controller or MQTT broker ip.
                                    --my-port=<PORT>            The port to keep open on gateway mode.
                                                                If gateway is set to mqtt, it sets the broker port.
                                    --my-serial-port=<PORT>     Serial port. [/dev/ttyACM0]
                                    --my-serial-baudrate=<BAUD> Serial baud rate. [115200]
                                    --my-serial-is-pty          Set the serial port to be a pseudo terminal. Use this if you want
                                                                to connect to a controller running on the same device.
                                    --my-serial-pty=<NAME>      Symlink name for the PTY device. [/dev/ttyMySensorsGateway]
                                    --my-serial-groupname=<GROUP>
                                                                Grant access to the specified system group for the serial device.
                                    --my-mqtt-client-id=<ID>    MQTT client id.
                                    --my-mqtt-user=<UID>        MQTT user id.
                                    --my-mqtt-password=<PASS>   MQTT password.
                                    --my-mqtt-publish-topic-prefix=<PREFIX>
                                                                MQTT publish topic prefix.
                                    --my-mqtt-subscribe-topic-prefix=<PREFIX>
                                                                MQTT subscribe topic prefix.
                                    --my-transport=[none|nrf24|rs485|rfm95|rfm69]
                                                                Set the transport to be used to communicate with other nodes.
                                                                [nrf24]
                                    --my-rf24-channel=<0-125>   RF channel for the sensor net. [76]
                                    --my-rf24-pa-level=[RF24_PA_MAX|RF24_PA_LOW]
                                                                RF24 PA level. [RF24_PA_MAX]
                                    --my-rf24-ce-pin=<PIN>      Pin number to use for rf24 Chip-Enable.
                                    --my-rf24-cs-pin=<PIN>      Pin number to use for rf24 Chip-Select.
                                    --my-rf24-irq-pin=<PIN>     Pin number connected to nRF24L01 IRQ pin.
                                    --my-rf24-encryption-enabled
                                                                Enables RF24 encryption.
                                                                All nodes and gateway must have this enabled, and all must be
                                                                personalized with the same AES key
                                    --my-rx-message-buffer-size=<SIZE>
                                                                Buffer size for incoming messages when using rf24 interrupts. [20]
                                    --my-rfm69-frequency=[315|433|868|915]
                                                                RFM69 Module Frequency. [868]
                                    --my-is-rfm69hw             Enable high-powered rfm69hw.
                                    --my-rfm69-irq-pin=<PIN>    Pin number connected to RFM69 IRQ pin.
                                    --my-rfm69-cs-pin=<PIN>     Pin number to use for RFM69 Chip-Select.
                                    --my-rs485-serial-port=<PORT>
                                                                RS485 serial port. You must provide a port.
                                    --my-rs485-baudrate=<BAUD>  RS485 baudrate. [9600]
                                    --my-rs485-de-pin=<PIN>     Pin number connected to RS485 driver enable pin.
                                    --my-rs485-max-msg-length=<LENGTH>
                                                                The maximum message length used for RS485. [40]
                                    --my-leds-err-pin=<PIN>     Error LED pin.
                                    --my-leds-rx-pin=<PIN>      Receive LED pin.
                                    --my-leds-tx-pin=<PIN>      Transmit LED pin.
                                    --my-leds-blinking-inverse  Inverse the blinking feature.
                                    --my-signing=[none|software|password]
                                                                Message signing. [none]
                                    --my-signing-debug          Enable signing related debug.
                                    --my-signing-request-signatures
                                                                Enable signature request from nodes that in turn requested
                                                                gateway signature.
                                    --my-signing-weak_security  Enable this to permit downgrade of security preferences and
                                                                relaxed gateway signing requirements.
                                    --my-signing-password=<PASSWORD>
                                                                If you are using password as the signature type, set your password here.
                                
                                root@pi0:~/MySensors# sudo ./bin/mysgw -h
                                mysgw: Config file /etc/mysensors.dat does not exist, creating new config file.
                                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.
                                
                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by mfalkvidd
                                #83

                                @8667 a first try of making the help text available online is now available at https://ci.mysensors.org/job/MySensors/job/MySensors/job/PR-952/12/Doxygen_HTML/group__RaspberryPiGateway.html
                                If/when the pull request is accepted, a link can be added on the build page.

                                1 Reply Last reply
                                0
                                • Ricardo RibeiroR Offline
                                  Ricardo RibeiroR Offline
                                  Ricardo Ribeiro
                                  wrote on last edited by
                                  #84

                                  Hello! I followed instructions by SdeWeb on my Orange Pi Lite with Armbian, and gateway is working fine, I can see debug messages from other node. But when I try to add a serial port in node-red I can't find the gateway one. Can you help me?

                                  1 Reply Last reply
                                  0
                                  • Ricardo RibeiroR Offline
                                    Ricardo RibeiroR Offline
                                    Ricardo Ribeiro
                                    wrote on last edited by
                                    #85

                                    FYI i configure like this:
                                    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB10 --my-serial-baudrate=115200

                                    1 Reply Last reply
                                    0
                                    • 8 Offline
                                      8 Offline
                                      8667
                                      wrote on last edited by
                                      #86

                                      NOTE for Armbian and Orange Pi Zero.

                                      Set static IP address or the device will lose connection on next DHCP request. I use only the LAN and was having problems for few days.

                                      mfalkviddM 1 Reply Last reply
                                      0
                                      • 8 8667

                                        NOTE for Armbian and Orange Pi Zero.

                                        Set static IP address or the device will lose connection on next DHCP request. I use only the LAN and was having problems for few days.

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

                                        @8667 I didn't know it was possibe to set ip address for the Pi gateway. How did you do that?

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SdeWeb
                                          wrote on last edited by SdeWeb
                                          #88

                                          Hi,
                                          You should set your gateway as a ethernet / network gateway. By default, it run on port 5003 (ex : [gwipadresse]:5003.
                                          If you controler is hosted on the same machine that the gateway, then you can call the ip adresse : 127.0.0.1:5003. (the localhost adress) whatever the real IP adresse of your PI.
                                          if you got a good router on u'r network, that it running DHCP server and give IP adresses of your devices on the network, then you can define static IP adresse for the MAC adresse of your PI.

                                          Regards.

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


                                          24

                                          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