Closed eskalVAR closed 1 year ago
This sounds like a problem with the implementation rather than with the specification. Please see https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs/ for how to file bugs for Chromium.
Only data matching the optionalManufacturerData
parameter to requestDevice
is included in the advertisement event.
This could be an implementation bug, as this feature isn't stable yet. If you can file a Chromium bug with an example of the code you are running and information about the device (perhaps so we can reproduce it) that would be very helpful.
When you say optionalmanufacturerdata. Do you mean
option.manufacturerData with the company ID or
option.optionalManufacturerData
An example of the object would be great
Thanks
On Thu, Nov 3, 2022 at 18:05, Reilly Grant @.***> wrote:
Only data matching the optionalManufacturerData parameter to requestDevice is included in the advertisement event.
This could be an implementation bug, as this feature isn't stable yet. If you can file a Chromium bug with an example of the code you are running and information about the device (perhaps so we can reproduce it) that would be very helpful.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I mean options.optionalManufacturerData
. I don't think we have an example of this on https://googlechrome.github.io/samples/web-bluetooth.
So would something like this be sufficient?
options.filters[0].manufacturerData[0].companyIdentifier
options.optionalManufacturerData[0].manufacturerData[0].companyIdentifier
Those both set.
Or should it be formatted differently?
Thanks
On Thu, Nov 3, 2022 at 18:31, Reilly Grant @.***> wrote:
I mean options.optionalManufacturerData. I don't think we have an example of this on https://googlechrome.github.io/samples/web-bluetooth.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I think* this example code should work.
const manufacturerId = 0x0001;
await navigator.bluetooth.requestDevice({
acceptAllDevices: true,
optionalManufacturerData: [manufacturerId],
});
This does the job. Thanks!
Hello I’m trying to receive manufacturer specific data. I filter by prefix and company id into navigator.requestDevice.
When running device.watchAdvertisements the event for advertisement received gets fired but there the manufacturer specific data map is empty.
Is this perhaps due to a permission issue I’m not understanding? The data shows up just fine on internal browser tools.