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 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
                        • Ricardo RibeiroR Offline
                          Ricardo RibeiroR Offline
                          Ricardo Ribeiro
                          wrote on last edited by
                          #89

                          I had to use spidev0.0 and not spidev1.0:
                          +++
                          opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
                          mysgw: Starting gateway...
                          mysgw: Protocol version - 2.2.0-beta
                          mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta
                          mysgw: TSF:LRT:OK
                          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: MCO:BGN:STP
                          mysgw: MCO:BGN:INIT OK,TSP=1
                          +++
                          opilite@orangepilite:~/MySensors$ ./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/ttyMySensorsGateway

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

                            With mqtt gateway I got further ahead:
                            +++
                            opilite@orangepilite:~/MySensors$ ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=67 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=my_mqtt_gateway
                            +++
                            opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
                            mysgw: Starting gateway...
                            mysgw: Protocol version - 2.2.0-beta
                            mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta
                            mysgw: TSF:LRT:OK
                            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: MCO:BGN:STP
                            mysgw: MCO:BGN:INIT OK,TSP=1
                            mysgw: Attempting MQTT connection...
                            mysgw: connected to 127.0.0.1
                            mysgw: MQTT connected
                            mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
                            +++
                            mysensors-out/0/255/0/0/18 : msg.payload : string[10]
                            "2.2.0-beta"

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

                              Ok, now I load a sketch into an arduino nanowith nrf24l01+ and this is all I got:
                              +++
                              opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
                              mysgw: Starting gateway...
                              mysgw: Protocol version - 2.2.0-beta
                              mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta
                              mysgw: TSF:LRT:OK
                              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: MCO:BGN:STP
                              mysgw: MCO:BGN:INIT OK,TSP=1
                              mysgw: Attempting MQTT connection...
                              mysgw: connected to 127.0.0.1
                              mysgw: MQTT connected
                              mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
                              mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                              mysgw: TSF:MSG:BC
                              mysgw: TSF:MSG:FPAR REQ,ID=255
                              mysgw: TSF:CKU:OK,FCTRL
                              mysgw: TSF:MSG:GWL OK
                              mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                              mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                              mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                              mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                              mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                              mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                              mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                              mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                              mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                              mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                              mysgw: TSF:MSG:BC
                              mysgw: TSF:MSG:FPAR REQ,ID=255
                              mysgw: TSF:PNG:SEND,TO=0
                              mysgw: TSF:CKU:OK
                              mysgw: TSF:MSG:GWL OK
                              (...)
                              +++

                              Stuck again.

                              mfalkviddM 1 Reply Last reply
                              0
                              • Ricardo RibeiroR Ricardo Ribeiro

                                Ok, now I load a sketch into an arduino nanowith nrf24l01+ and this is all I got:
                                +++
                                opilite@orangepilite:~/MySensors$ sudo ./bin/mysgw -d
                                mysgw: Starting gateway...
                                mysgw: Protocol version - 2.2.0-beta
                                mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta
                                mysgw: TSF:LRT:OK
                                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: MCO:BGN:STP
                                mysgw: MCO:BGN:INIT OK,TSP=1
                                mysgw: Attempting MQTT connection...
                                mysgw: connected to 127.0.0.1
                                mysgw: MQTT connected
                                mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
                                mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                                mysgw: TSF:MSG:BC
                                mysgw: TSF:MSG:FPAR REQ,ID=255
                                mysgw: TSF:CKU:OK,FCTRL
                                mysgw: TSF:MSG:GWL OK
                                mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                                mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                                mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                                mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                                mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                                mysgw: TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                                mysgw: TSF:MSG:BC
                                mysgw: TSF:MSG:FPAR REQ,ID=255
                                mysgw: TSF:PNG:SEND,TO=0
                                mysgw: TSF:CKU:OK
                                mysgw: TSF:MSG:GWL OK
                                (...)
                                +++

                                Stuck again.

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

                                @Ricardo-Ribeiro that looks normal. Is this different from what you expected? If so, how does it differ?

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

                                  Had anyone succeeded using signing+encryption on OrangePi MQTT gateway? I managed to make Arduino gateway and it worked but I can not replicate the same thing with Pi. What file should be edited to enter the keys? and the whitelist?

                                  1 Reply Last reply
                                  0
                                  • P Offline
                                    P Offline
                                    pii
                                    wrote on last edited by mfalkvidd
                                    #94

                                    Am getting this error:
                                    ERROR Could not open /sys/class/gpio/gpio24/direction
                                    My config is:

                                    ./configure --spi-spidev-device=/dev/spidev1.0 --my-node-id=1 --my-transport=rfm95 --my-rfm95-cs-pin=13 --my-rfm95-irq-pin=10 --my-rfm69-frequency=915E6
                                    

                                    Whole output is:

                                    root@ttn-gateway:~/MySensors# sudo ./bin/mysgw
                                    May 23 09:37:31 INFO  Starting gateway...
                                    May 23 09:37:31 INFO  Protocol version - 2.3.0-alpha
                                    
                                     __  __       ____
                                    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                                    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                                    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                                    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                                            |___/                      2.3.0-alpha
                                    
                                    May 23 09:37:31 DEBUG MCO:BGN:INIT NODE,CP=RLNNL---,VER=2.3.0-alpha
                                    May 23 09:37:31 DEBUG TSM:INIT
                                    May 23 09:37:31 DEBUG TSF:WUR:MS=0
                                    May 23 09:37:42 ERROR Could not open /sys/class/gpio/gpio24/direction
                                    
                                    pansenP 1 Reply Last reply
                                    0
                                    • P pii

                                      Am getting this error:
                                      ERROR Could not open /sys/class/gpio/gpio24/direction
                                      My config is:

                                      ./configure --spi-spidev-device=/dev/spidev1.0 --my-node-id=1 --my-transport=rfm95 --my-rfm95-cs-pin=13 --my-rfm95-irq-pin=10 --my-rfm69-frequency=915E6
                                      

                                      Whole output is:

                                      root@ttn-gateway:~/MySensors# sudo ./bin/mysgw
                                      May 23 09:37:31 INFO  Starting gateway...
                                      May 23 09:37:31 INFO  Protocol version - 2.3.0-alpha
                                      
                                       __  __       ____
                                      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                                      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                                      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                                      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                                              |___/                      2.3.0-alpha
                                      
                                      May 23 09:37:31 DEBUG MCO:BGN:INIT NODE,CP=RLNNL---,VER=2.3.0-alpha
                                      May 23 09:37:31 DEBUG TSM:INIT
                                      May 23 09:37:31 DEBUG TSF:WUR:MS=0
                                      May 23 09:37:42 ERROR Could not open /sys/class/gpio/gpio24/direction
                                      
                                      pansenP Offline
                                      pansenP Offline
                                      pansen
                                      wrote on last edited by
                                      #95

                                      @pii

                                      • Does /sys/class/gpio/gpio24/direction exists?
                                      • Does /sys/class/gpio/gpio24 exists?
                                      • Can you write to them using echo?

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

                                      P 2 Replies Last reply
                                      0
                                      • pansenP pansen

                                        @pii

                                        • Does /sys/class/gpio/gpio24/direction exists?
                                        • Does /sys/class/gpio/gpio24 exists?
                                        • Can you write to them using echo?
                                        P Offline
                                        P Offline
                                        pii
                                        wrote on last edited by
                                        #96

                                        @pansen No.... nothing... /sys/class/gpio/gpio24doesn't exist.
                                        even "echo "24" > /sys/class/gpio/export doesn't work.
                                        But, yes otherwise if I try the same with 13 i.e "echo "13" > /sys/class/gpio/export Then a directory is created and then /sys/class/gpio/gpio24/direction do exist.

                                        1 Reply Last reply
                                        0
                                        • pansenP pansen

                                          @pii

                                          • Does /sys/class/gpio/gpio24/direction exists?
                                          • Does /sys/class/gpio/gpio24 exists?
                                          • Can you write to them using echo?
                                          P Offline
                                          P Offline
                                          pii
                                          wrote on last edited by
                                          #97

                                          @pansen Thank you sooooooo much for your reply.!!! By the way, What I actually have to do is "Make an MQTT based LoRa(RA-02) receiver gateway on OrangePi Zero". And I'm stuck since whole week :'( of course spent time trying code without solid base. :/
                                          Yes, yet I'm trying to first set up a LoRa receiver(not MQTT, not gateway)

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


                                          9

                                          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