Comments (9)
Thanks for pointing this out. I'll fix this shortly.
from ble.
Why is the encoded URI data restricted to 18 bytes when you can go up to 21?
ADV payload can be up to 31 bytes.
4 bytes for the service UUID: Type + length + 16-bit UUID
6 bytes of header for the URI data: Type + length + 16-bitUUID + flags + power
from ble.
The case of the missing bytes!
See the Figure below. The missing bytes are from the AD Flags
(AD Type 0x01).
Is mbed broadcasting flags? CSR firmware forces the flags in the ADV packet.
The thing is that some central devices care about them and some don't. We've seen versions of Android/iOS discard ADV packets without flags (though I'd have to dig up which).
Robin Hayden was going to propose that missing flags default to 0... which is reasonable but right now it doesn't seem to be widely adopted in scanners.
from ble.
Why is the service UUID duplicated?
from ble.
Hi, AD flags aren't needed. Mbed doesn't add them. Secondly, Advertisement payload can be up to 31 octets long. Lastly, you shouldn't be duplicating the Service UUID.
You should be able to add another 7 bytes to your max URI data length!!
from ble.
@rgrover are you sure that's true for all versions of Android and iOS? If I recall correctly, Scott said these were added for compatibility with either iOS (something to do with detecting tags from a background process) or older versions of Android.
from ble.
I'm not sure about all version of Android/iOS. Even if we need to keep AD flags, there's some more room in the advertisement payload, and there's also some redundancy. You could certain get a few more URI octets out of the payload.
from ble.
As mentioned above, AD Flags is necessary for some devices, else packets are filtered. We can revisit this and see exactly which devices.
Why is the service UUID duplicated?
I assume you mean why is there both a AD Service UUIDs and AD Service Data? AD Complete List of 16-Bit Service UUIDs is needed in order to background scanning on iOS.
from ble.
31 - 3 (AD Flags) - 4 (AD Service UUIDs) - 4 (AD Service Data header) - 2 (Flags, TX Power) = 18
from ble.
Related Issues (20)
- AdvertisementCallbackParams_t should include addressType for the peerAddr HOT 3
- GapState_t missing information? HOT 2
- GapAdvertisingData using deprecated type aliases HOT 1
- Time unit inconsistencies in GapScanningParams HOT 1
- Duplicated functionality in GapAdvertisingParams and GapScanningParams HOT 1
- BLE.h conflict with Nordic SDK ble.h HOT 5
- Using ANCS HOT 3
- Add error handling to GattClient procedures HOT 3
- Will we support BLE profiles? HOT 2
- "connection parameters update request" CALLBACK IS MISSING FROM MBED STACK HOT 12
- Possible Ticker BLE_API conflict causing problems with Nordic devices? HOT 7
- Link to documentation from README is broken
- NRF_52 Development Kit notification events don't fire on the central, when peripheral data changes HOT 24
- Linker error when using the Nordics Experimental Flash Data Storage API's. HOT 1
- NRF5: Byte order of characteristics with multi-byte data types incorrect HOT 4
- please implement missing key features HOT 1
- X-Nucleo-IDB05A1 Not Working HOT 4
- Can I control the channel the device is advertising on with this API?
- How to call BLE APIs from the board to host side using icetea?
- #include "mbed.h" where is it??? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ble.