commit | 8e1d7ea0ed8245ff6df20a97d8f4e5a94caa0cef | [log] [tgz] |
---|---|---|
author | Christopher Collins <ccollins@apache.org> | Fri Mar 29 11:03:25 2019 -0700 |
committer | Szymon Janc <szymon.janc@codecoup.pl> | Tue Apr 02 22:01:20 2019 +0200 |
tree | 8249f90e5301b597e4dfaf4595b7a7bac8d649ce | |
parent | 4be64276b87240f37bc47b3520cf9ecb6d639879 [diff] |
host: Always wake tx queues on rx of num-cmp-pkts Prior to commit: The code assumed that a transmission could stall for only one reason: the controller cannot accommodate any more ACL data packets. When the host received a num-complered-packets event, it would only try to unstall each connection if all the controller's data buffers were previously used. It turns out there is a second way that a host connection can stall: mbuf exhaustion. If the host is unable to fragment an outgoing L2CAP packet into ACL data packets due to a lack of mbufs, the transmission stalls. This commit causes the host to wake up its connections every time it receives a num-completed-packets event. It does this even if the controller still had capacity for more ACL data packets. If a host connection is stalled due to mbuf exhaustion, the controller will only send the next num-completed-packets event after it has freed the mbuf from the designated ACL fragment pool (ble_hs_hci_frag_mbuf_pool). In other words, we are guaranteed to receive a num-completed-packets event whenever a transmission has stalled, regardless of the cause.
Apache NimBLE is an open-source Bluetooth 5.0 stack (both Host & Controller) that completely replaces the proprietary SoftDevice on Nordic chipsets. It is part of Apache Mynewt project.
Features highlight:
Controller supports Nordic nRF51 and nRF52 chipsets. Host runs on any board and architecture supported by Apache Mynewt OS.
If you are browsing around the source tree, and want to see some of the major functional chunks, here are a few pointers:
nimble/controller: Contains code for controller including Link Layer and HCI implementation (controller)
nimble/drivers: Contains drivers for supported radio transceivers (Nordic nRF51 and nRF52) (drivers)
nimble/host: Contains code for host subsystem. This includes protocols like L2CAP and ATT, support for HCI commands and events, Generic Access Profile (GAP), Generic Attribute Profile (GATT) and Security Manager (SM). (host)
nimble/host/mesh: Contains code for Bluetooth Mesh subsystem. (mesh)
nimble/transport: Contains code for supported transport protocols between host and controller. This includes UART, emSPI and RAM (used in combined build when host and controller run on same CPU) (transport)
porting: Contains implementation of NimBLE Porting Layer (NPL) for supported operating systems (porting)
ext: Contains external libraries used by NimBLE. Those are used if not provided by OS (ext)
kernel: Contains the core of the RTOS (kernel/os)
There are also some sample applications that show how to Apache Mynewt NimBLE stack. These sample applications are located in the apps/
directory of Apache Mynewt repo. Some examples:
If you are having trouble using or contributing to Apache Mynewt NimBLE, or just want to talk to a human about what you're working on, you can contact us via the developers mailing list.
Although not a formal channel, you can also find a number of core developers on the #mynewt channel on Freenode IRC or #general channel on Mynewt Slack
Also, be sure to checkout the Frequently Asked Questions for some help troubleshooting first.
Anybody who works with Apache Mynewt can be a contributing member of the community that develops and deploys it. The process of releasing an operating system for microcontrollers is never done: and we welcome your contributions to that effort.
More information can be found at the Community section of the Apache Mynewt website, located here.
Apache Mynewt welcomes pull request via Github. Discussions are done on Github, but depending on the topic, can also be relayed to the official Apache Mynewt developer mailing list dev@mynewt.apache.org.
If you are suggesting a new feature, please email the developer list directly, with a description of the feature you are planning to work on.
Bugs can be filed on the Apache Mynewt NimBLE Issues. Please label the issue as a “Bug”.
Where possible, please include a self-contained reproduction case!
Feature requests should also be filed on the Apache Mynewt NimBLE Bug Tracker. Please label the issue as a “Feature” or “Enhancement” depending on the scope.
We love getting newt tests! Apache Mynewt is a huge undertaking, and improving code coverage is a win for every Apache Mynewt user.
The code in this repository is all under either the Apache 2 license, or a license compatible with the Apache 2 license. See the LICENSE file for more information.