#12 Bluetooth message loss

v1.0_(example)
closed
nobody
5
2007-05-04
2007-03-19
Rupert
No

I dont know if this is a bug, or a feature.

I have just begun playing with bluetooth communication in NBC, basing myself on code from this thread

http://news.lugnet.com/robotics/nxt/?n=562

I noticed that some messages are lost, even when the bricks are side by side. I havent really discerned a pattern in which messages are lost either. I'm attaching code which shows the problem. Basically its the example from the above thread, but it waits for a button press in between each send/recieve. So you can send 5 or 6 from one, and then try to recieve them all on the other. This way you can see that some - but not all - are lost.

Is it supposed to work like that? One can, of course write a reliable protocol on top using interlocks - do you know if anyone has already done that?

cheers
Rupert B

Discussion

  • Rupert
    Rupert
    2007-03-19

    master program

     
    Attachments
  • Rupert
    Rupert
    2007-03-19

    zip of code which demonstrates the issue

     
    Attachments
  • Rupert
    Rupert
    2007-03-19

    Logged In: YES
    user_id=1716703
    Originator: YES

    Oops, here is a zip of the example code. master is the master, slave the slave, and utilities.nbc is an include they both need.
    File Added: btexample.zip

     
  • John Hansen
    John Hansen
    2007-05-04

    Logged In: YES
    user_id=661666
    Originator: NO

    If you send too many messages before you allow the receiving NXT to start reading messages from the queue/mailbox then you will lose messages because there is a finite buffer size for incoming messages and if more come in before you start reading them then the earliest messages will be lost.

     
  • John Hansen
    John Hansen
    2007-05-04

    • labels: --> Installation Problems
    • milestone: --> v1.0_(example)
    • status: open --> closed