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
  • Hello

    What phone and OS are you using when the connection doesn't work? It could be the case that the connection parameters aren't compatible with your phone OS or something similar.

    If you could set up a BLE sniffer and share logs of the communication between your devices as the disconnection happens, that would be very helpful.

    Best regards,

    Einar

  • Hi,

    I have a Samsung S21 5G with Android version 13. My computer runs Windows 10.

    Now I have installed the BLE Sniffer and captured some communication. In this file I should have recorded two attempts to connect.

    Best regards,
    Lars

    4214.Capture.pcapng

  • In what way does Samsung not follow the standard? It seems it is LL_CONNECTION_UPDATE_IND with 7.5 ms that is the problem. But the information about CONFIG_BT_PERIPHERAL_PREF_MIN_INT says that the connection interval can be 7.5 ms. So why does it not work?

    I'm wondering what could be expected if I develop a device that will be used by a lot of customers. Then for sure some will get connection problem. It would not be pleasant if a customer buys a device and his/her phone can't connect. If this is a known issue for some phones this must have happened a lot of times before. Do you know how that is handled? It feels that the safest way to go is to set CONFIG_BT_PHY_UPDATE=n. But then 2M can't be used. Or are there other ways?

    Will a problematic phone model always behave the same way? I mean, if I test another Samsung S21 with an unchanged exercise, will it also fail to connect?

    It might be interesting to know what exact models that have problem. But it would be more interesting to know the proportion between problematic phones and those that work. I guess it's hard to say an exact ratio, but how many phones are known to have connection problems?

    Are there any tablets that also show connection problems?

    I haven't had any problems with with my phone and any Bluetooth devices before. Though, I'm not sure how many that are classic Bluetooth and how many that are BLE.

    Best regards,
    Lars

  • The way it doesn't follow the standard has to do with the timing and sequencing of these update procedures.

    In this specific case, LL_CONNECTION_UPDATE_IND is a procedure that takes several BLE events to complete, but when the phone receives the LL_PHY_REQ from the peripheral it responds to this immediately instead of waiting for LL_CONNECTION_UPDATE_IND to complete first. That's where it violates the specification.

    The phones that are affected are the ones with the same Broadcom Bluetooth controller chipset as your Samsung phone. Possibly devices other than Samsung with the same chipset also.

    This firmware bug has actually been fixed by Broadcom, but Samsung has yet to push this fix to their phones.

    -Einar

  • Thanks a lot Einar for your help! This makes sense.

    I try to find the name of the chipset, but I'm not sure if I'm successful. Do you know if it is BCM4389? It seems to be for the Ultra-version of S21, but maybe it's also for the one just named S21 (SM-G991B/DS).

    /Lars

  • I have also stumbled into this issue with a Samsung 21. Works fine with a Sony Experia.

    I have tried Lars approach of setting: 

    CONFIG_BT_PHY_UPDATE=n
    But to no avail. I got the same behaviour on the Samsung regardless.
    But alas, removing the bond and restarting the phone makes it work!
    Hopefully this can save someone else some time...
  • This might be worth mentioning in the excersice FAQ as the Samsung S21 is a rather common device.

    Any knowledge if this is resolved in later bt-stacks from Samsung?

Reply Children
No Data
Related