Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. 💬 Building a Raspberry Pi Gateway

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 1.0m Views 131 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Oliva
    wrote on last edited by
    #954

    I have designed a 3D printable enclosure for this and the design/STL files are available here: https://www.thingiverse.com/thing:3072244

    1 Reply Last reply
    1
    • H Offline
      H Offline
      hek
      Admin
      wrote on last edited by
      #955

      @John-Oliva, nice! Added it to the MySensors collection:
      https://www.thingiverse.com/mysensors/collections/mysensors

      1 Reply Last reply
      1
      • ? A Former User

        Hello, it seems I found the problem: Complete newbie thing: :beginner:
        sudo ./bin/mysgw -h worked, but /usr/local/bin/mysgw didn't
        I just gave the right to the folder, and now it's working.
        Thanks for taking time to help beginners !

        cadetC Offline
        cadetC Offline
        cadet
        wrote on last edited by
        #956

        @korleone HI
        I have same error
        Can you write that rigth do you ser to folder ?
        Andrey

        cadetC 1 Reply Last reply
        0
        • cadetC cadet

          @korleone HI
          I have same error
          Can you write that rigth do you ser to folder ?
          Andrey

          cadetC Offline
          cadetC Offline
          cadet
          wrote on last edited by
          #957

          @cadet I just remove /usr/local/bin/mysgw and compile again
          And I have one question - why is it happened?
          MysGW work fine about 3 months.

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #958

            what problem did you have?

            cadetC 1 Reply Last reply
            0
            • gohanG gohan

              what problem did you have?

              cadetC Offline
              cadetC Offline
              cadet
              wrote on last edited by
              #959

              @gohan mysgw: ERROR accept: Bad file descriptor - today morning

              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #960

                I get that when another instance of the process is already running

                cadetC 1 Reply Last reply
                0
                • gohanG gohan

                  I get that when another instance of the process is already running

                  cadetC Offline
                  cadetC Offline
                  cadet
                  wrote on last edited by
                  #961

                  @gohan I was try to find it with ps -ef, but nothing found. Reload RPI.
                  @korleone was write about this
                  "Hello, it seems I found the problem: Complete newbie thing: 🔰
                  sudo ./bin/mysgw -h worked, but /usr/local/bin/mysgw didn't
                  I just gave the right to the folder, and now it's working."

                  But what right hi gave ?

                  1 Reply Last reply
                  0
                  • gohanG Offline
                    gohanG Offline
                    gohan
                    Mod
                    wrote on last edited by
                    #962

                    sudo ./bin/mysgw -h could work, it only depends in which folder you are running the command from

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mvader
                      wrote on last edited by
                      #963

                      FYI looks like on the 2.3.1 beta the transport has been changed to rf24 instead of nrf24

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        magjef29
                        wrote on last edited by
                        #964

                        Is the rasberry pi serving as a gateway and a server in this project? Or do you have to have a separate pi to host something like openhab and another pi for your gateway?

                        mfalkviddM 1 Reply Last reply
                        0
                        • M magjef29

                          Is the rasberry pi serving as a gateway and a server in this project? Or do you have to have a separate pi to host something like openhab and another pi for your gateway?

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

                          Hi @magjef29, welcome to the MySensors forum!

                          You can run your controller(s) on the same Raspberry Pi.

                          Depending on what tou mean by ”server”, the gateway can be a server, but the gateway is not a controller.

                          If you haven’t already, see the getting started guide for information about the different parts.

                          1 Reply Last reply
                          0
                          • А Offline
                            А Offline
                            Артем ТИхонович
                            wrote on last edited by
                            #966

                            Hi! Does anybody test Cubieboard as Gateway? I have a cubieboard runing archlinux with spi enabled in kernel. How i define pins for nrf24 gateway connection? Or i need to make big changes in code to star work with different bord than Rpi?
                            Best regards

                            1 Reply Last reply
                            0
                            • А Offline
                              А Offline
                              Артем ТИхонович
                              wrote on last edited by
                              #967

                              This is my old dream to connect directly nrf to Cubieboard GPIOs. Few years ago i try to do this without success using this lib - https://github.com/bearpawmaxim/librf24-sunxi

                              mfalkviddM 1 Reply Last reply
                              0
                              • А Артем ТИхонович

                                This is my old dream to connect directly nrf to Cubieboard GPIOs. Few years ago i try to do this without success using this lib - https://github.com/bearpawmaxim/librf24-sunxi

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

                                Hi @артем-тихонович, welcome to the MySensors forum!

                                For the NRF24, the same defines as for normal sketches are used. Documentation: https://www.mysensors.org/apidocs/group__RF24SettingGrpPub.html
                                The defines can be added to the Raspberry Pi gateway by following the instructions on https://www.mysensors.org/build/raspberry#advanced

                                I have not heard about anyone using the Cubieboard but hopefully someone else has. The information provided on https://www.mysensors.org/build/orange might be useful if the Cubieboard is similar to the Orange Pie.

                                oh, and in case you haven't already, see the ./configure --help text about the most common NRF24 defines; you might not need the advanced build options.

                                1 Reply Last reply
                                1
                                • А Offline
                                  А Offline
                                  Артем ТИхонович
                                  wrote on last edited by
                                  #969

                                  Thank you, @mfalkvidd. Ihave a little troubles with correct defining gpios from Cubie. In fex file the gpios defines is:
                                  [gpio_para]
                                  gpio_used = 1
                                  gpio_num = 2
                                  gpio_pin_1 = port:PH07<0><default><default><default>
                                  gpio_pin_2 = port:PH15<6><default><default><default>
                                  in sys/gpio:
                                  [root@Archey boot]# ls -ls /sys/class/gpio/
                                  total 0
                                  0 --w------- 1 root root 4096 Nov 21 11:58 export
                                  0 lrwxrwxrwx 1 root root 0 Nov 18 17:01 gpio1_ph7 -> ../../devices/platform/gpio-sunxi/gpio/gpio1_ph7
                                  0 lrwxrwxrwx 1 root root 0 Nov 21 11:54 gpio2_ph15 -> ../../devices/platform/gpio-sunxi/gpio/gpio2_ph15
                                  0 lrwxrwxrwx 1 root root 0 Nov 18 10:45 gpiochip1 -> ../../devices/platform/gpio-sunxi/gpio/gpiochip1
                                  0 --w------- 1 root root 4096 Nov 18 16:52 unexport

                                  When i define in configure: --my-rf24-ce-pin=1 --my-rf24-cs-pin=2 build is ok, but test failed with error:
                                  Nov 21 11:58:15 ERROR Could not open /sys/class/gpio/gpio1/direction[root@Archey MySensors]#
                                  when i define --my-transport=nrf24 --my-rf24-ce-pin=gpio1_ph7 the build failed wirh error:
                                  ./drivers/RF24/RF24.cpp: In function 'void RF24_ce(bool)':
                                  <command-line>:0:16: error: 'gpio1_ph7' was not declared in this scope
                                  ./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
                                  hwDigitalWrite(MY_RF24_CE_PIN, level);

                                  How can i resolve this problem? Please help.

                                  1 Reply Last reply
                                  0
                                  • А Offline
                                    А Offline
                                    Артем ТИхонович
                                    wrote on last edited by
                                    #970

                                    I just see for another app using nrf24 on cubieboard
                                    and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
                                    GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro.

                                    mfalkviddM 1 Reply Last reply
                                    1
                                    • alowhumA Offline
                                      alowhumA Offline
                                      alowhum
                                      Plugin Developer
                                      wrote on last edited by
                                      #971

                                      I hereby donate these images:

                                      4_1542918057729_step1.png 3_1542918057729_step2.png 2_1542918057728_step3.png 1_1542918057727_step4.png 0_1542918057727_step5.png

                                      1 Reply Last reply
                                      0
                                      • А Артем ТИхонович

                                        I just see for another app using nrf24 on cubieboard
                                        and funcrtion to use nrf24 have GPIO defining is RF24 radio(SUNXI_GPB(10), SUNXI_GPB(11), "/dev/spidev0.0");
                                        GPIO set using this style: SUNXI_GPB(10), this type of gpio defined in #include "gpio_sun4i.h" file. Maybe this specific defining in ARCHLINUX ARM distro.

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

                                        In case someone can help @артем-тихонович, please post the answer in https://forum.mysensors.org/post/95304 so we don’t unnecessarily discuss the same thing in separate threads.

                                        1 Reply Last reply
                                        0
                                        • MasMatM Offline
                                          MasMatM Offline
                                          MasMat
                                          wrote on last edited by MasMat
                                          #973

                                          I get weird errors when "make"ing. Branch master.
                                          My command:
                                          sudo ./configure --my-transport=rf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-security-password=ZZZZZZZZZZ --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=XXXX --my-mqtt-password=YYYYY --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-config-file=/etc/mysensors.conf

                                          M -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftGetNonce(MyMessage&)’:
                                          ./core/MySigningAtsha204Soft.cpp:173:55: error: no matching function for call to ‘min(unsigned int, int)’
                                            msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
                                                                                                 ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
                                               min(initializer_list<_Tp> __l, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:173:55: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                            msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
                                                                                                 ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
                                               min(initializer_list<_Tp> __l)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:173:55: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                            msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
                                                                                                 ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:173:55: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                            msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
                                                                                                 ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:173:55: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                            msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
                                                                                                 ^
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘void signerAtsha204SoftPutNonce(MyMessage&)’:
                                          ./core/MySigningAtsha204Soft.cpp:190:89: error: no matching function for call to ‘min(unsigned int, int)’
                                            (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
                                                                                                                                   ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
                                               min(initializer_list<_Tp> __l, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:190:89: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                            (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
                                                                                                                                   ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
                                               min(initializer_list<_Tp> __l)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:190:89: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                            (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
                                                                                                                                   ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:190:89: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                            (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
                                                                                                                                   ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:190:89: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                            (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
                                                                                                                                   ^
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftSignMsg(MyMessage&)’:
                                          ./core/MySigningAtsha204Soft.cpp:229:50: error: no matching function for call to ‘min(unsigned int, int)’
                                                         MIN(MAX_PAYLOAD-mGetLength(msg), 32));
                                                                                            ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
                                               min(initializer_list<_Tp> __l, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:229:50: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                                         MIN(MAX_PAYLOAD-mGetLength(msg), 32));
                                                                                            ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
                                               min(initializer_list<_Tp> __l)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:229:50: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                                         MIN(MAX_PAYLOAD-mGetLength(msg), 32));
                                                                                            ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:229:50: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                                         MIN(MAX_PAYLOAD-mGetLength(msg), 32));
                                                                                            ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:229:50: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                                         MIN(MAX_PAYLOAD-mGetLength(msg), 32));
                                                                                            ^
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’:
                                          ./core/MySigningAtsha204Soft.cpp:283:55: error: no matching function for call to ‘min(unsigned int, int)’
                                                              MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
                                                                                                 ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
                                               min(initializer_list<_Tp> __l, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:283:55: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                                              MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
                                                                                                 ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
                                               min(initializer_list<_Tp> __l)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:283:55: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
                                                              MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
                                                                                                 ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:283:55: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                                              MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
                                                                                                 ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:283:55: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
                                                              MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
                                                                                                 ^
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘void signerCalculateSignature(MyMessage&, bool)’:
                                          ./core/MySigningAtsha204Soft.cpp:307:48: error: no matching function for call to ‘min(uint8_t&, int)’
                                             uint8_t bytes_to_include = MIN(bytes_left, 32);
                                                                                          ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
                                               min(initializer_list<_Tp> __l, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3453:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:307:48: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’
                                             uint8_t bytes_to_include = MIN(bytes_left, 32);
                                                                                          ^
                                          In file included from /usr/include/c++/6/algorithm:62:0,
                                                           from ./drivers/Linux/Arduino.h:32,
                                                           from ./MySensors.h:39,
                                                           from examples_linux/mysgw.cpp:82:
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
                                               min(initializer_list<_Tp> __l)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algo.h:3447:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:307:48: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’
                                             uint8_t bytes_to_include = MIN(bytes_left, 32);
                                                                                          ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
                                               min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:307:48: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’)
                                             uint8_t bytes_to_include = MIN(bytes_left, 32);
                                                                                          ^
                                          In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                                                           from /usr/include/c++/6/ios:40,
                                                           from /usr/include/c++/6/ostream:38,
                                                           from /usr/include/c++/6/iostream:39,
                                                           from examples_linux/mysgw.cpp:20:
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
                                               min(const _Tp& __a, const _Tp& __b)
                                               ^~~
                                          /usr/include/c++/6/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
                                          In file included from ./MySensors.h:148:0,
                                                           from examples_linux/mysgw.cpp:82:
                                          ./core/MySigningAtsha204Soft.cpp:307:48: note:   deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’)
                                             uint8_t bytes_to_include = MIN(bytes_left, 32);
                                                                                          ^
                                          ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’:
                                          ./core/MySigningAtsha204Soft.cpp:289:1: warning: control reaches end of non-void function [-Wreturn-type]
                                           }
                                           ^
                                          Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
                                          make: *** [build/examples_linux/mysgw.o] Error 1
                                          

                                          Can someone better versed help?
                                          EDIT: tested branch development, no problems.

                                          1 Reply Last reply
                                          0

                                          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


                                          15

                                          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