bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

How to get ManufacturerData

Open temphiza opened this issue 4 years ago • 1 comments
trafficstars

Hi guys!

Excellent work you have done here, I'm wondering how to get Manufacturer Data at scanning time, I would really appreciate your help solving this.

Best regards!

temphiza avatar Jun 01 '21 02:06 temphiza

Manufacturer data is not currently implemented. However, it's probably not very difficult to add. Most changes will be to gap.go. If you want to try adding it, you can take a look at HasServiceUUID. For example, the API could look like this:

type AdvertisementPayload interface {
    // ... other methods

    ManufacturerData(manufacturer uint16) []byte
}

aykevl avatar Jun 01 '21 12:06 aykevl

Closing since is was implemented and released. Thank you!

deadprogram avatar Oct 27 '22 20:10 deadprogram