Connectivity bridge

The Connectivity bridge application demonstrates the bridge functionality for the Thingy:91 and Thingy:91 X hardwares.

Additionally, the application also provides an option of adding the Bluetooth® functionality by making use of the Nordic UART Service (NUS).

Overview

The Connectivity bridge acts as a USB composite device, exposing two UART interfaces to a USB host as two CDC ACM devices. The mapping of the UART interfaces is done in the following way:

UART Interface

CDC ACM port

UART_0

CDC_0

UART_1

CDC_1

See Connecting to Thingy:91 for information on the baud rate configuration for Thingy:91 serial ports.

The application adds the functionality of a USB Mass Storage device, which contains several utility files such as a README.txt file.

The application also provides a Bluetooth® LE UART Service, which can be enabled by the option CONFIG_BRIDGE_BLE_ENABLE. This service can be used for a wireless connection to one of the UART interfaces in the following way:

USB Interface

Service mapped

UART_0

Nordic UART Service (NUS)

By default, the Bluetooth LE interface is off, as the connection is not encrypted or authenticated. It can be turned on at runtime by setting the appropriate option in the Config.txt file, which is located on the USB Mass storage Device.

Requirements

The sample supports the following nRF52840-based device:

Hardware platforms

PCA

Board name

Board target

Thingy:91 X

PCA20065

thingy91x

thingy91x/nrf5340/cpuapp

Thingy:91

PCA20035

thingy91

thingy91/nrf52840

The sample also requires a USB host which can communicate with CDC ACM devices, such as a Windows or Linux PC.

Building and running

This sample can be found under applications/connectivity_bridge in the nRF Connect SDK folder structure.

To build the sample, follow the instructions in Configuring and building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.

Note

When building repository applications in the SDK repositories, building with sysbuild is enabled by default. If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.

Testing

After programming the sample to your kit, test it by performing the following steps:

  1. Connect the kit to the host using a USB cable.

  2. Observe that the CDC ACM devices enumerate on the USB host (COM ports on Windows, /dev/tty* on Linux).

  3. Use a serial client on the USB host to communicate over the kit’s UART pins.

Dependencies

This sample uses the following nRF Connect SDK libraries:

In addition, it uses the following Zephyr libraries: