Git Product home page Git Product logo

blehandheldcontroller's Introduction

Bluetooth: Central UART

The Central UART sample demonstrates how to use the :ref:`nus_client_readme`. It uses the NUS Client to send data back and forth between a UART connection and a Bluetooth® LE connection, emulating a serial port over Bluetooth LE.

The sample supports the following development kits:

.. table-from-sample-yaml::

The sample also requires another development kit running a compatible application (see :ref:`peripheral_uart`).

When connected, the sample forwards any data received on the RX pin of the UART 1 peripheral to the Bluetooth LE unit. On Nordic Semiconductor's development kits, the UART 1 peripheral is typically gated through the SEGGER chip to a USB CDC virtual serial port.

Any data sent from the Bluetooth LE unit is sent out of the UART 1 peripheral's TX pin.

In this sample, a UART console is used to send and read data over the NUS Client. Debug messages are not displayed in the UART console, but are printed by the RTT logger instead.

If you want to view the debug messages, follow the procedure in :ref:`testing_rtt_connect`.

|test_sample|

  1. |connect_kit|
  2. |connect_terminal_specific|
  3. Optionally, connect the RTT console to display debug messages. See :ref:`central_uart_debug`.
  4. Reset the kit.
  5. Observe that the text "Starting Bluetooth Central UART example" is printed on the COM listener running on the computer and the device starts scanning for Peripherals with NUS.
  6. Program the :ref:`peripheral_uart` sample to the second development kit. See the documentation for that sample for detailed instructions.
  7. Observe that the kits connect. When service discovery is completed, the event logs are printed on the Central's terminal.
  8. Now you can send data between the two kits. To do so, type some characters in the terminal of one of the kits and hit Enter. Observe that the data is displayed on the UART on the other kit.
  9. Disconnect the devices by, for example, pressing the Reset button on the Central. Observe that the kits automatically reconnect and that it is again possible to send data between the two kits.

This sample uses the following |NCS| libraries:

In addition, it uses the following Zephyr libraries:

The sample also uses the following secure firmware component:

blehandheldcontroller's People

Contributors

antsand avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.