mbed OS V5 BLE UARTService to USB/UART PassThru Example
Moxon Design : mbed OS V5 BLE UartService to USBUART passthru example
This example will advertise on BLE as "BLART" and allow BLE serial echo to the USB Serial port. Open a Bluetooth terminal application, like Nordic "nRF UART" and connect to "BLART", open a terminal emulator program, like "TeraTERM", and connect to the USB COM Port (like JLink CDC UART Port), and echo characters back and forth. Set UART_LoopBack = 1 for local loopback (e.g. BLE to BLE, USB-UART to USB-UART)
Revision 2:3e203cc2a88f, committed 2017-04-29
- Comitter:
- moxondesign
- Date:
- Sat Apr 29 01:32:11 2017 +0000
- Parent:
- 1:5b50f5283781
- Commit message:
- mbed OS V5 working version
Changed in this revision
README.md | Show annotated file Show diff for this revision Revisions of this file |
--- a/README.md Sat Apr 29 01:27:04 2017 +0000 +++ b/README.md Sat Apr 29 01:32:11 2017 +0000 @@ -1,6 +1,6 @@ -# Getting started with Blinky on mbed OS +# Moxon Design mbed OS V5 BLE UartService to USBUART passthru -This guide reviews the steps required to get Blinky working on an mbed OS platform. +This guide reviews the steps required to get BLU UART working on an mbed OS platform. Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). @@ -9,8 +9,8 @@ From the command-line, import the example: ``` -mbed import mbed-os-example-blinky -cd mbed-os-example-blinky +mbed import MoxDes-mbed-os-BLE-USB-passthru +cd MoxDes-mbed-os-BLE-USB-passthru ``` ### Now compile @@ -18,31 +18,9 @@ Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5: ``` -mbed compile -m K64F -t ARM +mbed compile -m nRF42-DK -t ARM ``` -Your PC may take a few minutes to compile your code. At the end, you see the following result: - -``` -[snip] -+----------------------------+-------+-------+------+ -| Module | .text | .data | .bss | -+----------------------------+-------+-------+------+ -| Misc | 13939 | 24 | 1372 | -| core/hal | 16993 | 96 | 296 | -| core/rtos | 7384 | 92 | 4204 | -| features/FEATURE_IPV4 | 80 | 0 | 176 | -| frameworks/greentea-client | 1830 | 60 | 44 | -| frameworks/utest | 2392 | 512 | 292 | -| Subtotals | 42618 | 784 | 6384 | -+----------------------------+-------+-------+------+ -Allocated Heap: unknown -Allocated Stack: unknown -Total Static RAM memory (data + bss): 7168 bytes -Total RAM memory (data + bss + heap + stack): 7168 bytes -Total Flash memory (text + data + misc): 43402 bytes -Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin -``` ### Program your board @@ -50,14 +28,14 @@ 1. Copy the binary file to the mbed device. 1. Press the reset button to start the program. -The LED on your platform turns on and off. +The BLE device should advertise as "BLART" (BLe-uART) ## Export the project to Keil MDK, and debug your application From the command-line, run the following command: ``` -mbed export -m K64F -i uvision +mbed export -m nRF42-DK -i uvision ``` To debug the application: