Thingy91 as a central to ble devices

Hey,

Im have a thingy91 and multiple nrf52840 pcbs.

my goal is to make the thing91 a central device that reads data from the nrf52 devices and sends it over to the cloud.

As i understand in the thingy91 the nrf52840 board will act in the BLE section and the nrf9160 will communicate with the cloud.

I am searching for an example that could help me.
Till now i found only the lte_ble_gateway that sounds what i am looking for.
But this example is primarily for thingy52. how can i use for the thingy91? how do i separate the different sections? BLE-nrf52 and LTE-nrf91?

Parents
  • Hi

    I would start with the LTE gateway sample. If possible I would start with a 9160DK as it has a built in debugger and move to the thingy when have you have something t to test. The thingy 52 is there to create some data to send from a peripheral to a central and over LTE 

    Regards

    Runar

  • i dont have 9160DK development kit, but i do have a JLink for debugging.

    The lte_ble_gateway example is first of all primary for thingy52 (which i dont have).
    But if i do use it, i dont understand what program should i flash to which board.
    if i simply flash it to the nrf91(while SW2 is on nrf91) and SW4 is press (while turning), does it effect the nrf52?

    i dont really understand how the two boards communicate and what i (the program) should do? do i create different programs for different boards and flash them separately?

  • Hi

    Raz_k said:
    The lte_ble_gateway example is first of all primary for thingy52 (which i dont have).

    The sample is for the 9160dk. The thingy52 is there to provide sensordata to transfer. 

    Raz_k said:
    But if i do use it, i dont understand what program should i flash to which board.

    You will need to try to build it for the thingy91, as it is created for the DK you might need to do some adjustments in terms of for example LEDS and GPIO depending on what is used in the project. "

    "This sample is also supported on the Thingy:91. However, it must be programmed using a debugger and a 10-pin SWD cable. Serial communication and firmware updates over serial using MCUboot are not supported in this configuration."

    I think it will be fine to use the thing91. However as you are not using the thing52 you will need to adjust the BLE sensor part according to your needs. 

    When i think about it, it might be that the Connectivity bridge sample is an easier start. See Michals reply here https://devzone.nordicsemi.com/f/nordic-q-a/101148/purpose-of-nrf52840-on-thingy-91?ReplySortBy=CreatedDate&ReplySortOrder=Ascending

    Regards

    Runar

  • Thanks,
    I think now i understand better the thingy91.
    I was able to activate the asset tracker with my personal sim, to set if my sim.
    Haven't tried Connectivity bridge yet.

    I'm currently tring to activate the lte_ble_gateway.

    I'm following lte_ble_gateway on Thingy 91 (v1.9.1), specifically  answer.
    these are my steps:

    With ncs1.9.0
    connected a 10 pin debugger (J-link).

    switch to nrf52
    Turn on
    nrfjprog -f nRF52 --eraseall
    inside 
    hci_lpuart/build/zephyr
    nrfjprog -f nRF52 --program zephyr.hex --verify --reset --log
    Turn off

    switch to nrf91
    Turn on
    nrfjprog -f nRF91 --eraseall
    inside lte_ble_gateway/build/zephyr
    nrfjprog -f nRF91 --program merged.hex --verify --reset --log
    Turn off
    Turn on

    All files were flashed properly.
    But i can see any feedback from the thingy, meaning no led, no prints using my segger j-link viewer and the device isnt recognized as connected in the nrf cloud.

  • Hi, just to verify, its due to the modem you are using NCS 1.9? 

    Is there no log from either the 9160 or the 52840? Could you try to enable logging over RTT and see if you see anything

    Regards

    Runar

Reply Children
  • Hey,

    I started by using NCS 2.6.0V and i got to the same result, no prints nor connection to nrf cloud.
    while searching for the answer on this issue i came across this issue, therefore i wanted to follow his steps.

    I tried the serial LTE modem example and i did received prints.

    according to serial LTE modem I added this on both prj.conf files:

    # General config
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=3
    CONFIG_STACK_SENTINEL=y
    CONFIG_PICOLIBC_IO_FLOAT=y
    CONFIG_RING_BUFFER=y

    # Segger RTT
    CONFIG_USE_SEGGER_RTT=y
    # Where console messages (printk) are output.
    # By itself, SLM does not output any.
    CONFIG_RTT_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    # Where SLM logs are output.
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    But still there is no log from either the 9160 or the 52840.
    by the way in the issue i added, , says that the relevant configurations are already in the .conf of each nrf52 and nrf91.

  • Hi,

    You could try to disable uart1 in thingy91 dts files as shown in this pull request (commits) and this ticket.

    Best regards,
    Dejan

Related