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.

  • Hi,
    This is the zephyr.dts found in build/zephyr/zephyr.dts of the 'hci_lpuart' sample.

    What does a typical generated dts look like ?

    I build this on the ncs and toolchain V2.5.1 on a thingy91_nrf9160_ns and thingy91_nrf52840.

    You can find here my projects.

    test_bt_ncs5.1.zip

    Many Thanks

  • Hi,

    That is the correct file, thank you for confirming. I was confused by it because the configurations include the symbol and flag names, rather than the encoded values I'm used to seeing in the generated DTS files. As an example, here is what the pin assignments look like in my zephyr.dts:

    		uart0_default: uart0_default {
    			phandle = < 0x2 >;
    			group1 {
    				psels = < 0xf >, < 0x1000b >, < 0x20015 >, < 0x30014 >;
    			};
    		};
    		uart0_sleep: uart0_sleep {
    			phandle = < 0x3 >;
    			group1 {
    				psels = < 0xf >, < 0x1000b >, < 0x20015 >, < 0x30014 >;
    				low-power-enable;
    			};
    		};

    Compared to the more readable output you got:

                    uart0_default: uart0_default {
                            group1 {
                                    psels = <NRF_PSEL(UART_TX, 0, 15)>,
                                            <NRF_PSEL(UART_RX, 0, 11)>,
                                            <NRF_PSEL(UART_RTS, 0, 21)>,
                                            <NRF_PSEL(UART_CTS, 0, 20)>;
                            };
    
                    };
    
                    uart0_sleep: uart0_sleep {
                            group1 {
                                    psels = <NRF_PSEL(UART_TX, 0, 15)>,
                                            <NRF_PSEL(UART_RX, 0, 11)>,
                                            <NRF_PSEL(UART_RTS, 0, 21)>,
                                            <NRF_PSEL(UART_CTS, 0, 20)>;
                                    low-power-enable;
                            };
    
                    };

    Anyway, I reveiwed the build files you uploaded, and I see that you have not applied this patch https://github.com/nrfconnect/sdk-nrf/pull/13407 Dejan recommended further down in this thread. This patch should fix the com. issue you're seeing.

Related