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

Thingy91 nRF9160 and nRF52840 communication

Hi 

I am working on a project based on Thingy91. Is there any sample application in NCS SDK to show the communication between the two SoCs on the Thiny91. I will need to transfer the user input data(write to the utility files,readme.txt, config.txt on Thingy91) from USB to nRF52840 and then to nRF9160.

Face

  • Hi Face, 

    From your description, you want to write to e.g. readme.txt, and then send what you wrote to the nRF91? From what I have understood, this is not possible with the current version of Connectivity Bridge.

    Kind regards,
    Øyvind

  • Øyvind,

    Correct. Can we use the Thingy91 as a USB mass storage? Can't those utilities files of Connectivity Bridge be written from the PC's USB or just read only?

    We would like to have an physical interface to the nRF9160 for users to input a few bytes data, which way is the best to do that if USB is not possible? UART?

    Face

  • Face, sorry for the delayed answer. I had a talk with our developers. Their response is, yes, it should be possible to do this. Note that this is something we don't have at the moment. 
    The file structure is handled by /src/disk in Connectivity Bridge. The intention is that each .c file is responsible for writing the file, and parsing the file once the user disconnects the USB disk. Parsing the file can entail sending the contents via UART if you want. Note that it is a bit tricky to determine when it is safe to parse the file. To make things easy on the Thingy, parsing is done once the USB drive is disconnected. Problems could arise if you mount the drive in the firmware, while the USB host also has the drive mounted and may have pending file changes.

    Kind regards,
    Øyvind

  • Thanks for your reply.

    1. I tried to build and load the Connectivity Bridge on to the Thingy and LTE monitor could not detect it while if I load pre-compiled Connectivity Bridge hex. LTE monitor can find it. Are the UARTs disabled by default in the Connectivity Bridge project ?

    2. Can you please explain what are uart_handler.c and usb_cdc_handler.c for? I tried to look for answer on nRF Connect SDK documents and no luck.  

    3. Is there any sample code/project in the NCS to show case the UART communication between nRF9160 and nRF52840 ? I will implement it into the Connectivity Bridge to pass the data from USB to nRF9160. 


    Thanks,

    Face

  • Hi Face,

    inyourface said:
    Are the UARTs disabled by default in the Connectivity Bridge project ?

    No, UART is enabled by default. What version of LTE Link Monitor are you running? Version 1.1.6 should have a fix for this. Do they show in the device manager as COM ports?

    inyourface said:
    2. Can you please explain what are uart_handler.c and usb_cdc_handler.c for? I tried to look for answer on nRF Connect SDK documents and no luck.  

     uart_hancler.c and usb_cdc_handler.c handles the communication UART USB CDC input and output seperately. Data is routed between the two using event manager. E.g. when data is received with USB CDC it generate a cdc_data_event. The UART handler subscribes to this event, and will send this data via UART to nRF9160. Equivalent when data is received on UART from nRF9160 an event will trigger and send data via USB.

    inyourface said:
    3. Is there any sample code/project in the NCS to show case the UART communication between nRF9160 and nRF52840 ? I will implement it into the Connectivity Bridge to pass the data from USB to nRF9160. 

     The Connectivity Bridge implements UART communication between nRF52 and nRF91

    Kind regards,
    Øyvind

Related