DevAcademy Bluetooth LE connection problems

Hi,

I am going through the DevAcademy Bluetooth LE lessons, using nRF5 DK. But I run into problems directly in the exercise of the first lesson. Everything goes fine to step 4.2, but connecting doesn’t work. Connection is established, but almost immediately disconnection happens. LED2 is lit for a short moment. The print outs are like this:

No matter how many times I try, disconnection always happens this way. I have also tested to connect via the Bluetooth low energy desktop app using the Nordic BLE dongle. Then the connection works fine. I have tested with both nRF Connect SDK 2.3.0 and 2.0.0, and the scenario is the same for both versions.

In the desktop app it is possible to read the button state and activate notifications (and receive updates when the button is pressed). But I am not able to control LED3. I have put a breakpoint in write_led() in lbs.c (C:\...\v2.3.0\nrf\subsys\bluetooth\services\lbs.c), but the breakpoint isn't hit when I write to the LED characteristic. Though, a breakpoint in read_button() will be hit when I click "Nordic LED and Button Service", so I should be in the correct file.

 

Best regards,

Lars

Parents
  • Just to add another data point, on a Samsung Note20,I was seeing the immediate disconnect too:

    [00:01:36.259,674] <inf> Lesson3_Exercise1: Connected
    [00:01:36.637,481] <inf> Lesson3_Exercise1: Disconnected. Reason 42

    On a 2nd phone (Samsung S24 Ultra), it did stay connected once, but then stopped.

    I rebooted both phones and now all is working fine.

Reply
  • Just to add another data point, on a Samsung Note20,I was seeing the immediate disconnect too:

    [00:01:36.259,674] <inf> Lesson3_Exercise1: Connected
    [00:01:36.637,481] <inf> Lesson3_Exercise1: Disconnected. Reason 42

    On a 2nd phone (Samsung S24 Ultra), it did stay connected once, but then stopped.

    I rebooted both phones and now all is working fine.

Children
No Data
Related