MySensors Raspberry port suggestions
-
@wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.@marceloaqno said:
@wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.I have tried to update gcc but apt-get says it is already at latest version. I am upgrading to Jessie now as it has gcc 4.9 (I was running Wheezy with gcc 4.6).
Is there an updated build instruction set? I am planning on using this as a serial gateway with Domoticz on same RPi. -
@ikkeT you can build the Raspberry Pi mysGateway as either Serial, Ethernet or MQTT by using appropriate commandline parameters with the configure script. Just do ./configure --help and you'll get a list of all the options available. Once you've chosen your options and run configure then you 'make'. An example of a set of options that will generate an MQTT Gateway is:
./configure --my-debug=enable --my-gateway=mqtt --my-rf24-channel=100 --my-rf24-pa-level=RF24_PA_LOW --my-controller-ip-address=127,0,0,1 --my-port=1883
--my-mqtt-client-id=MyGW2 --my-mqtt-publish-topic-prefix="MyGW2out" --my-mqtt-subscribe-topic-prefix="MyGW2in"In this case my MQTT Broker is Mosquitto and is on the same Raspberry Pi hence the use of 127,0,0,1 for the specified --my-controller-ip-address. Change that as appropriate to your intended setup.
Hope that helps.
@hawk_2050 thanks for the reminder! I recalled it was somehow configurable, but I forgot it was through . /configure options. I'll try after getting pir working also.
-
@marceloaqno said:
@wergeld I'm not sure why you are having this error, perhaps your version of gcc it's old? Did you try to update it?
You can skip the installation of TMRh20/RF24, it is no longer necessary to build RPi port.I have tried to update gcc but apt-get says it is already at latest version. I am upgrading to Jessie now as it has gcc 4.9 (I was running Wheezy with gcc 4.6).
Is there an updated build instruction set? I am planning on using this as a serial gateway with Domoticz on same RPi.@wergeld I updated the building instructions:
https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26 -
@wergeld I updated the building instructions:
https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26@marceloaqno said:
@wergeld I updated the building instructions:
https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.
-
@marceloaqno said:
@wergeld I updated the building instructions:
https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.
@wergeld said:
@marceloaqno said:
@wergeld I updated the building instructions:
https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/26Success! Upgraded to Jessie and build worked fine. Now to reconnect my radio to the RPi pins directly to test.
Okay, using an RPi2B upgraded to Jessie from Wheezy I have successfully built and set the mysGateway as a daemon. My configuration was:
./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-rf24-pa-level=RF24_PA_LOWThis was immediately available in Domoticz under Hardware. I re-added the 2 nodes and away I went!
Full command list:
git clone https://github.com/marceloaqno/MySensors.git cd MySensors ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-rf24-pa-level=RF24_PA_LOW make sudo make install sudo mysGateway -bIn Domoticz it lists this gateway as running:
MySensors Gateway USB
Version: 2.0.1-betaSo far very happy with this setup. No wires and no extra arduino needed for serial gateway. Just the NRF+RPi interfacing via:
https://www.openhardware.io/view/100/Raspberry-PI-NRF24l01-hat -
what am I doing wrong here?
root@raspberrypi:/downloads/MySensors# ./configure --my-gateway=mqtt --my-mqtt-client-id=msgw --my-mqtt-publish-topic-prefix=mspub --my-mqtt-subscribe-topic-prefix=mssub --my-controller-ip-address=10.0.10.4 --my-port=1883 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000d. [OK] init system detected: systemd [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@raspberrypi:/downloads/MySensors# make cc -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp: In function âvoid transportProcessMessage()â: ./core/MyTransport.cpp:535:61: error: no matching function for call to âmin(uint8_t, unsigned int)â const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ ./core/MyTransport.cpp:535:61: note: candidates are: In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:535:61: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ) const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:535:61: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ) const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ ./core/MyTransport.cpp: In function âbool transportSendWrite(uint8_t, MyMessage&)â: ./core/MyTransport.cpp:826:82: error: no matching function for call to âmin(unsigned int, const uint8_t&)â bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ ./core/MyTransport.cpp:826:82: note: candidates are: In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:826:82: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â) bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:826:82: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â) bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed make: *** [examples_linux/mysGateway.o] Error 1 root@raspberrypi:/downloads/MySensors# -
what am I doing wrong here?
root@raspberrypi:/downloads/MySensors# ./configure --my-gateway=mqtt --my-mqtt-client-id=msgw --my-mqtt-publish-topic-prefix=mspub --my-mqtt-subscribe-topic-prefix=mssub --my-controller-ip-address=10.0.10.4 --my-port=1883 [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2835, Type=RPi, CPU=armv6l, REV=000d. [OK] init system detected: systemd [SECTION] Saving configuration. [SECTION] Cleaning previous builds. [OK] Finished. root@raspberrypi:/downloads/MySensors# make cc -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_PORT=1883 -DMY_CONTROLLER_IP_ADDRESS=10,0,10,4 -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mssub\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mspub\" -DMY_MQTT_CLIENT_ID=\"msgw\" -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp: In function âvoid transportProcessMessage()â: ./core/MyTransport.cpp:535:61: error: no matching function for call to âmin(uint8_t, unsigned int)â const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ ./core/MyTransport.cpp:535:61: note: candidates are: In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:535:61: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ) const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:535:61: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned charâ and âunsigned intâ) const uint8_t msgLength = min(mGetLength(_msg), MAX_PAYLOAD); ^ ./core/MyTransport.cpp: In function âbool transportSendWrite(uint8_t, MyMessage&)â: ./core/MyTransport.cpp:826:82: error: no matching function for call to âmin(unsigned int, const uint8_t&)â bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ ./core/MyTransport.cpp:826:82: note: candidates are: In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:826:82: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â) bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0, from /usr/include/c++/4.9/ios:40, from /usr/include/c++/4.9/ostream:38, from /usr/include/c++/4.9/iostream:39, from examples_linux/mysGateway.cpp:20: /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:287:0, from examples_linux/mysGateway.cpp:60: ./core/MyTransport.cpp:826:82: note: deduced conflicting types for parameter âconst _Tpâ (âunsigned intâ and âuint8_t {aka unsigned char}â) bool result = transportSend(to, &message, min(MAX_MESSAGE_LENGTH, totalMsgLength)); ^ Makefile:46: recipe for target 'examples_linux/mysGateway.o' failed make: *** [examples_linux/mysGateway.o] Error 1 root@raspberrypi:/downloads/MySensors# -
Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.
@marceloaqno said:
Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.
// Flash leds on rx/tx/err
//#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
//#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pinWhat do I put there? RPi pin numbers or GPIO numbers?
-
@marceloaqno said:
Update: Added support for status leds (RX/TX/ERR), you can enable it in examples_linux/mysGateway.cpp file.
// Flash leds on rx/tx/err
//#define MY_DEFAULT_ERR_LED_PIN 12 // Error LED pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive LED pin
//#define MY_DEFAULT_TX_LED_PIN 18 // Transmit LED pinWhat do I put there? RPi pin numbers or GPIO numbers?
@ericvdb In any type of pin configuration for the RPi, always use the physical pin number.
-
The RPi port was merged into mysensors official repository :tada: (thank you to everyone who helped with this process :clap: ). For future discussion, please use this this topic.