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. General Discussion
  3. Raspberry Pi3 Gateway

Raspberry Pi3 Gateway

Scheduled Pinned Locked Moved General Discussion
16 Posts 3 Posters 3.3k Views 3 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.
  • rajeev2301R Offline
    rajeev2301R Offline
    rajeev2301
    wrote on last edited by
    #1

    When I am running command to setup PiGatewaySerial , I get the below error. ![alt text](![image url](image url))

    Raspberry $ make all && sudo make install

    g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
    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 ./MyMessage.h:37,
    from ./MySensor.h:18,
    from ./MyGateway.h:16,
    from PiGatewaySerial.cpp:36:
    /usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
    min(const _Tp& __a, const _Tp& __b, _Compare __comp)
    ^
    /usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
    max(const _Tp& __a, const _Tp& __b, _Compare __comp)
    ^
    In file included from ./MySensor.h:18:0,
    from ./MyGateway.h:16,
    from PiGatewaySerial.cpp:36:
    /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’
    min(const _Tp& __a, const _Tp& __b)
    ^
    /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
    /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’
    /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’
    max(const _Tp& __a, const _Tp& __b)
    ^
    /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
    /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’
    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 ./MyMessage.h:37,
    from ./MySensor.h:18,
    from ./MyGateway.h:16,
    from PiGatewaySerial.cpp:36:
    /usr/include/c++/6/bits/stl_algobase.h:243:5: error: ‘std::min’ declared as an ‘inline’ variable
    min(const _Tp& __a, const _Tp& __b, _Compare __comp)
    ^~~
    /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’
    if (__comp(__b, __a))
    ^~
    /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’
    /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’
    /usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’
    return __a;
    ^~~~~~
    /usr/include/c++/6/bits/stl_algobase.h:265:5: error: ‘max’ declared as an ‘inline’ variable
    max(const _Tp& __a, const _Tp& __b, _Compare __comp)
    ^~~
    /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’
    if (__comp(__a, __b))
    ^~
    /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’
    /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’
    /usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’
    return __a;
    ^~~~~~
    /usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token
    }
    ^
    Makefile:61: recipe for target 'PiGatewaySerial.o' failed
    make: *** [PiGatewaySerial.o] Error 1

    mfalkviddM 1 Reply Last reply
    0
    • rajeev2301R rajeev2301

      When I am running command to setup PiGatewaySerial , I get the below error. ![alt text](![image url](image url))

      Raspberry $ make all && sudo make install

      g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
      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 ./MyMessage.h:37,
      from ./MySensor.h:18,
      from ./MyGateway.h:16,
      from PiGatewaySerial.cpp:36:
      /usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
      min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      /usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      In file included from ./MySensor.h:18:0,
      from ./MyGateway.h:16,
      from PiGatewaySerial.cpp:36:
      /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’
      min(const _Tp& __a, const _Tp& __b)
      ^
      /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
      /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’
      /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’
      max(const _Tp& __a, const _Tp& __b)
      ^
      /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
      /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’
      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 ./MyMessage.h:37,
      from ./MySensor.h:18,
      from ./MyGateway.h:16,
      from PiGatewaySerial.cpp:36:
      /usr/include/c++/6/bits/stl_algobase.h:243:5: error: ‘std::min’ declared as an ‘inline’ variable
      min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^~~
      /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’
      if (__comp(__b, __a))
      ^~
      /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’
      /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’
      /usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’
      return __a;
      ^~~~~~
      /usr/include/c++/6/bits/stl_algobase.h:265:5: error: ‘max’ declared as an ‘inline’ variable
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^~~
      /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’
      if (__comp(__a, __b))
      ^~
      /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’
      /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’
      /usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’
      return __a;
      ^~~~~~
      /usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token
      }
      ^
      Makefile:61: recipe for target 'PiGatewaySerial.o' failed
      make: *** [PiGatewaySerial.o] Error 1

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

      @rajeev2301 could you post the configure command you used and what linux distribution you are running on the pi? Which version of MySensors are you using?

      rajeev2301R 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @rajeev2301 could you post the configure command you used and what linux distribution you are running on the pi? Which version of MySensors are you using?

        rajeev2301R Offline
        rajeev2301R Offline
        rajeev2301
        wrote on last edited by
        #3

        @mfalkvidd

        I. am using Raspbian which was achieved through NOOBs

        gohanG 1 Reply Last reply
        0
        • rajeev2301R rajeev2301

          @mfalkvidd

          I. am using Raspbian which was achieved through NOOBs

          gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          @rajeev2301 please also include the configure settings you used and what mysensors version you are using

          rajeev2301R 1 Reply Last reply
          0
          • gohanG gohan

            @rajeev2301 please also include the configure settings you used and what mysensors version you are using

            rajeev2301R Offline
            rajeev2301R Offline
            rajeev2301
            wrote on last edited by
            #5

            [0_1516950236523_config.txt](Uploading 100%) @gohan
            Please find the attached config settings.
            Sensor version : git clone https://github.com/TMR20/RF24.git

            <<problem comes here, when I tried installing PiRaspberrySerial========================>>

            pi@raspberrypi:~ $ git clone https://github.com/mysensors/Raspberry.git
            Cloning into 'Raspberry'...
            remote: Counting objects: 292, done.
            remote: Total 292 (delta 0), reused 0 (delta 0), pack-reused 292
            Receiving objects: 100% (292/292), 220.51 KiB | 0 bytes/s, done.
            Resolving deltas: 100% (126/126), done.
            pi@raspberrypi:~ $ cd Raspberry
            pi@raspberrypi:~/Raspberry $ make all && make install
            g++ -c -o MyGateway.o MyGateway.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            MyGateway.cpp: In member function ‘void MyGateway::setInclusionMode(boolean)’:
            MyGateway.cpp:234:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
            if (newMode != inclusionMode)
            ^~
            MyGateway.cpp:237:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
            serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0);
            ^~~~~~
            g++ -c -o MySensor.o MySensor.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            g++ -c -o MyMessage.o MyMessage.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            g++ -c -o PiEEPROM.o PiEEPROM.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            g++ -c -o PiGateway.o PiGateway.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            g++ -o PiGateway MyGateway.o MySensor.o MyMessage.o PiEEPROM.o PiGateway.o -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24 -lrf24-bcm
            g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
            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 ./MyMessage.h:37,
            from ./MySensor.h:18,
            from ./MyGateway.h:16,
            from PiGatewaySerial.cpp:36:
            /usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
            min(const _Tp& __a, const _Tp& __b, _Compare __comp)
            ^
            /usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
            max(const _Tp& __a, const _Tp& __b, _Compare __comp)
            ^
            In file included from ./MySensor.h:18:0,
            from ./MyGateway.h:16,
            from PiGatewaySerial.cpp:36:
            /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’
            min(const _Tp& __a, const _Tp& __b)
            ^
            /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
            /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’
            /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’
            max(const _Tp& __a, const _Tp& __b)
            ^
            /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
            /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’
            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 ./MyMessage.h:37,
            from ./MySensor.h:18,
            from ./MyGateway.h:16,
            from PiGatewaySerial.cpp:36:
            /usr/include/c++/6/bits/stl_algobase.h:243:5: error: ‘std::min’ declared as an ‘inline’ variable
            min(const _Tp& __a, const _Tp& __b, _Compare __comp)
            ^~~
            /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’
            if (__comp(__b, __a))
            ^~
            /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’
            /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’
            /usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’
            return __a;
            ^~~~~~
            /usr/include/c++/6/bits/stl_algobase.h:265:5: error: ‘max’ declared as an ‘inline’ variable
            max(const _Tp& __a, const _Tp& __b, _Compare __comp)
            ^~~
            /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’
            if (__comp(__a, __b))
            ^~
            /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’
            /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’
            /usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’
            return __a;
            ^~~~~~
            /usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token
            }
            ^
            Makefile:61: recipe for target 'PiGatewaySerial.o' failed
            make: *** [PiGatewaySerial.o] Error 1

            mfalkviddM 1 Reply Last reply
            0
            • rajeev2301R rajeev2301

              [0_1516950236523_config.txt](Uploading 100%) @gohan
              Please find the attached config settings.
              Sensor version : git clone https://github.com/TMR20/RF24.git

              <<problem comes here, when I tried installing PiRaspberrySerial========================>>

              pi@raspberrypi:~ $ git clone https://github.com/mysensors/Raspberry.git
              Cloning into 'Raspberry'...
              remote: Counting objects: 292, done.
              remote: Total 292 (delta 0), reused 0 (delta 0), pack-reused 292
              Receiving objects: 100% (292/292), 220.51 KiB | 0 bytes/s, done.
              Resolving deltas: 100% (126/126), done.
              pi@raspberrypi:~ $ cd Raspberry
              pi@raspberrypi:~/Raspberry $ make all && make install
              g++ -c -o MyGateway.o MyGateway.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              MyGateway.cpp: In member function ‘void MyGateway::setInclusionMode(boolean)’:
              MyGateway.cpp:234:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
              if (newMode != inclusionMode)
              ^~
              MyGateway.cpp:237:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
              serial(PSTR("0;0;%d;0;%d;%d\n"), C_INTERNAL, I_INCLUSION_MODE, inclusionMode?1:0);
              ^~~~~~
              g++ -c -o MySensor.o MySensor.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              g++ -c -o MyMessage.o MyMessage.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              g++ -c -o PiEEPROM.o PiEEPROM.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              g++ -c -o PiGateway.o PiGateway.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              g++ -o PiGateway MyGateway.o MySensor.o MyMessage.o PiEEPROM.o PiGateway.o -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24 -lrf24-bcm
              g++ -c -o PiGatewaySerial.o PiGatewaySerial.cpp -Wall -Ofast -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -D_TTY_NAME="/dev/ttyMySensorsGateway" -D_TTY_GROUPNAME="tty" -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -I. -I/usr/local/include/RF24
              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 ./MyMessage.h:37,
              from ./MySensor.h:18,
              from ./MyGateway.h:16,
              from PiGatewaySerial.cpp:36:
              /usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
              min(const _Tp& __a, const _Tp& __b, _Compare __comp)
              ^
              /usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
              max(const _Tp& __a, const _Tp& __b, _Compare __comp)
              ^
              In file included from ./MySensor.h:18:0,
              from ./MyGateway.h:16,
              from PiGatewaySerial.cpp:36:
              /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’
              min(const _Tp& __a, const _Tp& __b)
              ^
              /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
              /usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’
              /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’
              max(const _Tp& __a, const _Tp& __b)
              ^
              /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
              /usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’
              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 ./MyMessage.h:37,
              from ./MySensor.h:18,
              from ./MyGateway.h:16,
              from PiGatewaySerial.cpp:36:
              /usr/include/c++/6/bits/stl_algobase.h:243:5: error: ‘std::min’ declared as an ‘inline’ variable
              min(const _Tp& __a, const _Tp& __b, _Compare __comp)
              ^~~
              /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’
              if (__comp(__b, __a))
              ^~
              /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’
              /usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’
              /usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’
              return __a;
              ^~~~~~
              /usr/include/c++/6/bits/stl_algobase.h:265:5: error: ‘max’ declared as an ‘inline’ variable
              max(const _Tp& __a, const _Tp& __b, _Compare __comp)
              ^~~
              /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’
              if (__comp(__a, __b))
              ^~
              /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’
              /usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’
              /usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’
              return __a;
              ^~~~~~
              /usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token
              }
              ^
              Makefile:61: recipe for target 'PiGatewaySerial.o' failed
              make: *** [PiGatewaySerial.o] Error 1

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

              @rajeev2301 the raspberry pi code you are trying to use isn't functional anymore. Use the instructions at https://www.mysensors.org/build/raspberry instead.

              Do you remember where you found the instructions you are following? We should try to get them removed if we can, so they don't fool someone else.

              rajeev2301R 1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                @rajeev2301 the raspberry pi code you are trying to use isn't functional anymore. Use the instructions at https://www.mysensors.org/build/raspberry instead.

                Do you remember where you found the instructions you are following? We should try to get them removed if we can, so they don't fool someone else.

                rajeev2301R Offline
                rajeev2301R Offline
                rajeev2301
                wrote on last edited by
                #7

                @mfalkvidd Thanks a lot ! I followed the exact process at https://www.mysensors.org/build/raspberry.It looks like I have the required environment setup correctly. But when I run the below code , I still don't receive the correct message comming from Arduino ( I am using NRFL01 transceivers) .. Please suggest what am I missing..

                mport RPi.GPIO as GPIO
                from lib_nrf24 import NRF24
                import time
                import spidev

                GPIO.setmode(GPIO.BCM)

                pipes = [[0xE8, 0xE8, 0xF0, 0xF0, 0xE1], [0xF0, 0xF0, 0xF0, 0xF0, 0xE1]]
                radio = NRF24(GPIO, spidev.SpiDev())

                radio.begin(0,8)

                radio.setPayloadSize(32)
                radio.setChannel(0x76)
                radio.setDataRate(NRF24.BR_1MBPS)
                radio.setPALevel (NRF24.PA_MAX)
                radio.setAutoAck(True)
                radio.enableDynamicPayloads()
                radio.enableAckPayload()
                radio.openReadingPipe(1 ,pipes[1])
                radio.printDetails()
                radio.startListening()
                radio.GPIO.cleanup()

                while True:

                while not radio.available(0):
                   time.sleep(1/100)
                   
                Temp = []
                radio.read(Temp, radio.getDynamicPayloadSize())
                print("Received Temp: {}".format(Temp))
                print("Translating our received Message into Unicode character...")
                
                string1 = ""
                for n in Temp:
                          if (n >=32 and n <= 126):
                             string1 += chr(n)
                print (" Our received message decodes to : {} ".format(string1))
                

                ===============output =========
                STATUS = 0x01 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=1
                RX_ADDR_P0-1 � =
                0x001effffff 0xffffffffff
                RX_ADDR_P2-5 � =
                0xff
                0xfe
                0xfe
                0xfe

                TX_ADDR =
                0xffffffffff
                RX_PW_P0-6 � =
                0x00
                0x00
                0x00
                0x00
                0x00
                0x00

                EN_AA =
                0x03

                EN_RXADDR � =
                0x00

                RF_CH =
                0x07

                RF_SETUP � =
                0x00

                CONFIG =
                0x00

                DYNPD/FEATURE � =
                0x00
                0x00

                Data Rate = 1MBPS
                Model = nRF24L01
                CRC Length = Disabled
                PA Power = PA_MIN
                Received: [4]
                Translating the receivedMessage into unicode characters
                Out received message decodes to:
                Received: [5]
                Translating the receivedMessage into unicode characters
                Out received message decodes to:
                Received: []
                Translating the receivedMessage into unicode characters
                Out received message decodes to:
                Received: []
                Translating the receivedMessage into unicode characters
                Out received message decodes to:
                Received: []
                Translating the receivedMessage into unicode characters
                Out received message decodes to:
                Received: []

                mfalkviddM 1 Reply Last reply
                0
                • rajeev2301R rajeev2301

                  @mfalkvidd Thanks a lot ! I followed the exact process at https://www.mysensors.org/build/raspberry.It looks like I have the required environment setup correctly. But when I run the below code , I still don't receive the correct message comming from Arduino ( I am using NRFL01 transceivers) .. Please suggest what am I missing..

                  mport RPi.GPIO as GPIO
                  from lib_nrf24 import NRF24
                  import time
                  import spidev

                  GPIO.setmode(GPIO.BCM)

                  pipes = [[0xE8, 0xE8, 0xF0, 0xF0, 0xE1], [0xF0, 0xF0, 0xF0, 0xF0, 0xE1]]
                  radio = NRF24(GPIO, spidev.SpiDev())

                  radio.begin(0,8)

                  radio.setPayloadSize(32)
                  radio.setChannel(0x76)
                  radio.setDataRate(NRF24.BR_1MBPS)
                  radio.setPALevel (NRF24.PA_MAX)
                  radio.setAutoAck(True)
                  radio.enableDynamicPayloads()
                  radio.enableAckPayload()
                  radio.openReadingPipe(1 ,pipes[1])
                  radio.printDetails()
                  radio.startListening()
                  radio.GPIO.cleanup()

                  while True:

                  while not radio.available(0):
                     time.sleep(1/100)
                     
                  Temp = []
                  radio.read(Temp, radio.getDynamicPayloadSize())
                  print("Received Temp: {}".format(Temp))
                  print("Translating our received Message into Unicode character...")
                  
                  string1 = ""
                  for n in Temp:
                            if (n >=32 and n <= 126):
                               string1 += chr(n)
                  print (" Our received message decodes to : {} ".format(string1))
                  

                  ===============output =========
                  STATUS = 0x01 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=1
                  RX_ADDR_P0-1 � =
                  0x001effffff 0xffffffffff
                  RX_ADDR_P2-5 � =
                  0xff
                  0xfe
                  0xfe
                  0xfe

                  TX_ADDR =
                  0xffffffffff
                  RX_PW_P0-6 � =
                  0x00
                  0x00
                  0x00
                  0x00
                  0x00
                  0x00

                  EN_AA =
                  0x03

                  EN_RXADDR � =
                  0x00

                  RF_CH =
                  0x07

                  RF_SETUP � =
                  0x00

                  CONFIG =
                  0x00

                  DYNPD/FEATURE � =
                  0x00
                  0x00

                  Data Rate = 1MBPS
                  Model = nRF24L01
                  CRC Length = Disabled
                  PA Power = PA_MIN
                  Received: [4]
                  Translating the receivedMessage into unicode characters
                  Out received message decodes to:
                  Received: [5]
                  Translating the receivedMessage into unicode characters
                  Out received message decodes to:
                  Received: []
                  Translating the receivedMessage into unicode characters
                  Out received message decodes to:
                  Received: []
                  Translating the receivedMessage into unicode characters
                  Out received message decodes to:
                  Received: []
                  Translating the receivedMessage into unicode characters
                  Out received message decodes to:
                  Received: []

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

                  @rajeev2301 that looks like python code. To my knowledge, MySensors does not have any pyhon code. I'm completely lost. Sorry.

                  rajeev2301R 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @rajeev2301 that looks like python code. To my knowledge, MySensors does not have any pyhon code. I'm completely lost. Sorry.

                    rajeev2301R Offline
                    rajeev2301R Offline
                    rajeev2301
                    wrote on last edited by
                    #9

                    @mfalkvidd

                    1. What is your recommendation for doing general programming on raspeberry Pi?
                    2. if not python , what code/programming language do you recommend to setup a serial gateway on raspberry pi so that I can receive messages from multiple arduino,s.
                    mfalkviddM 1 Reply Last reply
                    0
                    • rajeev2301R rajeev2301

                      @mfalkvidd

                      1. What is your recommendation for doing general programming on raspeberry Pi?
                      2. if not python , what code/programming language do you recommend to setup a serial gateway on raspberry pi so that I can receive messages from multiple arduino,s.
                      mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #10

                      @rajeev2301 I would suggest no programming at all. Just create a raspberry pi gateway and connect a controller to it.

                      If you want to program yourself, use the serial api and connect to the gateway using a tcp, mqtt or serial port connection.

                      rajeev2301R 1 Reply Last reply
                      0
                      • mfalkviddM mfalkvidd

                        @rajeev2301 I would suggest no programming at all. Just create a raspberry pi gateway and connect a controller to it.

                        If you want to program yourself, use the serial api and connect to the gateway using a tcp, mqtt or serial port connection.

                        rajeev2301R Offline
                        rajeev2301R Offline
                        rajeev2301
                        wrote on last edited by
                        #11

                        @mfalkvidd

                        Thanks , I really appreciate your time for helping me out on this. I have recently started diggging into IOT world so I may be asking a trivial question. ( my apology and Thanks in advance

                        I have a following scenario:

                        I am trying to pull the temperature and humidity data from Arduino Nano and then transmitting it through NRF24L01 transreceivers. It works perfectly fine between arduino to Arduino Communication. However I am stuck when I am trying to receive the same information into my Raspeberry Pi3.
                        I believe , I have successfully setup a gateway by following step by step instruction (https://www.mysensors.org/build/raspberry) but now I want to receive the message relaying through my Arduino Nano for which I need to write a code in Raspberry Pi. That’s the reason I am writing a simple python code to receive that message. Please suggest if there are alternate way to receive the message from my arduino’s.

                        Thanks again for your kind guidance.

                        mfalkviddM 1 Reply Last reply
                        0
                        • rajeev2301R rajeev2301

                          @mfalkvidd

                          Thanks , I really appreciate your time for helping me out on this. I have recently started diggging into IOT world so I may be asking a trivial question. ( my apology and Thanks in advance

                          I have a following scenario:

                          I am trying to pull the temperature and humidity data from Arduino Nano and then transmitting it through NRF24L01 transreceivers. It works perfectly fine between arduino to Arduino Communication. However I am stuck when I am trying to receive the same information into my Raspeberry Pi3.
                          I believe , I have successfully setup a gateway by following step by step instruction (https://www.mysensors.org/build/raspberry) but now I want to receive the message relaying through my Arduino Nano for which I need to write a code in Raspberry Pi. That’s the reason I am writing a simple python code to receive that message. Please suggest if there are alternate way to receive the message from my arduino’s.

                          Thanks again for your kind guidance.

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

                          @rajeev2301 thanks for explaining your use case.

                          You can compile the MySensors raspbery pi gateway as an ethernet gateway, and let your python program connect to the raspberry pi gateway using tcp. The python program would not be concerned with nrf at all. MySensors will present sensor information the same way regardless which transport (nrf, rfm or rs485) used by the sensors.

                          The information presented by the gateway will follow the specification of the serial protocol that I linked earlier.

                          rajeev2301R 1 Reply Last reply
                          0
                          • mfalkviddM mfalkvidd

                            @rajeev2301 thanks for explaining your use case.

                            You can compile the MySensors raspbery pi gateway as an ethernet gateway, and let your python program connect to the raspberry pi gateway using tcp. The python program would not be concerned with nrf at all. MySensors will present sensor information the same way regardless which transport (nrf, rfm or rs485) used by the sensors.

                            The information presented by the gateway will follow the specification of the serial protocol that I linked earlier.

                            rajeev2301R Offline
                            rajeev2301R Offline
                            rajeev2301
                            wrote on last edited by
                            #13

                            @mfalkvidd

                            Thanks , really appreciate your quick response. Yes , I am aware of TCP but isn’t that it needs an Internet for communication.My plan is to exchange data between sensors wirelessly using radio frequency ( e.g, NRF24L01) so that I don’t have dependency on TCP/Internet. Also, my plan is to create a master-slave kind of setup. Where all sensor’s data really into central raspberry pi environment and then I can play around with dataset from multiple sources.
                            Your guidance would be highly appreciated.

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

                              If I were you I'd start looking at controllers like Domoticz, MyController, Home Assistant, Node-red etc etc, as there is already documentation on how to connect to a MySensors gateway and the rest

                              1 Reply Last reply
                              1
                              • rajeev2301R rajeev2301

                                @mfalkvidd

                                Thanks , really appreciate your quick response. Yes , I am aware of TCP but isn’t that it needs an Internet for communication.My plan is to exchange data between sensors wirelessly using radio frequency ( e.g, NRF24L01) so that I don’t have dependency on TCP/Internet. Also, my plan is to create a master-slave kind of setup. Where all sensor’s data really into central raspberry pi environment and then I can play around with dataset from multiple sources.
                                Your guidance would be highly appreciated.

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

                                @rajeev2301 it sounds like you want to do pretty much what MySensor does, but you want to program every detail yourself? If that's the case, MySensors might not be the right forum/library. Most people use MySensors because they don't want to program all the details themselves. We just want a communication network, and that's what MySensors provides.

                                rajeev2301R 1 Reply Last reply
                                0
                                • mfalkviddM mfalkvidd

                                  @rajeev2301 it sounds like you want to do pretty much what MySensor does, but you want to program every detail yourself? If that's the case, MySensors might not be the right forum/library. Most people use MySensors because they don't want to program all the details themselves. We just want a communication network, and that's what MySensors provides.

                                  rajeev2301R Offline
                                  rajeev2301R Offline
                                  rajeev2301
                                  wrote on last edited by
                                  #16

                                  @mfalkvidd

                                  Thanks for your valuable input. I think I got some direction to move on.

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


                                  19

                                  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