Skip to content

Advertising Services and Manufacturer Data (scanCallback) #160

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

Closed
FluffyMarshMallow26 opened this issue Feb 22, 2021 · 3 comments
Closed
Assignees

Comments

@FluffyMarshMallow26
Copy link

FluffyMarshMallow26 commented Feb 22, 2021

This is a feature request.

As discussed in this Arduino Forum thread, https://forum.arduino.cc/?topic=728591#msg4902344, Manufacturer Data is not displayed if services are advertised, possibly because the byte limit is exceeded when both are used.

Based on other information gleaned from the web, perhaps a scanCallback-type event could be used instead. This would allow another 31 bytes of information to be transferred in the advertising window before connecting with a central device. One possible suggestion is to modify the current callback function:

setEventHandler(BLEScanCallback, _doSendAdditionalAdvertisingPacket)

These two articles may provide additional information:
https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/02/10/bluetooth_advertisin-hGsf
https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/11/14/bluetooth_advertisin-zCHh

@facchinm
Copy link
Contributor

@polldo can you take a look?

@polldo
Copy link
Contributor

polldo commented Feb 24, 2021

Hi @FluffyMarshMallow26 ,

Manufacturer Data is not displayed if services are advertised

This has been fixed by this PR. You need to download the library from github because it has not been released yet.

Based on other information gleaned from the web, perhaps a scanCallback-type event could be used instead. This would allow another 31 bytes of information to be transferred in the advertising window before connecting with a central device.

Scan response is already enabled and used. Also thanks to the same PR, you can now decide whether to put your advertising data (i.e. local name, service uuid, manufacturer data, etc..) in the main advertising packet or in the scan response packet.
Example here.
Moreover, see #133 , functions used for adding advertising data (i,e. setLocalName() etc.) now return a bool value. This value indicates whether the passed parameter has been correctly added to the advertising packet or not. Thus, if you try to insert a parameter that would make the advertising packet exceed the maximum length, that is 31 bytes, you will receive false as a return value.

@FluffyMarshMallow26
Copy link
Author

Based on Polldo's comments, this features has already been implemented and will be eventually be released.

Thank you for responding to this request - closing this request 24 Feb 2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants