Open miticosimo opened 9 years ago
The error is on line 24 of dorbot_server.cpp and it seems that there's an invalid type conversion in one of the parameters that are passed to the constructor for the rf24; probably the first one ' ("/dev/spidev0.0")'.
Check that your spi port is accessible (you need to enable it in raspi-config), that it appears in your /dev directory, and that the code hasn't changed in the rf24 library that you're using. If a change to the rf24 library has happened, please edit the code and submit a pull request.
Hi, Can you expand on the problems you found with the RF24 library please. I am unable to complete the make command (Dorbot/RPI) as I get the error "/usr/bin/ld: cannot find -lrf24" Regards David
Helidave, The error that you see looks like it's related to the library not existing where the make command says to look. The RF24 libs are installed in /usr/local/lib, but I copied them to the folder where the code was because I was lazy (and probably ill-informed).
I don't have access to any hardware that has this installed already, so I can't check to see whether the current version of the RF24 library from StanleySeow has changed relative to what I originally used: my guess is that some of the function calls have changed their return type (based on the original post on this issue), and that possibly the library has changed name since your build process isn't linking to them.
Hi Tim, Thanks for the quick response. I am really interested in your project, especially the Rasperry Pi and mysql side (of which I am just at the start of my knowledge) and I hoped to learn by example but it may be that I am being too ambitious. I checked the /usr/local/lib looking for the relevant file but only found the following ' librf24-bcm.so librf24-bcm.so.1 librf24-bcm.so.1.0 '. I will go back to the StanleySeow examples and see if I can follow the changes. Best Regards David
HI, I managed to sort out my RF library problems I believe however when I run the ./dorbot _server I get "can't send spi message: Invalid argument". Is this an issue with the spi.cpp file or am I misunderstanding it? Regards David
Hi David,
Great news. Do you know what you did -- is it something that can be baked into the makefile or readme so that those who come afterwards can get going?
spi.cpp was either part of the original maniacbug RF library, or something that StanleySeow added. Without more context, I can't really look at what is going on myself, but it does look a little like the function call may have changed or be expecting a different value than is being passed to it.
Hi Tim, Apologies for late reply -work! I will post when I have it fully working to avoid misleading anyone. The spi problem seems to be an issue with the radio.begin command. I am just working through it at moment but am a bit time poor. Will be back in touch as soon as I sort it. Cheers David On 4 Jun 2015 22:40, "timstephens" notifications@github.com wrote:
Hi David,
Great news. Do you know what you did -- is it something that can be baked into the makefile or readme so that those who come afterwards can get going?
spi.cpp was either part of the original maniacbug RF library, or something that StanleySeow added. Without more context, I can't really look at what is going on myself, but it does look a little like the function call may have changed or be expecting a different value than is being passed to it.
— Reply to this email directly or view it on GitHub https://github.com/timstephens/Dorbot/issues/5#issuecomment-109062050.
i have replaced the old rf24 .cpp .o .h files with the new files from github.com/stanleyseow/RF24.git because before it doesn't work. now if i build the .cpp in Dorbot/RPi i obtain this:
g++ -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -L./librf24/ -lrf24 -lssl -lcrypto dorbot_server.cpp -o dorbot_server
mysql_config --cflags --libs
In file included from RF24.h:23:0, from dorbot_server.cpp:14: RF24_config.h:32:0: warning: "max" redefined [enabled by default] /usr/include/mysql/my_global.h:1409:0: note: this is the location of the previous definition RF24_config.h:33:0: warning: "min" redefined [enabled by default] /usr/include/mysql/my_global.h:1410:0: note: this is the location of the previous definition dorbotserver.cpp:24:40: error: invalid conversion from 'const char' to 'uint8_t {aka unsigned char}' [-fpermissive] RF24.h:254:3: error: initializing argument 1 of 'RF24::RF24(uint8_t, uint8_t, uint32_t)' [-fpermissive] dorbot_server.cpp:24:40: warning: large integer implicitly truncated to unsigned type [-Woverflow] makefile:2: set di istruzioni per l'obiettivo "dorbotserver" non riuscito make: ** [dorbot_server] Errore 1what can i do? Thanks