-
Notifications
You must be signed in to change notification settings - Fork 122
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
What is the motivation for starting GATT values with '!'? #31
Comments
make parsing easier, so you know where to start looking - and then you checksum as well! |
@ladyada , "so you know where to start looking" If what follows the '!' is the meaningful part of the value sent to the device, is there something in the value that could reasonably come before the '!' character? |
I see that issue #23 brings up the same point about resetting when '!' is seen somewhere in the middle of the value. That character might be part of the value rather than the start of the value. |
that codes probably before the checksum was added. there needs to be some way to know when a packet starts! :) |
@ladyada, doesn't data arriving indicate a packet starting? |
no, not necessarily, bytes can be dropped by the uart interface |
@ladyada, so some of the bytes at the start of the packet could be dropped meaning only the tail of the packet is being read? That still doesn't explain resetting Thanks for your replies. I appreciate it. :-) |
yes, if you want to submit a pull req for the fix that would be nice - no ETA on when we'll get to it! |
In the examples, it is not documented why the packet reading code requires all GATT values to begin with the '!' character.
Especially curious is why the
replyidx
is reset when a second '!' character is encountered in the value. What if a '!' character is actually intended to be part of the value the master device is trying to send to the BluefruitLE?Adafruit_BluefruitLE_nRF51/examples/cplay_neopixel_picker/packetParser.cpp
Line 101 in b80b880
The text was updated successfully, but these errors were encountered: