Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 2.51 KB

README.md

File metadata and controls

93 lines (62 loc) · 2.51 KB

mynewt-tinyusb-example

TinyUSB Logo

Build Status License

Due to the newt package build system, Mynewt examples are better to be a spin-off from the main stack repo. To run the examples

$ git clone https://github.com/hathach/mynewt-tinyusb-example.git
$ cd mynewt-tinyusb-example
$ newt upgrade

Supported Boards

Examples should be able to run with boards that are supported by Mynewt, provided that the mcu is already supported by TinyUSB stack. Following is board that is mainly used and tested

Examples

There are several ready-to-build target examples, following is build instructions

Bootloader

Each board needs to have an bootloader if not previously loaded. This only needs to do once.

$ newt build pca10056-boot
$ newt load pca10056-boot

CDC MSC Composite

This example enumerated as composite device with CDC, MSC

$ newt build pca10056-cdc_msc
$ newt create-image pca10056-cdc_msc 1.0
$ newt load pca10056-cdc_msc

MSC Dual Logical Unit

This example enumerated as mass storage with dual ram disk

$ newt build pca10056-msc_dual_lun
$ newt create-image pca10056-msc_dual_lun 1.0
$ newt load pca10056-msc_dual_lun

Bluetooth HCI Driver

This example enumerated as Bluetooth controller and allow Host OS to use it to perform scanning, connecting etc ...

$ newt build pca10056-blehci
$ newt create-image pca10056-blehci 1.0
$ newt load pca10056-blehci

Here are some Linux command to use: Show available controllers (NimBLE should show up along with preexisting ones)

hciconfig

To scan device around command line tool can be used

bluetoothctl

[bluetooth]# list
[bluetooth]# select CC:BB:10:10:20:20
[bluetooth]# scan on
[bluetooth]# scan off
[bluetooth]# devices
[bluetooth]# connect <some address from devices>

To see packets (that should match what USB transfers)

btmon