lte_ble_gateway fails with NCS 2.2 and thingy:91 rev 1.6.0


Hi!

I am building an application that is based on the lte_ble_gateway which works perfectly on the nrf9160dk. However, it does not work on the thingy:91.
The error is also present in the unmodified lte_ble_gateway sample, so it should be easy to reproduce.

I am trying to run lte_ble_gateway to a thingy:91 rev 1.6.0, but get the following error message when running the application:
** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.487,274] <inf> lte_ble_gw: LTE Sensor Gateway sample started
[00:00:00.487,426] <inf> lte_ble_gw: Initializing Bluetooth..
[00:00:00.504,943] <inf> lte_ble_gw: Establishing LTE link (this may take some time) ...
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:329
k_sem_take failed with err -11
[00:00:10.497,924] <err> os: r0/a1: 0x00000003 r1/a2: 0x00000000 r2/a3: 0x00000002
[00:00:10.497,955] <err> os: r3/a4: 0x2000e168 r12/ip: 0x20016e78 r14/lr: 0x000223b3
[00:00:10.497,955] <err> os: xpsr: 0x41000000
[00:00:10.497,985] <err> os: Faulting instruction address (r15/pc): 0x000223be
[00:00:10.498,016] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:10.498,046] <err> os: Current thread: 0x2000eea0 (unknown)
[00:00:10.720,733] <err> fatal_error: Resetting system

Output from nrf52840:
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.000,671] <inf> sdc_hci_driver: SoftDevice Controller build revision:
6d 90 41 2a 38 e8 ad 17 29 a5 03 38 39 27 d7 85 |m.A*8... )..89'..
1f 85 d8 e1 |....
[00:00:00.001,312] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
[00:00:01.001,373] <wrn> lpuart: Tx timeout
[00:00:02.002,166] <wrn> lpuart: Tx timeout
[00:00:03.002,990] <wrn> lpuart: Tx timeout
[00:00:04.003,814] <wrn> lpuart: Tx timeout
[00:00:05.004,638] <wrn> lpuart: Tx timeout
[00:00:06.005,462] <wrn> lpuart: Tx timeout
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.000,671] <inf> sdc_hci_driver: SoftDevice Controller build revision:
6d 90 41 2a 38 e8 ad 17 29 a5 03 38 39 27 d7 85 |m.A*8... )..89'..
1f 85 d8 e1 |....
[00:00:00.001,312] <inf> bt_hci_raw: Bluetooth enabled in RAW mode

I build lte_ble_gateway with the command:
west build --board [email protected]

and hci_lpuart:
west build --board [email protected]

I have managed to get the sample working for the nrf9160DK earlier (Where I had to build with west build --board [email protected] for hci_lpuart and [email protected] for lte_ble_gateway)

I have looked at this post, but it is not an option to downgrade to NCS 1.9.X: devzone.nordicsemi.com/.../382953

Additionally, it is really tidious to debug as the flashing process fails 70% of the time and the nrf9160dk disappears from discovered devices, which means that I must reboot my computer. Any tips on this would also be greatly appreciated.

Thanks in advance for your help.

Parents
  • Hi,

    You could try to disable UART for MCUboot. To do this you could add an overlay file mcuboot.overlay in the child image folder for both hci_lpuart and lte_ble_gateway.

    &uart1 {
    	/delete-property/ rts-pin;
    	/delete-property/ cts-pin;	
    	/delete-property/ hw-flow-control;
    	status = "disabled";
    };


    Best regards,
    Dejan

  • Unfortunately, that doesn't seem to solve the issue. I also get these warnings when compiling if it is relevant:

    HCI_LPUART:
    warning: BT_CTLR_DTM_HCI (defined at subsys/bluetooth\controller\Kconfig.dtm:14) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: BT_CTLR_DTM_HCI_SUPPORT (=n).
    See docs.zephyrproject.org/.../kconfig.html and/or look up
    BT_CTLR_DTM_HCI in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.

    warning: BOOTLOADER_MCUBOOT (defined at C:/Users/jonat/ncs/v2.2.0/nrf/modules/trusted-firmware-m/Kconfig:178, Kconfig.zephyr:745) was assigned the value 'y' but got the value 'n'. Check
    these unsatisfied dependencies: (BUILD_WITH_TFM || !MCUBOOT) (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    BOOTLOADER_MCUBOOT in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.

    LTE_BLE_GATEWAY:
    CMake Warning at C:/Users/jonat/ncs/v2.2.0/zephyr/cmake/modules/boards.cmake:127 (message):
    Board revision 1.6.0 specified for thingy91_nrf9160, but board has no
    revision so revision will be ignored.
    Call Stack (most recent call first):
    C:/Users/jonat/ncs/v2.2.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
    C:/Users/jonat/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/Users/jonat/ncs/v2.2.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:44 (find_package)

  • Hi,

    Have you tried using NCS v2.3.0 and v2.4.0?

    Best regards,
    Dejan

  • I tried with NCS 2.4.1 now and get another error (which I don't think is related to this issue):

    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.255,798] <inf> lte_ble_gw: LTE Sensor Gateway sample started
    [00:00:00.255,950] <inf> lte_ble_gw: Initializing Bluetooth..
    [00:00:00.266,235] <wrn> lpuart: req pin low when expected high
    [00:00:00.266,357] <err> lpuart: Empty receiver state:4
    [00:00:00.267,181] <err> nrf_cloud_client_id: Failed to obtain IMEI, error: -1
    [00:00:00.267,211] <err> nrf_cloud_transport: Could not obtain configured client ID, error: -1
    ASSERTION FAIL [err == 0] @ ../src/main.c:464
    nRF Cloud library could not be initialized.
    [00:00:00.267,303] <err> os: r0/a1: 0x00000004 r1/a2: 0x000001d0 r2/a3: 0x00000009
    [00:00:00.267,303] <err> os: r3/a4: 0x2000d410 r12/ip: 0x2001640c r14/lr: 0x0001b813
    [00:00:00.267,333] <err> os: xpsr: 0x41000000
    [00:00:00.267,364] <err> os: Faulting instruction address (r15/pc): 0x00043582
    [00:00:00.267,395] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.267,425] <err> os: Current thread: 0x2000f830 (unknown)
    [00:00:00.662,597] <err> fatal_error: Resetting system

    Therefore, I tested with my own version that doesn't use nrf cloud where I get the following error:

    ASSERTION FAIL [err >= 0] @ WEST_TOPDIR/nrf/drivers/serial/uart_nrf_sw_lpuart.c:386
    [00:00:12.256,530] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000182 r2/a3: 0x0000001f
    [00:00:12.256,561] <err> os: r3/a4: 0x2000d538 r12/ip: 0x200138c0 r14/lr: 0x0002e741
    [00:00:12.256,591] <err> os: xpsr: 0x61000041
    [00:00:12.256,591] <err> os: Faulting instruction address (r15/pc): 0x0003d986
    [00:00:12.256,652] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:12.256,683] <err> os: Fault during interrupt handling

    [00:00:12.256,713] <err> os: Current thread: 0x2000d428 (unknown)
    [00:00:13.086,456] <err> fatal_error: Resetting system
    [00:00:12.252,471] <err> lpuart: Empty receiver state:3
    --- 9999 messages dropped ---
    [00:00:12.252,655] <err> lpuart: Empty receiver state:3
    [00:00:12.252,838] <err> lpuart: Empty receiver state:3
    [00:00:12.253,021] <err> lpuart: Empty receiver state:3
    [00:00:12.253,204] <err> lpuart: Empty receiver state:3
    [00:00:12.253,387] <err> lpuart: Empty receiver state:3
    [00:00:12.253,570] <err> lpuart: Empty receiver state:3
    [00:00:12.253,753] <err> lpuart: Empty receiver state:3
    [00:00:12.253,936] <err> lpuart: Empty receiver state:3
    [00:00:12.254,119] <err> lpuart: Empty receiver state:3
    [00:00:12.254,302] <err> lpuart: Empty receiver state:3
    [00:00:12.254,486] <err> lpuart: Empty receiver state:3
    [00:00:12.254,669] <err> lpuart: Empty receiver state:3
    [00:00:12.254,852] <err> lpuart: Empty receiver state:3
    [00:00:12.255,035] <err> lpuart: Empty receiver state:3
    [00:00:12.255,218] <err> lpuart: Empty receiver state:3
    [00:00:12.255,401] <err> lpuart: Empty receiver state:3
    [00:00:12.255,584] <err> lpuart: Empty receiver state:3
    [00:00:12.255,767] <err> lpuart: Empty receiver state:3
    [00:00:12.255,950] <err> lpuart: Empty receiver state:3
    [00:00:12.256,134] <err> lpuart: Empty receiver state:3
    [00:00:12.256,317] <err> lpuart: Empty receiver state:3
    [00:00:12.256,500] <err> lpuart: Empty receiver state:3
    ASSERTION FAIL [err >= 0] @ WEST_TOPDIR/nrf/drivers/serial/uart_nrf_sw_lpuart.c:386
    [00:00:12.256,622] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000182 r2/a3: 0x0000001f
    [00:00:12.256,652] <err> os: r3/a4: 0x2000d538 r12/ip: 0x200138c0 r14/lr: 0x0002e741
    [00:00:12.256,683] <err> os: xpsr: 0x61000041
    [00:00:12.256,683] <err> os: Faulting instruction address (r15/pc): 0x0003d986

  • Hi,

    Could you please provide logs from both nrf52840 and nrf9160 on Thingy91 using NCS v2.4.0?

    Best regards,
    Dejan

  • Is NCS v2.4.1 okay?

    nrf52840:

    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,946] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,556] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,915] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,556] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,915] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,586] <inf> bt_hci_raw: Bluetooth enabled in RAW mode

    nrf9160:

    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.255,767] <inf> lte_ble_gw: LTE Sensor Gateway sample started
    [00:00:00.255,920] <inf> lte_ble_gw: Initializing Bluetooth..
    [00:00:00.266,235] <wrn> lpuart: req pin low when expected high
    [00:00:00.266,357] <err> lpuart: Empty receiver state:4
    [00:00:00.267,181] <err> nrf_cloud_client_id: Failed to obtain IMEI, error: -1
    [00:00:00.267,211] <err> nrf_cloud_transport: Could not obtain configured client ID, error: -1
    ASSERTION FAIL [err == 0] @ ../src/main.c:464
    nRF Cloud library could not be initialized.
    [00:00:00.267,272] <err> os: r0/a1: 0x00000004 r1/a2: 0x000001d0 r2/a3: 0x00000009
    [00:00:00.267,303] <err> os: r3/a4: 0x2000d410 r12/ip: 0x2001640c r14/lr: 0x0001b813
    [00:00:00.267,333] <err> os: xpsr: 0x41000000
    [00:00:00.267,364] <err> os: Faulting instruction address (r15/pc): 0x00043582
    [00:00:00.267,395] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.267,425] <err> os: Current thread: 0x2000f830 (unknown)
    [00:00:00.661,834] <err> fatal_error: Resetting system
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.255,737] <inf> lte_ble_gw: LTE Sensor Gateway sample started

    nrf9160 without nrfcloud:

    [00:00:12.252,166] <err> lpuart: Empty receiver state:3
    --- 9999 messages dropped ---
    [00:00:12.252,349] <err> lpuart: Empty receiver state:3
    [00:00:12.252,532] <err> lpuart: Empty receiver state:3
    [00:00:12.252,716] <err> lpuart: Empty receiver state:3
    [00:00:12.252,899] <err> lpuart: Empty receiver state:3
    [00:00:12.253,082] <err> lpuart: Empty receiver state:3
    [00:00:12.253,265] <err> lpuart: Empty receiver state:3
    [00:00:12.253,448] <err> lpuart: Empty receiver state:3
    [00:00:12.253,631] <err> lpuart: Empty receiver state:3
    [00:00:12.253,814] <err> lpuart: Empty receiver state:3
    [00:00:12.253,997] <err> lpuart: Empty receiver state:3
    [00:00:12.254,180] <err> lpuart: Empty receiver state:3
    [00:00:12.254,364] <err> lpuart: Empty receiver state:3
    [00:00:12.254,547] <err> lpuart: Empty receiver state:3
    [00:00:12.254,730] <err> lpuart: Empty receiver state:3
    [00:00:12.254,913] <err> lpuart: Empty receiver state:3
    [00:00:12.255,096] <err> lpuart: Empty receiver state:3
    [00:00:12.255,279] <err> lpuart: Empty receiver state:3
    [00:00:12.255,462] <err> lpuart: Empty receiver state:3
    [00:00:12.255,645] <err> lpuart: Empty receiver state:3
    [00:00:12.255,828] <err> lpuart: Empty receiver state:3
    [00:00:12.256,011] <err> lpuart: Empty receiver state:3
    [00:00:12.256,195] <err> lpuart: Empty receiver state:3
    ASSERTION FAIL [err >= 0] @ WEST_TOPDIR/nrf/drivers/serial/uart_nrf_sw_lpuart.c:386
    [00:00:12.256,317] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000182 r2/a3: 0x0000001f
    [00:00:12.256,347] <err> os: r3/a4: 0x2000d538 r12/ip: 0x200138c0 r14/lr: 0x0002e741
    [00:00:12.256,378] <err> os: xpsr: 0x61000041
    [00:00:12.256,378] <err> os: Faulting instruction address (r15/pc): 0x0003d986
    [00:00:12.256,439] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:12.256,469] <err> os: Fault during interrupt handling

    [00:00:12.256,500] <err> os: Current thread: 0x2000d428 (unknown)
    [00:00:13.086,242] <err> fatal_error: Resetting system
    [00:00:12.252,471] <err> lpuart: Empty receiver state:3
    --- 9999 messages dropped ---
    [00:00:12.252,655] <err> lpuart: Empty receiver state:3
    [00:00:12.252,838] <err> lpuart: Empty receiver state:3
    [00:00:12.253,021] <err> lpuart: Empty receiver state:3
    [00:00:12.253,204] <err> lpuart: Empty receiver state:3
    [00:00:12.253,387] <err> lpuart: Empty receiver state:3

