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

BLE connection not working with smartphone but with Dongle

Hi Nordic Team,

We are working with two nrf52840 chips that communicate with each other via gazell. To change system settings we write characteristics via BLE. Recently we noticed a weird behavior and we have not been able to fix it.

If we activate BLE on one chip (the GZLL-device in our gazell connection) and try to connect it to a smartphone the chip freezes and has to be restarted.

The interesting thing is that it only happens when connecting to smartphones (both IOS and android) but not with the BLE-dongle and PC. Furthermore it´s working on the GZLL-host despite both running the same BLE code. When flashing the GZLL-host software on the GZLL-device chip everything is fine so the problem must lie somewhere in the non-BLE code.

We tried stepping through it with our debugger but since the BLE process is so time-critical we weren't able to spot what exactly is causing the problem. However, we always ended up in: app_error_weak.c - NRF_BREAKPOINT_COND.

We suppose that there are some interrupts or timers in the background that interfere with the BLE connection.

Do you have any ideas about what might cause the problem and how we could fix it?

Parents Reply
  • Hi Kenneth, thank you for your fast reply and your inputs.

    We are already building with DEBUG. We actually do end up in app_error_fault_handler() when debugging. However, there is no error information available. The variable values in app_error_save_and_stop() are:

    The error id is NRF_FAULT_ID_SD_ASSERT which seems to be caused (or at least influenced) by the debugging and not by the original problem itself according to this answer:
    https://devzone.nordicsemi.com/f/nordic-q-a/36021/nrf_fault_id_sd_assert.
    If we just let the chip run and stop the debugger once It freezes we are stuck in a HardFault_Handler in gcc_startup_nrf52840.S, line 300.

    We use the same antenna for GAZELL and BLE but we do not use them simultaneously. We experience the same problem even if start BLE right after rebooting and never activate GAZELL.

Children
Related