Port of MySensors Library 1.4 to Raspberry
-
not functional
MySensor.cpp:232: undefined reference to `RF24::write(void const*, unsigned char, bool)'
-
@aliasdoc yes, i can :)
~/Raspberry $ make
g++ -c -o MyGateway.o MyGateway.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
g++ -c -o MySensor.o MySensor.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
g++ -c -o MyMessage.o MyMessage.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
g++ -c -o PiGateway.o PiGateway.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/
PiGateway.cpp: In function ‘void setup()’:
PiGateway.cpp:26:88: warning: large integer implicitly truncated to unsigned type [-Woverflow]
g++ -o PiGateway MyGateway.o MySensor.o MyMessage.o PiGateway.o -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -Ilibrf24-bcm/ -lrf24-bcm
MySensor.o: In functionMySensor::setupRadio(rf24_pa_dbm_e, unsigned char, rf24_datarate_e)': /home/pi/Raspberry/MySensor.cpp:121: undefined reference toRF24::setPALevel(unsigned char)'
MySensor.o: In functionMySensor::sendWrite(unsigned char, MyMessage&, bool)': /home/pi/Raspberry/MySensor.cpp:231: undefined reference toRF24::write(void const*, unsigned char, bool)'
/home/pi/Raspberry/MySensor.cpp:231: undefined reference toRF24::write(void const*, unsigned char, bool)' /home/pi/Raspberry/MySensor.cpp:231: undefined reference toRF24::write(void const*, unsigned char, bool)'
/home/pi/Raspberry/MySensor.cpp:231: undefined reference toRF24::write(void const*, unsigned char, bool)' /home/pi/Raspberry/MySensor.cpp:231: undefined reference toRF24::write(void const*, unsigned char, bool)'
MySensor.o:/home/pi/Raspberry/MySensor.cpp:231: more undefined references to `RF24::write(void const*, unsigned char, bool)' follow
collect2: ld returned 1 exit status
Makefile:18: recipe for target 'PiGateway' failed
make: *** [PiGateway] Error 1 -
Hi
Im working on a MQTT Port for the Pi, based on your work. During debuging, a discovered a strange behavior. If i connect my Sensor to a Arduino-Gateway, everything works well. As soon as i connect the same Sensor to a Pi-Gateway, the Gateway receives the Messages, but on the Sensor-Side, the Logs looks quiet Special:
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.4
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:1
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
new parent=0, d=1
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.4
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.4
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
new parent=0, d=1
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:1
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=ok:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=ok:96
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=ok:0
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=ok:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:1
send: 20-20-0-0 s=3,c=1,t=0,pt=7,l=5,st=fail:21.1
send: 20-20-0-0 s=2,c=1,t=1,pt=7,l=5,st=fail:55.3
send: 20-20-0-0 s=4,c=1,t=23,pt=7,l=5,st=fail:97
send: 20-20-0-0 s=1,c=1,t=16,pt=0,l=1,st=fail:0
send: 20-20-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 20-1-255 s=255,c=3,t=7,pt=0,l=0:
read: 0-0-20 s=255,c=3,t=8,pt=1,l=1:0
new parent=0, d=1As you can see, there is kind of a Pattern ocouring every 14 Messages starting with 3-4 OK, followed by 7 FAIL and then the Discovery. Any Ideas what the cause ot this behavor could be?
Greetings
busa
-
Hi guys,
Im trying to get my raspberry PI to act like a gateway/controller, where the nodes request an id from the controller. But Im stuck sending back the response to the sensor set message.
I have updated the PiGateway.cpp to detect the ID request message, and respond using the parseAndSend function. The sensor node appears to accept the response, and then sends a set message indicating the sensor value. However Im not sure how to respond to this.
What do I need send back so that the sensor treats it as success rather than failure?
Thanks
Kihon
-
Hello Guys ,
I am looking to run the rasp pi as gateway+controller with the nrf24 . Please where should i start from does it have any explanation like we have for the arduino s running mysensor ? .
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