-
Notifications
You must be signed in to change notification settings - Fork 31
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
Extra, not needed, packets are received. #30
Comments
Hmm, sorry you are having this trouble. I have not used manual packet size much, but was supposed to be implemented. Could you set |
Sorry you had to wait, here it is: https://gist.github.com/atomicus/88ff3b8ece5b26f75d18 This happens also on line 2485->2497. Just ctrl+f for numbers 101,102,103... and you will find it. |
Thanks, and no worries on the delay. This afternoon I am getting my hardware back together for better followup and future development the backlog of issues here. Looking at the logs [with the big disclaimer that I'm a bit rusty while having been "away"] there's a strong smell of race condition, which seems a good guess especially since you are using software poling instead of hardware IRQ. The snippet of the log you pointed out:
There is an I sort of patched over an unrelated bug due to a similar race condition in 385d9c5 but even at the time that seemed a bit hacky of a solution. But this is an even worse bug, and I think it's time to figure out how to really fix all these kinds of asynchronous woes… |
Oy, I always write soooo much. Executive summary: Sorry, this is probably an architectural bug that may take a bit to fix…so it might get caught up in a more general overhaul. However, it is a pretty high priority bug since I can see how it would make this library useless in your case. If you can, hooking up the hardware IRQ pin may make the problem much less significant [or potentially avoid it] in the meanwhile. |
Gosh, I missed github emails. I'll turn on IRQ pin and let you know if it fix it. |
I've tried to use IRQ pin, but whatever I use as 3 param of connect() (i tried, 25,14,17) i get this error:
node: symbol lookup error: /home/pi/nodejs/lihnode/node_modules/nrf/node_modules
/pi-pins/node_modules/epoll/build/Release/epoll.node: undefined symbol: _ZN4node
12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueE
EE
|
Seems like you probably need to rebuild your project's dependencies after upgrading to node 0.12? |
Yep, you were right. Enabling IRQ fixes the problem with extra packets, i'll leave it up to you if to close this issue. |
Glad to hear it! I'm going to leave this open since if we do have fallback for running without IRQ pin, it shouldn't be left broken like this. |
If I open the pipe:
var rx = radio.openPipe('rx', 0xF0F0F0F0F1, {size: 'auto'});
for each packet send to my code I get two on('data') events:
First one is correct one - 'data' is proper
Second one is the same size as first one, but filled with last character of first
Example:
Send: XXX [what was send by arduino]
-Recv: YYY [what was received by rpi]
send: 0001
-recv: 0001
-recv: 1111
send: 0002
-recv: 0002
-recv: 2222
And so on.
*note: displayed data is reversed - due to #28
Calling:
var rx = radio.openPipe('rx', 0xF0F0F0F0F1, {size: '4'});
makes problem disappear, but then ACK does not work as in #29
So, no way to use lib...
The text was updated successfully, but these errors were encountered: