BluetoothLE Sample fails to connect to Silicon Labs device after it reboots in OTA mode

Open
#1,395 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
desktop

Research direction

Start with Samples/BluetoothLE/cppwinrt/Scenario2_Client.cpp around the linked service-discovery call at line 209. Reproduce the disconnect and reboot into OTA mode using the reported Windows 11, SDK 10.0.22621.0, and Visual Studio 17.6.5 configuration, then trace reconnection and discovery behavior. Done means the sample reconnects to the Silicon Labs device after rebooting into OTA mode.

Written by the indexing model from the issue text.

Description

bug

Which sample are you reporting a bug in?

BluetoothLE sample C++/WinRT

Describe the bug

I am unable to connect to a Silicon Labs MCU after the MCU closes the connection. I have developed a UWB App before based on this sample, with the purpose of executing an OTA DFU on a Silicon Labs MCU. However, the laptops were changed and now I am using a Windows 11 PC.

That said, the process of the OTA DFU in Silicon Labs basically follows this procedure:

  1. Write in OTA Control Characteristic
  2. MCU reboots in OTA mode, closing the connection
  3. Connect and send new firmware image

The problem lies in step 2, where the Windows UWP Sample is unable to establish a connection again to the device. I don't have any of these problems using any other BLE Mobile Apps like EFR Connect or nRF Connect.

I believe the problem might be in here , where the device tries to discover the services and it fails, but I am guessing the problem/incompatibility is deeper than only this function call.

So I want to ask the UWP dev team if there is anything that the Windows API needs to receive in order to establish a connection (i am sure the connection is opened but not maintained since the device exit OTA mode) since this only happens when the MCU is rebooted into the called OTA mode.

Expected behavior
Windows PC should connect to the MCU after the MCU reboots.

Screenshots
image
imageimage

Configuration

  • C++/WinRT x64 Debug
  • Windows 11 SDK (10.0.22621.0)
  • Visual Studio 17.6.5

Additional context
I can also add that advertising packets sent in normal mode are as follows:

  • Flags = 0x06
  • Complete Local Name

In OTA Mode the advertising packets contain:

  • Flags = 0x06;
  • Complete Local Name
  • LE Bluetooth Device Address (random type)
  • TX Power Level
Dominant language
JavaScript
Stars
9.7k
Forks
7.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/Windows-universal-samples

All issues in microsoft/Windows-universal-samples

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.