- From: Reilly Grant <reillyg@google.com>
- Date: Mon, 22 Jan 2024 10:50:24 -0800
- To: Langer Antonia <antonia.langer@rimo-systems.com>
- Cc: "public-web-bluetooth@w3.org" <public-web-bluetooth@w3.org>
- Message-ID: <CAEmk=MajMSGqs6VhegKh8Sn=OLQ=KYR=2SENY6mBvjeRdOTmGA@mail.gmail.com>
Clarifying whether your device is BT Classic or BLE is an important first step because for the moment the ability to connect to BT Classic RFCOMM devices with the Web Serial API mentioned in the article you linked ( https://developer.chrome.com/blog/serial-over-bluetooth?hl=en) is not supported on Android. For BT Classic devices you need to use Web Serial. For BLE devices you need to use Web Bluetooth. These are completely separate APIs with somewhat different semantics. I'd also like to better understand what you mean when you say that every device has a different UUID. navigator.bluetooth.requestDevice() expects you to be able to filter devices based on the services they advertise. If every device advertises a service with a different UUID that would make this API impossible to use. That's not something we've encountered before. Reilly Grant | Software Engineer | reillyg@google.com | Google Chrome <https://www.google.com/chrome> On Mon, Jan 22, 2024 at 7:48 AM Langer Antonia < antonia.langer@rimo-systems.com> wrote: > Hello! > > > > I have a question regarding the Web Bluetooth API. > Currently I am developing a Progressive Web App for surveying. For the > implementation we would like to connect our Android device with an antenna. > We tried to build up a connection, but since all antennas have a different > UUID we couldn’t achieve it with *navigator.bluetooth.requestDevice()* (as > described here > https://developer.chrome.com/blog/serial-over-bluetooth?hl=en). > > > We researched on how other surveying apps (all of them are native apps) > achieve a connection via Bluetooth. They can look overall for BT devices, > but native apps also support to connect with already paired devices. So > when I pair my Android phone with a device beforehand and then open the > native app, the BT device is found and I can connect. > > We also tried the way described here > https://developer.chrome.com/docs/capabilities/bluetooth?hl=en, but > unfortunately the antenna we would like to connect wasn’t found. Probably > because it does not support BT Classic, but only BLE. > > > > Now my question would be: > Is there a way to connect a BLE device with my Android phone and > furthermore use it in my PWA like in the second link above? > > > > Kind regards! > > > > >
Received on Monday, 22 January 2024 18:50:47 UTC