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. Development
  3. MySensors Raspberry port suggestions

MySensors Raspberry port suggestions

Scheduled Pinned Locked Moved Development
96 Posts 14 Posters 42.4k Views 17 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.
  • M marceloaqno

    @ericvdb That's right. I hope to add support for RFM69, Serial and software signing very soon.

    To use, clone the raspberryPi port for MySensors 2.0:

    git clone https://github.com/marceloaqno/MySensors.git
    cd MySensors
    

    To configure it, take a look at the options available within configure:

    ./configure --help
    

    For other options, you may have to edit the sample file example_linux/mysGateway.cpp, and uncoment what you need.

    Once done, run:

    make
    sudo make install
    

    To run the gateway you need to be root or use sudo:

    sudo msyGateway -h
    

    For wiring, follow this guide:
    https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway-mysensors-1-x

    ikkeTI Offline
    ikkeTI Offline
    ikkeT
    wrote on last edited by
    #74

    @marceloaqno , I assume your link for the wiring pinout behind the link is for Raspi 1 A+ with 26 pin header? Or for which version?

    I'd like to try this with raspi 2 B, would you have instructions how to wire it?

    Raspi2:
    raspi2 pinout
    Raspi1:
    raspi1 pinout

    Thanks

    1 Reply Last reply
    0
    • ikkeTI Offline
      ikkeTI Offline
      ikkeT
      wrote on last edited by
      #75

      No, looking it again, it's vice versa, so yours is for Raspi2, right?

      M 1 Reply Last reply
      0
      • ikkeTI Offline
        ikkeTI Offline
        ikkeT
        wrote on last edited by
        #76

        So this 1.6 pinout would still apply? https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway-mysensors-1-x

        pinout

        1 Reply Last reply
        0
        • ikkeTI ikkeT

          No, looking it again, it's vice versa, so yours is for Raspi2, right?

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

          @ikkeT yes, these are the default pins.
          (SCK = 23, MISO = 21, MOSI = 19, CS = 24, CE = 22)

          1 Reply Last reply
          1
          • ikkeTI Offline
            ikkeTI Offline
            ikkeT
            wrote on last edited by
            #78

            Yahooo! It works, finally. I bet my problem was Raspi1 all along. I never realized the pinouts in github were for raspi with 40 pins, b+/2/3. Thanks!

            M 1 Reply Last reply
            0
            • ikkeTI ikkeT

              Yahooo! It works, finally. I bet my problem was Raspi1 all along. I never realized the pinouts in github were for raspi with 40 pins, b+/2/3. Thanks!

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

              @ikkeT it should also work for Raspi1, I got one running fine here.

              1 Reply Last reply
              0
              • ikkeTI Offline
                ikkeTI Offline
                ikkeT
                wrote on last edited by
                #80

                OK, then I just screwed up something. Thanks for the info, so I know I can do this also with my old raspi one day.

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

                  Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.

                  E 1 Reply Last reply
                  2
                  • ikkeTI Offline
                    ikkeTI Offline
                    ikkeT
                    wrote on last edited by
                    #82

                    Continuing the learning here, new questions... Thanks so far, I've now got the temp/hum/door messages sent and received from sensebender micro to raspi2. The next thing I would like to do is to send the messages as mqtt to the next box hosting some controller.

                    How to get the mysGateway to send the stuff forward as mqtt? I tried to look into Makefile, MyConfig.h and such, but didn't quite figure out yet how to do that. Any pointers?

                    So I'd like to have the following: sensebender -> radio -> raspi2 -> some box hosting the controller. Perhaps even outside of home, so routable traffic e.g. to OpenShift.com.

                    Should I now somehow configure and build mysGateway to send stuff as MQTT, or pipe the traffic somehow to mqtt like mosqitto? How is this normally done if the controller server is not running on the gateway Raspi?

                    Thanks for the patience, I'm just getting into all this interesting stuff :)

                    mfalkviddM H 2 Replies Last reply
                    0
                    • ikkeTI ikkeT

                      Continuing the learning here, new questions... Thanks so far, I've now got the temp/hum/door messages sent and received from sensebender micro to raspi2. The next thing I would like to do is to send the messages as mqtt to the next box hosting some controller.

                      How to get the mysGateway to send the stuff forward as mqtt? I tried to look into Makefile, MyConfig.h and such, but didn't quite figure out yet how to do that. Any pointers?

                      So I'd like to have the following: sensebender -> radio -> raspi2 -> some box hosting the controller. Perhaps even outside of home, so routable traffic e.g. to OpenShift.com.

                      Should I now somehow configure and build mysGateway to send stuff as MQTT, or pipe the traffic somehow to mqtt like mosqitto? How is this normally done if the controller server is not running on the gateway Raspi?

                      Thanks for the patience, I'm just getting into all this interesting stuff :)

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

                      @ikkeT I haven't tried but using nodered should be fairly simple and very flexible. This discussion might be useful: https://forum.mysensors.org/topic/2802/flow-to-turn-serialgateway-into-mqtt-serialgateway/

                      1 Reply Last reply
                      1
                      • ikkeTI ikkeT

                        Continuing the learning here, new questions... Thanks so far, I've now got the temp/hum/door messages sent and received from sensebender micro to raspi2. The next thing I would like to do is to send the messages as mqtt to the next box hosting some controller.

                        How to get the mysGateway to send the stuff forward as mqtt? I tried to look into Makefile, MyConfig.h and such, but didn't quite figure out yet how to do that. Any pointers?

                        So I'd like to have the following: sensebender -> radio -> raspi2 -> some box hosting the controller. Perhaps even outside of home, so routable traffic e.g. to OpenShift.com.

                        Should I now somehow configure and build mysGateway to send stuff as MQTT, or pipe the traffic somehow to mqtt like mosqitto? How is this normally done if the controller server is not running on the gateway Raspi?

                        Thanks for the patience, I'm just getting into all this interesting stuff :)

                        H Offline
                        H Offline
                        hawk_2050
                        wrote on last edited by
                        #84

                        @ikkeT you can build the Raspberry Pi mysGateway as either Serial, Ethernet or MQTT by using appropriate commandline parameters with the configure script. Just do ./configure --help and you'll get a list of all the options available. Once you've chosen your options and run configure then you 'make'. An example of a set of options that will generate an MQTT Gateway is:
                        ./configure --my-debug=enable --my-gateway=mqtt --my-rf24-channel=100 --my-rf24-pa-level=RF24_PA_LOW --my-controller-ip-address=127,0,0,1 --my-port=1883
                        --my-mqtt-client-id=MyGW2 --my-mqtt-publish-topic-prefix="MyGW2out" --my-mqtt-subscribe-topic-prefix="MyGW2in"

                        In this case my MQTT Broker is Mosquitto and is on the same Raspberry Pi hence the use of 127,0,0,1 for the specified --my-controller-ip-address. Change that as appropriate to your intended setup.

                        Hope that helps.

                        ikkeTI 1 Reply Last reply
                        2
                        • M marceloaqno

                          @ericvdb That's right. I hope to add support for RFM69, Serial and software signing very soon.

                          To use, clone the raspberryPi port for MySensors 2.0:

                          git clone https://github.com/marceloaqno/MySensors.git
                          cd MySensors
                          

                          To configure it, take a look at the options available within configure:

                          ./configure --help
                          

                          For other options, you may have to edit the sample file example_linux/mysGateway.cpp, and uncoment what you need.

                          Once done, run:

                          make
                          sudo make install
                          

                          To run the gateway you need to be root or use sudo:

                          sudo msyGateway -h
                          

                          For wiring, follow this guide:
                          https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway-mysensors-1-x

                          W Offline
                          W Offline
                          wergeld
                          wrote on last edited by
                          #85

                          @marceloaqno I have been trying to build this out by first building the RF24 library using the following:

                          git clone https://github.com/TMRh20/RF24.git
                          cd RF24
                          make
                          sudo make install
                          

                          However, this fails on the make command:

                          Makefile:17: Makefile.inc: No such file or directory
                          [Running configure]
                          [SECTION] Detecting arm compilation environment.
                            [OK] arm-linux-gnueabihf-gcc detected.
                            [OK] arm-linux-gnueabihf-g++ detected.
                          [SECTION] Detecting target machine.
                          [OK] machine detected: SoC=BCM2836, Type=RPi2, CPU=armv7l.
                          [SECTION] Detecting DRIVER
                            [OK] DRIVER detected:RPi.
                          [SECTION] Detecting OS.
                            [INFO] OS detected:LINUX.
                          [SECTION] Preparing configuration.
                          [SECTION] Saving configuration.
                          [OK] Finished.
                          arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread  -c RF24.cpp
                          cc1plus: error: bad value (cortex-a7) for -mtune switch
                          Makefile:40: recipe for target 'RF24.o' failed
                          make: *** [RF24.o] Error 1
                          

                          I am not sure what to do here. Looks like the gcc does not support the cortex-a7? I am trying to run this on my RPi 2 B.

                          M 1 Reply Last reply
                          0
                          • W wergeld

                            @marceloaqno I have been trying to build this out by first building the RF24 library using the following:

                            git clone https://github.com/TMRh20/RF24.git
                            cd RF24
                            make
                            sudo make install
                            

                            However, this fails on the make command:

                            Makefile:17: Makefile.inc: No such file or directory
                            [Running configure]
                            [SECTION] Detecting arm compilation environment.
                              [OK] arm-linux-gnueabihf-gcc detected.
                              [OK] arm-linux-gnueabihf-g++ detected.
                            [SECTION] Detecting target machine.
                            [OK] machine detected: SoC=BCM2836, Type=RPi2, CPU=armv7l.
                            [SECTION] Detecting DRIVER
                              [OK] DRIVER detected:RPi.
                            [SECTION] Detecting OS.
                              [INFO] OS detected:LINUX.
                            [SECTION] Preparing configuration.
                            [SECTION] Saving configuration.
                            [OK] Finished.
                            arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread  -c RF24.cpp
                            cc1plus: error: bad value (cortex-a7) for -mtune switch
                            Makefile:40: recipe for target 'RF24.o' failed
                            make: *** [RF24.o] Error 1
                            

                            I am not sure what to do here. Looks like the gcc does not support the cortex-a7? I am trying to run this on my RPi 2 B.

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

                            @wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
                            You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.

                            W 1 Reply Last reply
                            0
                            • M marceloaqno

                              @wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
                              You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.

                              W Offline
                              W Offline
                              wergeld
                              wrote on last edited by
                              #87

                              @marceloaqno said:

                              @wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
                              You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.

                              I have tried to update gcc but apt-get says it is already at latest version. I am upgrading to Jessie now as it has gcc 4.9 (I was running Wheezy with gcc 4.6).
                              Is there an updated build instruction set? I am planning on using this as a serial gateway with Domoticz on same RPi.

                              M 1 Reply Last reply
                              0
                              • H hawk_2050

                                @ikkeT you can build the Raspberry Pi mysGateway as either Serial, Ethernet or MQTT by using appropriate commandline parameters with the configure script. Just do ./configure --help and you'll get a list of all the options available. Once you've chosen your options and run configure then you 'make'. An example of a set of options that will generate an MQTT Gateway is:
                                ./configure --my-debug=enable --my-gateway=mqtt --my-rf24-channel=100 --my-rf24-pa-level=RF24_PA_LOW --my-controller-ip-address=127,0,0,1 --my-port=1883
                                --my-mqtt-client-id=MyGW2 --my-mqtt-publish-topic-prefix="MyGW2out" --my-mqtt-subscribe-topic-prefix="MyGW2in"

                                In this case my MQTT Broker is Mosquitto and is on the same Raspberry Pi hence the use of 127,0,0,1 for the specified --my-controller-ip-address. Change that as appropriate to your intended setup.

                                Hope that helps.

                                ikkeTI Offline
                                ikkeTI Offline
                                ikkeT
                                wrote on last edited by
                                #88

                                @hawk_2050 thanks for the reminder! I recalled it was somehow configurable, but I forgot it was through . /configure options. I'll try after getting pir working also.

                                1 Reply Last reply
                                0
                                • W wergeld

                                  @marceloaqno said:

                                  @wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
                                  You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.

                                  I have tried to update gcc but apt-get says it is already at latest version. I am upgrading to Jessie now as it has gcc 4.9 (I was running Wheezy with gcc 4.6).
                                  Is there an updated build instruction set? I am planning on using this as a serial gateway with Domoticz on same RPi.

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

                                  @wergeld I updated the building instructions:
                                  https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

                                  W 1 Reply Last reply
                                  1
                                  • M marceloaqno

                                    @wergeld I updated the building instructions:
                                    https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

                                    W Offline
                                    W Offline
                                    wergeld
                                    wrote on last edited by
                                    #90

                                    @marceloaqno said:

                                    @wergeld I updated the building instructions:
                                    https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

                                    Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.

                                    W 1 Reply Last reply
                                    0
                                    • W wergeld

                                      @marceloaqno said:

                                      @wergeld I updated the building instructions:
                                      https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

                                      Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.

                                      W Offline
                                      W Offline
                                      wergeld
                                      wrote on last edited by
                                      #91

                                      @wergeld said:

                                      @marceloaqno said:

                                      @wergeld I updated the building instructions:
                                      https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26

                                      Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.

                                      Okay, using an RPi2B upgraded to Jessie from Wheezy I have successfully built and set the mysGateway as a daemon. My configuration was:

                                      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-rf24-pa-level=RF24_PA_LOW
                                      

                                      This was immediately available in Domoticz under Hardware. I re-added the 2 nodes and away I went!

                                      Full command list:

                                      git clone https://github.com/marceloaqno/MySensors.git
                                      cd MySensors
                                      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-rf24-pa-level=RF24_PA_LOW
                                      make
                                      sudo make install
                                      sudo mysGateway -b
                                      

                                      In Domoticz it lists this gateway as running:
                                      MySensors Gateway USB
                                      Version: 2.0.1-beta

                                      So far very happy with this setup. No wires and no extra arduino needed for serial gateway. Just the NRF+RPi interfacing via:
                                      https://www.openhardware.io/view/100/Raspberry-PI-NRF24l01-hat

                                      1 Reply Last reply
                                      0
                                      • E Offline
                                        E Offline
                                        ericvdb
                                        wrote on last edited by
                                        #92

                                        @marceloaqno

                                        what am I doing wrong here?

                                        root@raspberrypi:/downloads/MySensors# ./configure --my-gateway=mqtt --my-mqtt-client-id=msgw --my-mqtt-publish-topic-prefix=mspub --my-mqtt-subscribe-topic-prefix=mssub --my-controller-ip-address=10.0.10.4 --my-port=1883
                                        [SECTION] Detecting target machine.
                                        [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000d.
                                        [OK] init system detected: systemd
                                        [SECTION] Saving configuration.
                                        [SECTION] Cleaning previous builds.
                                        [OK] Finished.
                                        root@raspberrypi:/downloads/MySensors# make
                                        cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
                                        g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
                                        In file included from ./MySensors.h:287:0,
                                                         from examples_linux/mysGateway.cpp:60:
                                        ./core/MyTransport.cpp: In function âvoid transportProcessMessage()â:
                                        ./core/MyTransport.cpp:535:61: error: no matching function for call to âmin(uint8_t, unsigned int)â
                                          const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                     ^
                                        ./core/MyTransport.cpp:535:61: note: candidates are:
                                        In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                         from /usr/include/c++/4.9/ios:40,
                                                         from /usr/include/c++/4.9/ostream:38,
                                                         from /usr/include/c++/4.9/iostream:39,
                                                         from examples_linux/mysGateway.cpp:20:
                                        /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                             min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                             ^
                                        /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
                                        In file included from ./MySensors.h:287:0,
                                                         from examples_linux/mysGateway.cpp:60:
                                        ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
                                          const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                     ^
                                        In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                         from /usr/include/c++/4.9/ios:40,
                                                         from /usr/include/c++/4.9/ostream:38,
                                                         from /usr/include/c++/4.9/iostream:39,
                                                         from examples_linux/mysGateway.cpp:20:
                                        /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
                                             min(const _Tp& __a, const _Tp& __b)
                                             ^
                                        /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
                                        In file included from ./MySensors.h:287:0,
                                                         from examples_linux/mysGateway.cpp:60:
                                        ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
                                          const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                     ^
                                        ./core/MyTransport.cpp: In function âbool transportSendWrite(uint8_t, MyMessage&)â:
                                        ./core/MyTransport.cpp:826:82: error: no matching function for call to âmin(unsigned int, const uint8_t&)â
                                          bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                          ^
                                        ./core/MyTransport.cpp:826:82: note: candidates are:
                                        In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                         from /usr/include/c++/4.9/ios:40,
                                                         from /usr/include/c++/4.9/ostream:38,
                                                         from /usr/include/c++/4.9/iostream:39,
                                                         from examples_linux/mysGateway.cpp:20:
                                        /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                             min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                             ^
                                        /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
                                        In file included from ./MySensors.h:287:0,
                                                         from examples_linux/mysGateway.cpp:60:
                                        ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
                                          bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                          ^
                                        In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                         from /usr/include/c++/4.9/ios:40,
                                                         from /usr/include/c++/4.9/ostream:38,
                                                         from /usr/include/c++/4.9/iostream:39,
                                                         from examples_linux/mysGateway.cpp:20:
                                        /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
                                             min(const _Tp& __a, const _Tp& __b)
                                             ^
                                        /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
                                        In file included from ./MySensors.h:287:0,
                                                         from examples_linux/mysGateway.cpp:60:
                                        ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
                                          bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                          ^
                                        Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
                                        make: *** [examples_linux/mysGateway.o] Error 1
                                        root@raspberrypi:/downloads/MySensors#
                                        
                                        M 1 Reply Last reply
                                        0
                                        • E ericvdb

                                          @marceloaqno

                                          what am I doing wrong here?

                                          root@raspberrypi:/downloads/MySensors# ./configure --my-gateway=mqtt --my-mqtt-client-id=msgw --my-mqtt-publish-topic-prefix=mspub --my-mqtt-subscribe-topic-prefix=mssub --my-controller-ip-address=10.0.10.4 --my-port=1883
                                          [SECTION] Detecting target machine.
                                          [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000d.
                                          [OK] init system detected: systemd
                                          [SECTION] Saving configuration.
                                          [SECTION] Cleaning previous builds.
                                          [OK] Finished.
                                          root@raspberrypi:/downloads/MySensors# make
                                          cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
                                          g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\"  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
                                          In file included from ./MySensors.h:287:0,
                                                           from examples_linux/mysGateway.cpp:60:
                                          ./core/MyTransport.cpp: In function âvoid transportProcessMessage()â:
                                          ./core/MyTransport.cpp:535:61: error: no matching function for call to âmin(uint8_t, unsigned int)â
                                            const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                       ^
                                          ./core/MyTransport.cpp:535:61: note: candidates are:
                                          In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/4.9/ios:40,
                                                           from /usr/include/c++/4.9/ostream:38,
                                                           from /usr/include/c++/4.9/iostream:39,
                                                           from examples_linux/mysGateway.cpp:20:
                                          /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^
                                          /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:287:0,
                                                           from examples_linux/mysGateway.cpp:60:
                                          ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
                                            const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                       ^
                                          In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/4.9/ios:40,
                                                           from /usr/include/c++/4.9/ostream:38,
                                                           from /usr/include/c++/4.9/iostream:39,
                                                           from examples_linux/mysGateway.cpp:20:
                                          /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^
                                          /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:287:0,
                                                           from examples_linux/mysGateway.cpp:60:
                                          ./core/MyTransport.cpp:535:61: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ)
                                            const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD);
                                                                                                       ^
                                          ./core/MyTransport.cpp: In function âbool transportSendWrite(uint8_t, MyMessage&)â:
                                          ./core/MyTransport.cpp:826:82: error: no matching function for call to âmin(unsigned int, const uint8_t&)â
                                            bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                            ^
                                          ./core/MyTransport.cpp:826:82: note: candidates are:
                                          In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/4.9/ios:40,
                                                           from /usr/include/c++/4.9/ostream:38,
                                                           from /usr/include/c++/4.9/iostream:39,
                                                           from examples_linux/mysGateway.cpp:20:
                                          /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^
                                          /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:287:0,
                                                           from examples_linux/mysGateway.cpp:60:
                                          ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
                                            bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                            ^
                                          In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/4.9/ios:40,
                                                           from /usr/include/c++/4.9/ostream:38,
                                                           from /usr/include/c++/4.9/iostream:39,
                                                           from examples_linux/mysGateway.cpp:20:
                                          /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^
                                          /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:287:0,
                                                           from examples_linux/mysGateway.cpp:60:
                                          ./core/MyTransport.cpp:826:82: note:   deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â)
                                            bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength));
                                                                                                                            ^
                                          Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed
                                          make: *** [examples_linux/mysGateway.o] Error 1
                                          root@raspberrypi:/downloads/MySensors#
                                          
                                          M Offline
                                          M Offline
                                          marceloaqno
                                          Code Contributor
                                          wrote on last edited by
                                          #93

                                          @ericvdb update your files from mysensors repository, this was fixed in #594

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


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular