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

BLE connection problems with some Android devices

I'm using nRF5340 to provide Bluetooth connection to other devices. Almost all Android devices connect correctly, for example: Samsung S21, LG G8X, Xiaomi Mi Mix 2.  However, there are devices don't connect, for example: Zen Fone 4, Xiaomi Mi Mix 3. Could you please help me to debug?

Parents Reply Children
  • Hi Jonathan, I'm part of this development group as well.

    Can the nRF5340-PDK board be used with the Sniffer tool? If not, maybe the nRF5340-DK?
    I looked at the list of boards here and those are not included, although I suspect they have the necessary hardware.
    https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE
    Regards

    Bruno

  • Hi Bruno,

    There is no support for the nrf53 in nRF sniffer at the moment. 

    You can check out the dongle: Buy Nordic Semiconductor products online - nordicsemi.com


    if it is a custom board\device are you using external crystals or the internal ?

    Regards,
    Jonathan

  • It is a custom board, but the nRF IC is pre-assembled in a Fanstel BT40E module.
    As for sniffing, I'll ask my colleague to check if he has a nRF52840 board at hand and we will get back here, just so that we can have some progress before waiting for the delivery of a dongle.

  • Oki thanks for the update. 

    As for reason to why some  phones might not work is because if the clock on the device is on the edge of what is ok and the phone is also somewhat inaccurate then the difference might be to big and the devices are not able to properly communicate.  Sometimes phones use some cheaper components and the tolerances are not as good.  This might be one reason for why Zen Fone 4, Xiaomi Mi Mix 3 do not seem to connect. 

    Where you able to test with more than one Zen Fone 4and Xiaomi Mi Mix 3 ?

    Regards,
    Jonathan

  • Hi, Jonathan!

    We sniffered our BLE connection problem. I will add here our rtt_viewer_log and our nRF_connect_log (nRF Connect Desktop).  

    Could you please verify? Thanks!

    # SEGGER J-Link RTT Viewer V7.54 Terminal Log File
    # Compiled: 10:44:59 on Sep  1 2021
    # Logging started @ 20 Sep 2021 19:15:00
    00> [00:00:00.156,829] <err> i2c_nrfx_twim: Error 195952641 occurred for message 1
    00> [00:00:00.156,860] <err> ssd1306: Failed to initialize device!
    00> [00:00:00.164,642] <inf> BNO055: initializing BNO055
    00> [00:00:00.568,542] <inf> BNO055: CHIP ID OK (BNO055)
    00> [00:00:00.569,396] <inf> BNO055: ACCEL ID OK (BNO055)
    00> [00:00:00.570,281] <inf> BNO055: MAG ID OK (BNO055)
    00> [00:00:00.571,166] <inf> BNO055: GYRO ID OK (BNO055)
    00> [00:00:00.572,906] <inf> BNO055: SW Rev: 785
    00> [00:00:00.573,791] <inf> BNO055: Boot Loader Rev: 21
    00> [00:00:00.625,915] <inf> BNO055: Calibration reg read 0
    00> [00:00:00.684,234] <inf> BNO055: Calibration reg read 0
    00> [00:00:00.684,265] <inf> BNO055: Magnetometer: 0 Accelerometer: 0 Gyroscope: 0 System: 0
    00> 
    00> [00:00:00.684,265] <inf> BNO055: BNO055 OK
    00> [00:00:00.684,356] <inf> IIS2ICLX: chip id 0xff
    00> [00:00:00.684,356] <err> IIS2ICLX: Invalid chip id 0xff
    00> [00:00:00.684,356] <err> IIS2ICLX: failed to initialize chip
    00> ***** delaying boot 300ms (per build configuration) *****
    00> 
    00> *** Booting Zephyr OS build v2.4.99-ncs2  (delayed boot 300ms) ***
    00> 
    00> [00:00:00.980,377] <err> lvgl: Display device not found.
    00> [00:00:00.981,506] <inf> MAIN_APP: Main initializing...
    00> [00:00:00.981,506] <inf> MAIN_APP: ============================================
    00> [00:00:00.981,506] <inf> MAIN_APP: Firmware. nRF53 serial df1c92b33463b374
    00> [00:00:00.981,506] <inf> MAIN_APP: Hardware. nRF53 Rev 00005340 514b4141
    00> [00:00:00.981,536] <inf> MAIN_APP: ============================================
    00> [00:00:00.981,536] <inf> MAIN_APP: Reset by pin-reset
    00> [00:00:00.981,597] <inf> MAIN_APP: CPU Clock HW Cycles pes sec 32768
    00> [00:00:00.981,597] <inf> MAIN_APP: CPU System Clock 64000000
    00> [00:00:00.981,628] <inf> MAIN_APP: Version 270
    00> [00:00:00.981,689] <inf> thread_analyzer: Thread analyze:
    00> [00:00:00.981,781] <inf> thread_analyzer:  thread_analyzer     : STACK: unused 349 usage 163 / 512 (31 %); CPU: 0 %
    00> [00:00:00.982,055] <inf> thread_analyzer:  rtc_id              : STACK: unused 2012 usage 36 / 2048 (1 %); CPU: 0 %
    00> [00:00:00.982,330] <inf> thread_analyzer:  led_rgb_thd_id      : STACK: unused 2012 usage 36 / 2048 (1 %); CPU: 0 %
    00> [00:00:00.982,452] <inf> thread_analyzer:  flash_id            : STACK: unused 988 usage 36 / 1024 (3 %); CPU: 0 %
    00> [00:00:00.982,696] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 1868 usage 180 / 2048 (8 %); CPU: 0 %
    00> [00:00:00.982,849] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 988 usage 36 / 1024 (3 %); CPU: 0 %
    00> [00:00:00.983,062] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 1788 usage 260 / 2048 (12 %); CPU: 0 %
    00> [00:00:00.983,337] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 1908 usage 140 / 2048 (6 %); CPU: 0 %
    00> [00:00:00.983,551] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 1508 usage 540 / 2048 (26 %); CPU: 5 %
    00> [00:00:00.983,673] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 948 usage 76 / 1024 (7 %); CPU: 63 %
    00> [00:00:00.983,856] <inf> thread_analyzer:  <log_strdup alloc failed>: STACK: unused 1428 usage 620 / 2048 (30 %); CPU: 30 %
    00> [00:00:01.234,069] <inf> E2PROM: EEPROM Content
    00>                                  81 11 35 57 0e 00 00 00  50 01 00 00 00 47 46 44 |..5W.... P....GFD
    00>                                  36 30 36 37 30 33 34 03  c8 00 00 00 00 00 00 00 |6067034. ........
    00>                                  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |........ ........
    00>                                  00 00 00 00 00 00 00 00  00 00 00 00 a0 40 1e 00 |........ .....@..
    00>                                  00 00 00 40 90 00 00 00  00 00 00 00 00 00 00 00 |...@.... ........
    00>                                  00 4c ff 00 03 10 00 64  66 31 63 39 32 62 33 33 |.L.....d fm
    00> [0m
    00> 0m
    00> [00:00:02.945,190] <inf> BLE_APP: call_infinity BLE Index 0
    00> 
    00> [00:00:02.945,251] <inf> BLE_APP: advertise_start-------------------------------------------------------1
    00> [00:00:02.948,699] <inf> BLE_APP: Advertising successfully started
    00> 
    00> [00:00:02.948,760] <inf> BLE_APP: Starting BLE_INFINITY thread!
    00> 
    00> Cycles: 25
    00> 
    00> Cycles: 27
    00> 
    00> Cycles: 29
    00> 
    00> Cycles: 32
    00> 
    00> Cycles: 35
    00> 
    00> Cycles: 38
    00> 
    00> Cycles: 40
    00> 
    00> Cycles: 43
    00> 
    00> Cycles: 45
    00> 
    00> Cycles: 48
    00> 
    00> Cycles: 51
    00> 
    00> Cycles: 53
    00> 
    00> Cycles: 56
    00> 
    00> Cycles: 58
    00> 
    00> Cycles: 61
    00> 
    00> [00:00:17.008,819] <inf> BLE_APP: Connection type: Slave 139
    00> 
    00> [00:00:17.008,972] <inf> BLE_APP: Try Connected: 6A:F1:60:82:D3:C9 (random), index: 0,
    00> [00:00:17.008,972] <inf> BLE_APP: Connected: 6A:F1:60:82:D3:C9 (random), index: 0,
    00> [00:00:17.009,002] <inf> BLE_APP: Connected: 6A:F1:60:82:D3:C9 (random), tx_phy LE 1M, rx_phy LE 1M
    00> 
    00> [00:00:17.009,002] <inf> BLE_APP: advertise_start-------------------------------------------------------1
    00> [00:00:17.009,002] <err> BLE_APP: Advertising failed to start (err -120)
    00> 
    00> [00:00:17.493,591] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 64
    00> 
    00> [00:00:18.798,522] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 66
    00> 
    00> [00:00:19.743,499] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 68
    00> 
    00> [00:00:20.733,520] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 71
    00> 
    00> [00:00:21.678,497] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 73
    00> 
    00> [00:00:22.488,555] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 75
    00> 
    00> [00:00:23.433,532] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 78
    00> 
    00> [00:00:24.513,641] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 80
    00> 
    00> Cycles: 82
    00> 
    00> Cycles: 85
    00> 
    00> [00:00:27.573,638] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 88
    00> 
    00> [00:00:28.428,588] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 90
    00> 
    00> [00:00:29.418,609] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 93
    00> 
    00> [00:00:30.183,593] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 96
    00> 
    00> [00:00:31.083,557] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> [00:00:31.713,592] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 98
    00> 
    00> Cycles: 100
    00> 
    00> Cycles: 103
    00> 
    00> [00:00:34.863,952] <inf> BLE_APP: Disconnected (reason 0x13)
    00> 
    00> [00:00:34.863,952] <inf> BLE_APP: disconnected-------------------------------------------------------3
    00> [00:00:34.863,952] <inf> BLE_APP: advertise_start-------------------------------------------------------1
    00> [00:00:34.863,983] <err> BLE_APP: Advertising failed to start (err -120)
    00> 
    00> Cycles: 106
    00> 
    00> [00:00:35.204,620] <inf> BLE_APP: Connection type: Slave 139
    00> 
    00> [00:00:35.204,742] <inf> BLE_APP: Try Connected: 6A:F1:60:82:D3:C9 (random), index: 1,
    00> [00:00:35.204,742] <inf> BLE_APP: Connected: 6A:F1:60:82:D3:C9 (random), index: 1,
    00> [00:00:35.204,772] <inf> BLE_APP: Connected: 6A:F1:60:82:D3:C9 (random), tx_phy LE 1M, rx_phy LE 1M
    00> 
    00> [00:00:35.204,772] <inf> BLE_APP: advertise_start-------------------------------------------------------1
    00> [00:00:35.204,803] <err> BLE_APP: Advertising failed to start (err -120)
    00> 
    00> [00:00:35.583,709] <inf> BLE_APP: Security failed: 6A:F1:60:82:D3:C9 (random) level 1 err 8
    00> 
    00> Cycles: 109
    00> 
    00> Cycles: 112
    00> 
    00> Cycles: 115
    00> 
    00> [00:00:38.688,995] <inf> BLE_APP: Disconnected (reason 0x13)
    00> 
    00> [00:00:38.689,025] <inf> BLE_APP: disconnected-------------------------------------------------------3
    00> [00:00:38.689,025] <inf> BLE_APP: advertise_start-------------------------------------------------------1
    00> [00:00:38.689,025] <err> BLE_APP: Advertising failed to start (err -120)
    00> 
    00> Cycles: 119
    00> 
    
    # Logging stopped @ 20 Sep 2021 19:15:47
    
    nRF_connect_log_2021-09-20T21_54_44.619Z-log.txt

Related