Apache Mynewt: Community-driven, open source OS; first open source BLE for MCUs - Page 1
Forum section: electronics / general

author: frankpurter
author_rank: Newbie
timestamp: June 14, 2016, 10:53:42 pm
content: A quick FYI for Apache Mynewt's 0.9 release...http://mynewt.apache.org/http://mynewt.apache.org/download/Noteworthy is the world's first open source (controller level) Bluetooth Low Energy stack for MCUs. The first ports were to Nordic's nRF52 and nRF51. Specific to the OS with BLE (4.2), the open source approach has obvious benefits to developers: access to source code; better debugging through setting breakpoints, avoiding stack smashes, no stolen interrupts, etc.; direct access to peripherals for granular power control; better, precise configurability of concurrent connections and flexibility across central and peripheral roles. The project aims to also have timely Bluetooth 5 support.The OS is composable via a modern, Go-like build and package management tool. Components include secure boot loader, flash file system and TLV storage mechanisms, rich logging infrastructure, circular buffering schemes, and BLE! Scripting languages such as Javascript and Python is currently being worked.The community welcomes your participation and feedback!

author: jnz
author_rank: Frequent Contributor
timestamp: June 14, 2016, 11:12:47 pm
content: That's.... pretty interesting.A couple of concerns from someone implementing BLE now...In the tutorial under required "Laptop running Mac OSX."... I'm not... Ok, I won't judge, it's new. Seems wierd but whatever.Um... This seems light a nightmare (wanted to use stronger language) for cert. The ENTIRE appeal of the SiLabs modules, the Nordic soft-devices, the Ti embedded core is that you can change the software without having to re-certify your device. I'm not seeing that here. From what I can tell, every single time you want to update a commerical device - you'd need to re-test and re-cert because you have access to the entire BLE stack. Correct me if I'm wrong, but YIKES.No real comment on the OS or the perihperal libs/drivers, thats nice they are there. I can see why the nRF52 was used, the inexpensive dev kit it gives you a radio circuit fleshed out already. Makes sense.The advantages of being in control of the peripherals, having the code, "no stolen interrupts" etc, all means it will be EXTREMELY easy to break the BLE spec! This is an expert solution only. In fact, I feel that you'd have to be such an expert in the BLE side that in order to implement pwm and SPI and timers and things that will intereupt - all while running the BLE properly in a way that will pass cert - you may find yourself with the exact same limitations as you would with say, a Nordic soft-device.I'm interested in the idea... But this seems like a great solution for someone that wants to learn how BLE works on the backend or wants to make a down an dirty hobbiest project that won't go to cert/production. Even in that latter case, I'd still recommend the Nordic or TI just because of how easily you can screw up the stack just by not paying close enough attention to the interrupts and power/clock requirements.

author: chipah
author_rank: Newbie
timestamp: June 15, 2016, 12:16:01 am
content: The concern about certification can be understood. Mynewt's NimBLE stack will have a pre-qualified host subsystem and a select few controller Subsystems (e.g. nRF52) to ease the product listing creation for end products. Some of the popular chip packages using Mynewt will be qualified as end product. For the other chips, the device using Mynewt will have to undergo qualification and certification. However, having qualified components makes the process easier. Mynewt has been successfully participating in the Bluetooth SIG Interoperability test events.There are several use cases where the chip vendors's soft-devices and BLE modules are not flexible enough and require tweaks. For example, what if you needed more than 8 concurrent connections? Besides, having the source code makes debugging a whole lot easier even when there are no significant tweaks. The idea is to provide a much finer grained API at various levels to the end user - (LL, HCI, GATT services) while letting Mynewt take care of the lowest level headaches such as scheduling and timing. The user does NOT have to worry about lower level details if he/she does not want to.

author: jnz
author_rank: Frequent Contributor
timestamp: June 15, 2016, 06:48:51 pm
content: Ok, so be clear... Even if you have a micro package qualified.... Every firmware update I would make to a mynewt device would need a regulatory re-cert, right?

author: frankpurter
author_rank: Newbie
timestamp: June 15, 2016, 07:11:01 pm
content: No, every update would not require a re-certification. Over-the-air firmware upgrades to networked devices happen all of the time--the embedded image is a monolithic binary, irrespective of whether or not it's a licensed binary from the chip vendor or a third-party. What matters is that the subset of the BLE code is appropriately certified. An over-the-air update of Apache Mynewt or the SoftDevice does not mandate this.Other answers to the first set of questions:1/ There are Docker-ized versions of the toolchain for ease-of-use, quick start, and consistency. Should be straightforward. These are for Mac OSX, Linux, and Windows.2/ As pointed out, major point releases such as 1.0 will be certified on specific hardware platforms such as the Nordic nRF52 and nRF51.3/ There is discussion on the list to re-factor these. Please join!http://mynewt.apache.org/community/The aim is to capture both ease-of-use and but provide very low level hooks for experienced developers.4/ There are, indeed, many fine-grained controls as you would expect with full source. The OS does aim to provide abstraction for less experienced devs and makers while simultaneously be a capable system for product developers. Apache Mynewt was announced as being the OS for Arduino Primo and Arduino Otto boards. There are discussions in process to get Python and Javascript modules, too. In this case, the OS takes care of all of the HW abstraction; the interpreter will be separated out, which makes maintenance notionally easier going forward.https://globenewswire.com/news-release/2016/05/20/842021/0/en/Arduino-and-Runtime-Collaborate-to-Introduce-Apache-Mynewt-incubating-to-Arduino-Ecosystem.html

author: jnz
author_rank: Frequent Contributor
timestamp: June 15, 2016, 09:15:42 pm
content: Quote from: frankpurter on June 15, 2016, 07:11:01 pmOkk... But this is not like a Nordic SoftDevice where it's a pre-compiled and linked library. It's source and it lives in the same region of flash rom as my application code? So when I roll my hex up, I'll have the application code, the GATT configs, and the mynewt all rolled together, right?So, everytime I flash update, there is a possibility of updating / corrupting / secretly modifying the BLE stack, yes?

author: chipah
author_rank: Newbie
timestamp: June 16, 2016, 12:56:12 am
content: It is not a precompiled and linked library but the application space (apps and app data) will be separate from the core OS + NimBLE stack. You will be able to upgrade only the application as necessary without having to touch or re-certify the NimBLE stack. That's where Mynewt is headed for its first major release.

author: frankpurter
author_rank: Newbie
timestamp: June 16, 2016, 10:47:07 pm
content: The BLE stack can be further decomposed into host-only; controller-only; and host+controller implementations. Already, Intel and others have ported the controller-only derivative. In Intel's case, the port is to the nRF51 on the Arduino 101 board.

author: altaic
author_rank: Unknown
timestamp: June 17, 2016, 02:43:28 am
content: Quote from: frankpurter on June 14, 2016, 10:53:42 pmWhere is that indicated? I searched their site, recent mailing list archives, and bug-tracker/roadmap without seeing a single mention of bt5. Then some googling resulted in a few news sites claiming the same thing, but seemingly no ongoing work to that effect.

author: jnz
author_rank: Frequent Contributor
timestamp: June 17, 2016, 06:53:32 am
content: Quote from: altaic on June 17, 2016, 02:43:28 amSpec isn't even out. So mynewt can have all the intentions they like. 5.0 won't be out until early 2017 most likely.

author: altaic
author_rank: Unknown
timestamp: June 17, 2016, 07:28:59 am
content: Quote from: jnz on June 17, 2016, 06:53:32 amRight, but the media is the only source of information about their plans for the next iteration on their project, which, for an open source project, is a bit opaque. I.e discouraging.

author: mark03
author_rank: Frequent Contributor
timestamp: June 17, 2016, 04:30:49 pm
content: Quote from: altaic on June 17, 2016, 07:28:59 amI wouldn't worry. AFAIK Nordic hasn't finished implementing BT 4 yet so they will have plenty of time. When it comes to implementing published specs, open-source projects are usually in the lead. E.g. I believe Linux was the first OS to have USB 3 support.The real question with this project (IMO) is how far it can go, given the closed nature of much of the target hardware. I would love to see something like this on the CC13xx/CC26xx, but TI have no intention of disclosing the register interface to their radios, nor of granting access to load arbitrary code onto the Cortex-M0 radio core. (I asked.) Radios may become the GPUs of the IoT world: highly capable hardware which falls short of its true potential, because vendors are too worried about their IP to open up the specs.

author: chipah
author_rank: Newbie
timestamp: June 18, 2016, 05:51:37 am
content: The good thing about being an ASF community-driven project is that users other than chip vendors can influence its roadmap. If there is keen interest in BLE 5.0 it should certainly be voiced in their dev@ mailing list (https://mynewt.apache.org/community/) - they are friendly.There are two types of chip vendors - one who hold on to their software IP and the other who don't care about the software IP and openly collaborate with various software vendors as long as it helps them sell chips. Mynewt is starting with the second type, clearly.As for BLE 5.0, the 0.9 versions of the specs are in circulation in the Core Specs working group of Bluetooth SIG of which the Mynewt developers are members of. So they have been looking at the 5.0 specs. Discussions at Bluetooth/IoT events in the last two months have indicated that as well.