This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

connect to Web Bluetooth

Hello,

I'm trying to connect a bluetooth device (peripheral) with Web Bluetooth (central). I send an addvertising packet and I can see the device in Web Bluetooth but I fail to connect to it. My code looks like this: (MicroPython)

ble.gap_advertise(interval_us=100, adv_data=bytearray(b'\x02\x01\x06\x06\x08\x45\x53\x50\x33\x32\x11\x07\x26\x6c\x34\x7f\xb2\x38\x61\x82\xbe\x4d\x1d\x64\xf1\xf7\x93\x16\x02\x19\x80'),resp_data=None, connectable=True)

Thanks in advance! 

Parents
  • I fail to connect to it

    What testing / investigation / debugging have you done to find what's going wrong ?

    Do you get any error messages?

    Do you have tools on the Central & Peripheral to see what's happening?

    What are you using as the Central?

    What device is the Peripheral ?

    Have you had any success connecting to other peripherals?

    Have you had any success in establishing a "conventional" BLE connection in MicroPython ?

  • On my Bluetooth enabled web browser (with JavaScript) I'm requesting a bluetooth device and  try to connect to it. I don't get an error message but it just doesn't connect. (Code: server = await device.gatt.connect()) The Code stops at that line. 

    The JavaScript code worked with another bluetooth peripheral. (RN4678) I checked. I exchanged the device name and the service using the filter option. The service I want to access is in the payload. And with the App nRF Connect it works perfectly. I can connect to the peripheral and read and write data.

Reply
  • On my Bluetooth enabled web browser (with JavaScript) I'm requesting a bluetooth device and  try to connect to it. I don't get an error message but it just doesn't connect. (Code: server = await device.gatt.connect()) The Code stops at that line. 

    The JavaScript code worked with another bluetooth peripheral. (RN4678) I checked. I exchanged the device name and the service using the filter option. The service I want to access is in the payload. And with the App nRF Connect it works perfectly. I can connect to the peripheral and read and write data.

Children
Related