Reply
  • Is NCS v2.4.1 okay?

    nrf52840:

    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,946] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,556] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,915] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,556] <inf> bt_hci_raw: Bluetooth enabled in RAW mode
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.000,915] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    e0 7e 2e c1 5e 05 85 23 46 15 dc fa 8e 29 7d 70 |.~..^..# F....)}p
    10 93 a5 fc |....
    [00:00:00.001,586] <inf> bt_hci_raw: Bluetooth enabled in RAW mode

    nrf9160:

    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.255,767] <inf> lte_ble_gw: LTE Sensor Gateway sample started
    [00:00:00.255,920] <inf> lte_ble_gw: Initializing Bluetooth..
    [00:00:00.266,235] <wrn> lpuart: req pin low when expected high
    [00:00:00.266,357] <err> lpuart: Empty receiver state:4
    [00:00:00.267,181] <err> nrf_cloud_client_id: Failed to obtain IMEI, error: -1
    [00:00:00.267,211] <err> nrf_cloud_transport: Could not obtain configured client ID, error: -1
    ASSERTION FAIL [err == 0] @ ../src/main.c:464
    nRF Cloud library could not be initialized.
    [00:00:00.267,272] <err> os: r0/a1: 0x00000004 r1/a2: 0x000001d0 r2/a3: 0x00000009
    [00:00:00.267,303] <err> os: r3/a4: 0x2000d410 r12/ip: 0x2001640c r14/lr: 0x0001b813
    [00:00:00.267,333] <err> os: xpsr: 0x41000000
    [00:00:00.267,364] <err> os: Faulting instruction address (r15/pc): 0x00043582
    [00:00:00.267,395] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.267,425] <err> os: Current thread: 0x2000f830 (unknown)
    [00:00:00.661,834] <err> fatal_error: Resetting system
    *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    [00:00:00.255,737] <inf> lte_ble_gw: LTE Sensor Gateway sample started

    nrf9160 without nrfcloud:

    [00:00:12.252,166] <err> lpuart: Empty receiver state:3
    --- 9999 messages dropped ---
    [00:00:12.252,349] <err> lpuart: Empty receiver state:3
    [00:00:12.252,532] <err> lpuart: Empty receiver state:3
    [00:00:12.252,716] <err> lpuart: Empty receiver state:3
    [00:00:12.252,899] <err> lpuart: Empty receiver state:3
    [00:00:12.253,082] <err> lpuart: Empty receiver state:3
    [00:00:12.253,265] <err> lpuart: Empty receiver state:3
    [00:00:12.253,448] <err> lpuart: Empty receiver state:3
    [00:00:12.253,631] <err> lpuart: Empty receiver state:3
    [00:00:12.253,814] <err> lpuart: Empty receiver state:3
    [00:00:12.253,997] <err> lpuart: Empty receiver state:3
    [00:00:12.254,180] <err> lpuart: Empty receiver state:3
    [00:00:12.254,364] <err> lpuart: Empty receiver state:3
    [00:00:12.254,547] <err> lpuart: Empty receiver state:3
    [00:00:12.254,730] <err> lpuart: Empty receiver state:3
    [00:00:12.254,913] <err> lpuart: Empty receiver state:3
    [00:00:12.255,096] <err> lpuart: Empty receiver state:3
    [00:00:12.255,279] <err> lpuart: Empty receiver state:3
    [00:00:12.255,462] <err> lpuart: Empty receiver state:3
    [00:00:12.255,645] <err> lpuart: Empty receiver state:3
    [00:00:12.255,828] <err> lpuart: Empty receiver state:3
    [00:00:12.256,011] <err> lpuart: Empty receiver state:3
    [00:00:12.256,195] <err> lpuart: Empty receiver state:3
    ASSERTION FAIL [err >= 0] @ WEST_TOPDIR/nrf/drivers/serial/uart_nrf_sw_lpuart.c:386
    [00:00:12.256,317] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000182 r2/a3: 0x0000001f
    [00:00:12.256,347] <err> os: r3/a4: 0x2000d538 r12/ip: 0x200138c0 r14/lr: 0x0002e741
    [00:00:12.256,378] <err> os: xpsr: 0x61000041
    [00:00:12.256,378] <err> os: Faulting instruction address (r15/pc): 0x0003d986
    [00:00:12.256,439] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:12.256,469] <err> os: Fault during interrupt handling

    [00:00:12.256,500] <err> os: Current thread: 0x2000d428 (unknown)
    [00:00:13.086,242] <err> fatal_error: Resetting system
    [00:00:12.252,471] <err> lpuart: Empty receiver state:3
    --- 9999 messages dropped ---
    [00:00:12.252,655] <err> lpuart: Empty receiver state:3
    [00:00:12.252,838] <err> lpuart: Empty receiver state:3
    [00:00:12.253,021] <err> lpuart: Empty receiver state:3
    [00:00:12.253,204] <err> lpuart: Empty receiver state:3
    [00:00:12.253,387] <err> lpuart: Empty receiver state:3

Children
Related