1<!-- 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20--> 21 22# Apache Mynewt NimBLE 23 24## Overview 25 26See (https://mynewt.apache.org/network/ble/ble_intro/). 27 28## Building 29 30NimBLE is usually built as a part of Apache Mynewt OS, but ports for 31other RTOS-es are also available. 32 33### Linux 34 351. Build the sample application 36 37```no-highlight 38 cd porting/examples/linux 39 make 40``` 41 422. Run the sample application 43 44First insert a USB Bluetooth dongle. These are typically BLE 4.0 capable. 45 46Verify the dongle is connected with hciconfig: 47 48```no-highlight 49 $ hciconfig 50hci0: Type: BR/EDR Bus: USB 51 BD Address: 00:1B:DC:06:62:5E ACL MTU: 310:10 SCO MTU: 64:8 52 DOWN 53 RX bytes:5470 acl:0 sco:0 events:40 errors:0 54 TX bytes:5537 acl:176 sco:0 commands:139 errors:1 55``` 56 57Then run the application built in step one. The application is configured 58in sysconfig.h to use hci0. 59 60```no-highlight 61 cd porting/examples/linux 62 sudo ./_build/nimble_linux.out 63``` 64 653. Build and run the unit tests 66 67The Operating System Abstraction Layer (OSAL) used to port Nimble to Linux 68has a suite of unit tests. 69 70```no-highlight 71 cd tests/unit/porting/npl 72 make test 73``` 74