This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5 SDK 15.3.0 initial guidance

Hello,

I’ve developed a BLE peripheral product using Simblee (nRF51822 revision 3), now discontinued. We’ve decided to switch to Laird’s BL651 module and implement the app using nRF5 SDK 15.3.0. I’m new to nRF5 SDK and low-level access to BLE. I would appreciate some initial guidance.

Simblee allowed BLE peripheral development using the Arduino IDE and insulated developers from a lot of the complexities of BLE. I wrote code like this:

Setup …

SimbleeBLE.customUUID = "2220";
SimbleeBLE.txPowerLevel = +4;
SimbleeBLE.deviceName = peripheralName;
SimbleeBLE.advertisementData = advData;
SimbleeBLE.advertisementInterval = 500;
SimbleeBLE.begin();

To send data to the connected iOS app (BLE central):

SimbleeBLE.send(message, sizeof(message));

Interrupt routine for receiving data from the iOS app:

void SimbleeBLE_onReceive(char *data, int len)
{
  ...
}

The peripheral monitors a single GPIO pin and uses GPIOTE, PPI and timers for timing-critical code, which the Simblee library exposed. And we use OTA DFU to push out BLE peripheral app updates via our iOS app.

Simblee has a single service (0x2220) with a send (write) characteristic (0x2222), a receive (read, notify) characteristic (0x2221) and a disconnect (write) characteristic (0x2223). Seems pretty simple.

I have the nRF52 dev kit (which has an nRF52832, but can emulate the nRF52810, which is on Laird's BL651) and I have some of the Nordic examples working (using Segger Embedded Studio on macOS).

I would appreciate some initial guidance. Is the Nordic UART Service appropriate? Would the ble_peripheral/ble_app_uart SDK example be a reasonable starting point? What to focus my learning on? Security is not important, nor is power efficiency (we run on AA batteries and the product is used, on average, 20 hours per month). I would like the app to use the same service and characteristic UUIDs so that it will function with our current BLE central iOS app.

I appreciate any guidance. Many thanks,

Tim

  • Hi Tim

    If you are targeting the nRF52810 I would suggest migrating to the S112 first, similar to how all the pca10040e projects are configured in the SDK. 

    Since there is no dedicated devkit for the nRF52810 the pca10040e project allows you to develop the code on the nRF52832, and the migrate to the nRF52810 when you implement your hardware. 

    We don't have a proper guide from migrating a DK project to a custom board unfortunately, but the best way to do it in my opinion is to duplicate the boards file for the DK, rename it, and modify it to reflect the pin assignment of your custom board. 

    Make a new define, BOARD_XXX, and update board.h to include the duplicate file that you created. 

    I would also recommend copying boards.h and your new board file into a separate folder in your project directory, to avoid having to change any of the SDK files. 

    Regarding buttons and LED's, if you don't plan to use them on your custom board I would suggest removing them from the DK project before you do the migration, to make sure the project runs fine without them. 

    Best regards
    Torbjørn

Related