- From: Reilly Grant <reillyg@chromium.org>
- Date: Tue, 22 Jun 2021 15:57:58 -0700
- To: Yenot Steeve <steeve.yenot@gmail.com>
- Cc: public-web-bluetooth@w3.org
- Message-ID: <CAEmk=MYs=3cFy9aqu04mgeh=eu1b-O0eCTLLa7hKvpUQw5xe5w@mail.gmail.com>
On Tue, Jun 22, 2021 at 10:07 AM Yenot Steeve <steeve.yenot@gmail.com> wrote: > Dear M. Grant, > Thank you for your reply. > > When I'm using sample code of watchAdvertisements I can detect and connect > my sensor but there is no display of Manufacturer data in Hex, > Is it normal? > To access manufacturer data you need to specify the manufacturer IDs of the data you want access to in the optionalManufacturerData <https://webbluetoothcg.github.io/web-bluetooth/#dom-requestdeviceoptions-optionalmanufacturerdata> parameter when calling requestDevice(). This works similarly to the optionalServices <https://webbluetoothcg.github.io/web-bluetooth/#dom-requestdeviceoptions-optionalservices> parameter and allows the browser to filter data available to the site based on the permissions it requested. > When I use ScanAdvertisments it's only works on my Android mobile and I > see data I'm looking for in Manufacturer data in Hex. But it doesn't workmy > windows PC. I have message about All Advertising should be True... Does it > should work also on windows or not? > It looks like there is an issue with the requestLEScan() function on some platforms. Since these APIs are still experimental it is easy for them to accidentally break as they don't get as much testing as a stable API. > Le mar. 22 juin 2021 à 18:33, Reilly Grant <reillyg@chromium.org> a > écrit : > >> There isn't a function which provides the raw advertisement packet, >> however both BluetoothDevice.watchAdvertisements() and >> Bluetooth.requestLEScan() provide BluetoothAdvertisingEvents which are a >> parsed view of an advertisement packet. If you have custom data in the >> advertisement it is probably either service data or manufacturer data and >> this data is available from the event object. >> >> Both of these methods are implemented as experimental in Chromium. >> Reilly Grant | Software Engineer | reillyg@chromium.org | Google Chrome >> <https://www.google.com/chrome> >> >> >> On Tue, Jun 22, 2021 at 4:02 AM Yenot Steeve <steeve.yenot@gmail.com> >> wrote: >> >>> Dear Sir Madam, >>> >>> I have a BLE device with custom advertisement setting. I would like to >>> simply scan and collect raw advertisement packet in Hex. >>> Can you, please, guide me on web bluetooth function which can allow me >>> to do this with simple bluetooth scan? >>> >>> Kind regards, >>> Steeve Yenot >>> >>
Received on Tuesday, 22 June 2021 22:58:39 UTC