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

nRF9160: LTE Sensor Gateway on Thingy:91

I am trying to fun the LTE Sensor Gateway on the Thingy:91.

The boards are missing from zephyr so I copied nrf52840_pca20035 and nrf9160_pca20035 from ncs\nrf\boards\arm.

When running samples/bluetooth/hci_uart.

The BLE and UART don't seem to be configured correctly. I get "warning: BT_CTLR_DTM_HCI" and "warning: BT_CTLR_ASSERT_HANDLER".

I created ncs\zephyr\samples\bluetooth\hci_uart\nrf52840_pca20035.overlay based on https://devzone.nordicsemi.com/f/nordic-q-a/51693/hci_uart-on-thingy-91

This still doesn't work.

Adding the lines below to nfr52840_pca20035\Kconfig.defconfig seem to fix the BLE issues? UART is not working so, I don't know if it is working.

config BT_CTLR
default BT

When running samples/nrf9160/lte_ble_gateway I get errors "warning: UART_2_NRF_UARTE" and "warning: UART_2_NRF_FLOW_CONTROL"

I see that nrf9160_pca20035ns.overlay is missing from the folder but I am not sure how to modify it. There is no status light configured. 

Help?

  • Hey 

    I was on master commit d4a23f96221fce9bff846a2979d304c0130d6b74 when the patch was made

    Thank you for shedding some light on the operation and behind the scenes of this patch. Firstly, I created a new branch with this commit:

    git checkout -b master_thingy91 d4a23f96221fce9bff846a2979d304c0130d6b74

    Then updated with west, but the same sequence of errors are still present when I "git apply" in the root of the respective directories. Am I doing this correctly?

    The Thingy:52 advertises with a specific UUID in the advertising packet.
    This does not apply here.

    Perfect! Thank you!

    Kindest Regards, 

    Arch

  • Update:

    I was able to get the Thingy:52 to connect to the Thingy:91 successfully, and after some time the simulated GPS data was pushed to the cloud and populated in the Asset Tracker Card. Orientation tracking also seems to work quite well. 

  • Looking forward to the new patch now that it appears v1.1 has been tagged.

  • Hi Sigurd,

    I am new to thingy91. 

    And I am doing one of customer project and need to get the BLE values from nRF52840 to nRF9160 (PCA20035).

    So, as suggested above, I have flashed "nRF52840_pca20035_hci_uart.hex" on  nRF52840 SoC (PCA20035) and "nRF9160_pca20035_lte_ble_gateway.hex" on nRF9160 SiP (PCA20035), but unfortunately I did NOT see any logs from nRF9160 and nRF52840 on Teraterm.

    NOTE: I have flashed via nRF9160 DK (10090) using SWD cable.

    I have tried to connect the Thingy91 (PCA20035) to PC using USB cable, but did NOT see any USB ports to get the logs. 

    Please let me know If i am missing anything here to establish the connection between nRF52840 and nRF9160 on Thingy91 (PCA20035).

    Thanks

  • UPDATE for NCS v1.1.0:

    As promised, here are the updated patch files for NCS v1.1.0:

    lte_gateway_thingy91_v1.1.0_R2.zip

    New in these patch files, compared to the last patch, is added support for logging over UART. So now you can use LTE link monitor with the lte_ble_gateway sample on Thingy:91, both for AT-commands and logging. This was done by merging the hci_uart sample with the usb_uart_bridge sample, into a new sample called hci_uart_with_usb_uart_bridge. Select PCA20035 in the LTE link monitor for this. 

    List over new and modified files in the patch:

    In the nrf repo, the following files are new or modified:
    
            new file:   boards/arm/nrf52840_pca20035/CMakeLists.txt
            modified:   boards/arm/nrf52840_pca20035/Kconfig
            modified:   boards/arm/nrf52840_pca20035/Kconfig.defconfig
            new file:   boards/arm/nrf52840_pca20035/board.c
            modified:   boards/arm/nrf52840_pca20035/nrf52840_pca20035.dts
            modified:   boards/arm/nrf52840_pca20035/nrf52840_pca20035_defconfig
            modified:   boards/arm/nrf9160_pca20035/CMakeLists.txt
            modified:   boards/arm/nrf9160_pca20035/Kconfig
            new file:   boards/arm/nrf9160_pca20035/nrf52840_reset.c
            modified:   samples/nrf9160/lte_ble_gateway/CMakeLists.txt
            modified:   samples/nrf9160/lte_ble_gateway/child_secure_partition_manager.conf
            new file:   samples/nrf9160/lte_ble_gateway/nrf9160_pca20035ns.overlay
            modified:   samples/nrf9160/lte_ble_gateway/prj.conf
            new file:   samples/nrf9160/spm/nrf9160_pca20035.overlay
    		
    In zephyr repo, the following files are new:
    		new file:   samples/bluetooth/hci_uart_with_usb_uart_bridge/CMakeLists.txt
            new file:   samples/bluetooth/hci_uart_with_usb_uart_bridge/nrf52840_pca20035.conf
            new file:   samples/bluetooth/hci_uart_with_usb_uart_bridge/nrf52840_pca20035.overlay
            new file:   samples/bluetooth/hci_uart_with_usb_uart_bridge/src/main.c

    Make sure that you are on the v1.1.0 tag when applying the patch with git apply. If you are for some reason not able to apply the patch, then I recommend manually changing the files shown in the patch.

    Also make sure to update the modem firmware on the nRF9160 to v1.1.0 (download from here)

    By the default, the GPS simulator is used in the lte_ble_gateway sample. If you are planning to use the real GPS, it's recommend to update to bsdlib v0.5.1 (make this change, and run west update)

    Note that the COM-port is re-enumerated if the nRF9160 resets the nRF52840.

    It's also recommend to add your Thingy:91 to nRFCloud before testing the lte_ble_gateway.

    The lte_ble_gateway will send data to the cloud when the orientation of Thingy:52 gets flipped(Orientation: 3). If you want to send the data on e.g. button-push also, you can add this code to the bottom of gps_trigger_handler()

    	if(has_changed)
    	{
    		alarm();
    	}

    EDIT: Replaced "lte_gateway_thingy91_v1.1.0.zip" with a new version. The power_thread() in hci_uart_with_usb_uart_bridge was removed, so that the sample also works when the USB cable is detached from the Thingy91.

    BR,

    Sigurd

Related