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 54.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

    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
                    • M marceloaqno

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

                      E Offline
                      E Offline
                      ericvdb
                      wrote on last edited by
                      #94

                      @marceloaqno said:

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

                      // Flash leds on rx/tx/err
                      //#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
                      //#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
                      //#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pin

                      What do I put there? RPi pin numbers or GPIO numbers?

                      M 1 Reply Last reply
                      0
                      • E ericvdb

                        @marceloaqno said:

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

                        // Flash leds on rx/tx/err
                        //#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
                        //#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
                        //#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pin

                        What do I put there? RPi pin numbers or GPIO numbers?

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

                        @ericvdb In any type of pin configuration for the RPi, always use the physical pin number.

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

                          The RPi port was merged into mysensors official repository :tada: (thank you to everyone who helped with this process :clap: ). For future discussion, please use this this topic.

                          1 Reply Last reply
                          1

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          18

                          Online

                          12.0k

                          Users

                          11.2k

                          Topics

                          113.4k

                          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