Building Newt Nimble BLEHCI firmware for the iMX8MQ NINA-B1 Module

Overview

This is a mynewt project skeleton for quickly and easily building the blehci firmware that can be flashed to the SolidRun iMX8MQ SOM's NINA-B1 chip. This firmware allows the NINA-B1 to act like a normal HCI device and is compatible with newer Bluez stacks.

Building

Apache blehci contains an example Apache Mynewt Nimble application called blehci. When loaded on compatible hardware this application allows the NINA-B1 to be used under Linux as a normal HCI device, using the traditional Bluez stack.

  1. Download and install the requirements for SolidRun's Newt BSP.

You will need to download and install:

As a shortcut and to avoid installing all development files to the target systems, a fork of the mynewt docker image built for arm64 is available at http://quay.io/josua-sr/newt:latest . For the steps below, installing an alias for the newt command to docker is sufficient:

sudo apt install docker.io sudo usermod -a -G docker <username> # log out and back in alias newt='docker run -e NEWT_HOST=$(uname) $ti --rm --device=/dev/bus/usb --privileged -v $(pwd):/workspace -w /workspace quay.io/josua-sr/newt:latest /newt'
  1. Download the SolidRun BSP, Apache Mynewt Core package, and Nimble (executed from the mynewt-sr-blehci directory).

newt upgrade
  1. Build the Newt bootloader for the NINA-B1 using the "nina-b1_boot" target (executed from the mynewt-sr-blehci directory).

newt build nina-b1_boot
  1. Build the blehci application for the NINA-B1 using the "blehci" target (executed from the mynewt-sr-blehci directory).

  1. load the bootloader and application to the NINA-B1. this is stored in the onboard flash and only needs to be done just once (executed from the mynewt-sr-blehci directory).

Initializing under Linux

The device should now be ready to be initialized under Linux.

The hci interface should now be available.

 

Related pages

SolidRun Ltd.