-
Notifications
You must be signed in to change notification settings - Fork 74
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
nRF receiving wrong payload? #16
Comments
Is it possible that the packets sent from your phone are simply too large? If it's more than ~21 bytes of payload, then the internal buffer of the nRF24 will overflow and you will get garbage. |
This was my original thought too, but this doesn't explain where the exact same garbage is coming from when there are no ADV packets in the air. Any help on this is really appreciated. I'm also going to try using a different nRF/breakout combo in case it might be broken. |
Figured it out! Didn't realize our breakout took a 5V input not a 3.3V... |
So sending & receiving now both work? For reference, what phone are you using? |
Yes sending and receiving both work fine. I'm using a Samsung Note 5. On Sep 21, 2016 3:18 AM, "Florian Echtler" [email protected] wrote:
|
Great to hear, thanks! I haven't been using the library myself for a while (as the nRF52 series are so incredibly cheap), but I'd be happy to take pull requests. |
Alright cool. I have a lot of ideas but not sure if most of them are On Sep 21, 2016 9:25 AM, "Florian Echtler" [email protected] wrote:
|
Looking forward to it. BTW, what Arduino did you use? |
I'm using an Uno. With an ATMEGA328 On Sep 22, 2016 4:48 AM, "Florian Echtler" [email protected] wrote:
|
Hey there. I downloaded your library (and the RF24 library). So now I'm trying a simple send/receive example. I can send packets from the nRF and pick them up on my phone, but I can't get the reverse. I don't want to complicate things but here's a snippet:
Serial.print(btle.listen());
Serial.println(btle.buffer.pl_size);
for (int i = 0; i < btle.buffer.pl_size; i++) {
Serial.print(btle.buffer.payload[i], HEX);
Serial.print(" ");
}
I first tested this without advertising anything from my phone. When I don't call btle.listen() and just print out the buffer anyway, I get 0 for size and nothing for payload (as expected). So then I re-ran, calling listen() first, and I get 3 different payloads, repeated indefinitely... but nothing is advertising. Then I tried btle.buffer.payload[i] = 0 in my loop, to "reset it". It did not like that... but this time I only got 1 payload over and over again.
What am I doing wrong? I know it's happening within listen() because I correctly get all 0's when I do not call listen. I think it has something to do with the communication between this library and the nRF, or maybe the buffer is at the wrong address. Here is a line of output from the for loop:
75 31 11 48 96 77 F8 E3 46 E9 AB D0 9E 53 33 D8 BA 98 8 24 CB 3B FC 71 4B 1 0 F 1 9 A 0 0 0 20�(�ª�adv recv
That "adv recv" is coming from the "BTLE adv recv" output in the setup()...
The text was updated successfully, but these errors were encountered: