(Sorry for posting two threads in one day!)
I have some nRF51822 mbed boards for a project. The project requires an array
of these boards to communicate with each other via Bluetooth Low Energy (BLE).
I am developing on linux, so can't use the Windows-only Keil with my current set-up. For reasons which I will
explain below, I cannot use the Mbed online IDE for this project. Thanks partially to some of the very helpful members of the mbed community, I am aware
that it is possible to develop for these boards using the ARM gcc toolchain.
However, this is a non-trivial task and I have run into a number of issues,
which I will explain below.
I am posting this thread largely for two reasons:
1) I hope someone can help me!
2) Whilst perhaps the majority of users of the nRF51822 Mbed kits are
developing peripheral devices intended to communicate with phones/other
central devices, I know that I'm not the only linux-user with a few of these kits
trying to get them to communicate with each other. So most of my issues are not specific
to my use-case, and it is worth having this discussion with the community and
Mbed team.
Here are some of the technical issues getting up and running with the BLE
stuff as far as I understand it (I might be wrong about some of this!):
In order to have two BLE devices communicating, at least one of them needs to
be able to scan for devices (i.e. it needs to be able to act in a
central/master role). The possible behaviour of the nRF51822 boards is largely
determined by the protocol stack they are loaded with (known as SoftDevices or
SDs by Nordic).
The Mbed online IDE is set up to work with the S110 SoftDevice, and this is
the only SD supported by the Mbed BLE API at this time (see, for example,
Kevin Townsend's post
https:mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/4903/?page=1#comment-24390).
S110 only supports peripheral or broadcaster behaviour, which means it can't
scan for other BLE devices. So using this SD, our boards have no way of
recognising that another nearby board exists and is broadcasting or
advertising.
There is another SD released by Nordic: S120 (not supported by the Mbed IDE or
BLE API). This supports only central/master roles. Theoretically we could
create a solution using a combination of some peripheral boards running S110
software and some central boards running S120 software, but in this case the
S110 boards couldn't communicate directly and neither could the S120 boards,
so this is not ideal. Regardless, there are difficulties getting S120 to work
with the gcc toolchain in the first place for the nRF51822 mkit boards (see
below).
This month, Nordic released a third SoftDevice: S130. This promises to offer
simultaneous central and peripheral behaviour, ideal for our purposes.
However, there are these issues:
- It is apparently not supported by the latest version (v6.0.0) of Nordic's NRF51 SDK
However, SDK downloads from Nordic are limited by product keys activated on your account.
On my account with keys activated for the nRF51822 Mkits, only v6.0.0 is
available for download. (I have opened a support ticket with Nordic
mentioning this.
- It is not supported by the Mbed IDE. So in order to develop with it on
linux, we must use the gcc toolchain.
- There is little or no documentation or support for using S130 at this
time, especially with gcc. Quoting from a comment here
(https://devzone.nordicsemi.com/blogs/14/s130-multi-link-softdevice-released-tell-us-what-y/)
by user cocoa (I don't know who s/he is but based on post history going
back over a year they are quite experienced with developing for Nordic's
devices and using their SDKs and APIs):
"Great features in S130, but a SDK without S130 documentation (now there
are only S110 and S120) no examples using gcc... is not useful."
- There is no direct guidance on using the nRF51822 mkit with Nordic's
SDK with *any* SoftDevice and gcc. This is partially because the mkit
uses CMSIS-DAP whereas as far as I can tell, all of Nordic's other
devices (including their other nRF51822 boards) use J-Link, so all of
their guidance assumes that. There is a guide for using the mkit with
their SDK, but it only discusses Keil. (And even if we
used Keil and got it to work with the SDK, we would still have the
problem of using S130 without proper documentation or support).
None of the above issues are insurmountable, and it should certainly
be technically possible to do what we want to do with the boards.
However, there is very little published guidance or support for what
we want to do, which makes progress difficult.
(Sorry for posting two threads in one day!)
I have some nRF51822 mbed boards for a project. The project requires an array of these boards to communicate with each other via Bluetooth Low Energy (BLE). I am developing on linux, so can't use the Windows-only Keil with my current set-up. For reasons which I will explain below, I cannot use the Mbed online IDE for this project. Thanks partially to some of the very helpful members of the mbed community, I am aware that it is possible to develop for these boards using the ARM gcc toolchain. However, this is a non-trivial task and I have run into a number of issues, which I will explain below.
I am posting this thread largely for two reasons:
1) I hope someone can help me!
2) Whilst perhaps the majority of users of the nRF51822 Mbed kits are developing peripheral devices intended to communicate with phones/other central devices, I know that I'm not the only linux-user with a few of these kits trying to get them to communicate with each other. So most of my issues are not specific to my use-case, and it is worth having this discussion with the community and Mbed team.
Here are some of the technical issues getting up and running with the BLE stuff as far as I understand it (I might be wrong about some of this!):
In order to have two BLE devices communicating, at least one of them needs to be able to scan for devices (i.e. it needs to be able to act in a central/master role). The possible behaviour of the nRF51822 boards is largely determined by the protocol stack they are loaded with (known as SoftDevices or SDs by Nordic).
The Mbed online IDE is set up to work with the S110 SoftDevice, and this is the only SD supported by the Mbed BLE API at this time (see, for example, Kevin Townsend's post https:mbed.org/forum/team-63-Bluetooth-Low-Energy-community/topic/4903/?page=1#comment-24390). S110 only supports peripheral or broadcaster behaviour, which means it can't scan for other BLE devices. So using this SD, our boards have no way of recognising that another nearby board exists and is broadcasting or advertising.
There is another SD released by Nordic: S120 (not supported by the Mbed IDE or BLE API). This supports only central/master roles. Theoretically we could create a solution using a combination of some peripheral boards running S110 software and some central boards running S120 software, but in this case the S110 boards couldn't communicate directly and neither could the S120 boards, so this is not ideal. Regardless, there are difficulties getting S120 to work with the gcc toolchain in the first place for the nRF51822 mkit boards (see below).
This month, Nordic released a third SoftDevice: S130. This promises to offer simultaneous central and peripheral behaviour, ideal for our purposes. However, there are these issues:
None of the above issues are insurmountable, and it should certainly be technically possible to do what we want to do with the boards. However, there is very little published guidance or support for what we want to do, which makes progress difficult.