Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write function always return false #10

Closed
aliasdoc opened this issue Jun 9, 2014 · 9 comments
Closed

write function always return false #10

aliasdoc opened this issue Jun 9, 2014 · 9 comments

Comments

@aliasdoc
Copy link

aliasdoc commented Jun 9, 2014

Hi, i try to use this library (RPi version) with MySensors library and I see every call to write() return false.

@TMRh20
Copy link
Member

TMRh20 commented Jun 11, 2014

Hey aliasdoc, I'm not really in the loop right now as far as the current state of the mysensors RPi code. When I try the code at https://github.com/mysensors/Raspberry there are problems compiling.
Are you using different code? What is the code you are using?

@aliasdoc
Copy link
Author

Hi TMRh20, yes I use another code, I port the MySensors version in development tree ( https://github.com/mysensors/Arduino/tree/development) to RPi and use this version of RF24 (https://github.com/mysensors/Arduino/tree/development/libraries/RF24/RPi) compiling and communication is ok, but write() function of this library always return false. I also make tests with getting started example and it return false, but the receptor receive payload, I think there are problem with ACK.

@TMRh20
Copy link
Member

TMRh20 commented Jun 11, 2014

In taking a quick look, it looks like you might just need to call enableDynamicAck(); in both devices.
Currently it has to be set for the optional multicast write/read, but I'm thinking it might be best to enable that by default to avoid confusion. The gettingstarted_call_response example should be getting an ACK response with that enabled??.

@aliasdoc
Copy link
Author

Yes it fails, I make tests with gettingstarted sketch (arduino) and gettingstarted_call_response (RPi) with enableDynamicAck(); in both

@aliasdoc
Copy link
Author

RF24 library used with RPi is not the same as Arduino, I think, the problem is here, you have another port for RPI or not ?
RPi version : https://github.com/mysensors/Arduino/tree/development/libraries/RF24/RPi
Arduino version: https://github.com/mysensors/Arduino/tree/development/libraries/RF24

@TMRh20
Copy link
Member

TMRh20 commented Jun 11, 2014

No other port, those are almost the same as https://github.com/TMRh20/RF24 (without the latest changes)

Could you send me all your code at tmrh20@gmail.com or post it somewhere I can see it, just so I can easily recreate the problem?

@aliasdoc
Copy link
Author

check your mail ;)

@aliasdoc
Copy link
Author

Now it works, I port the RF24 library of arduino to RPi, enable DynamicAck and now all is ok.

@TMRh20
Copy link
Member

TMRh20 commented Jun 11, 2014

Alright, the acks seemed to work ok if I removed RF24::setAutoAck(BROADCAST_PIPE,false); from MySensor.cpp , but not sure if that would have fixed it all the way.

@TMRh20 TMRh20 closed this as completed Jun 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants