Skip to content

Can only put one item in advertisement #86

Closed
@asharov

Description

@asharov

Hi,

I have a need to implement a profile that requires me to put both the advertised service UUID and manufacturer data into the advertisement. My problem is that BLEPeripheral has an if-else chain for filling the advertisement so that it will not add both. I have solved this for myself by modifying the BLEDevice class to accept an array of advertisement payloads, so that the device implementation can add all of them to the advertisement. Would this be interesting to you? If so, I could clean my modifications up and make a pull request.

There's one problem in that I'm not sure whether this works at all with nRF8001. I recall not being able to set multiple advertisement payloads with nRF8001 even though I tried, but I did not dig very deeply into how it could be made to work as I switched to nRF51822 for other reasons anyway. So with my modifications the nRF8001 interface would have the begin function taking an array but only using the first element. This is, however, not a change in how BLEPeripheral currently works, as it will pass only one item as advertisement data to the device in any case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions