Not much to show for a whole day of slaving over a hot IDE.  Just some non-functional code.


I’ve sweated over an example bit of code, and just can’t get it to work, but I suppose the good news is that I have learned some useful things about debugging.

Finally deciding that I had not done anything obviously stupid I turned to the web, and found someone who had exactly the same problem.

I have an issue with the ble_app_lbs. I can compile it OK, but when I run it it gets as far as calling sd_ble_gap_device_name_set(), which returns error 0x3001.
Can someone tell me why this might be?   explains that with each upgrade of the soft-machine there is a corresponding upgrade of the SDK.  That was to be expected.

0x3001 is error code for ” SVC handler is missing “
You get this error when you use the wrong softdevice version with wrong header file (i.e. an old SDK version ).
Update : lbs not works with SD S110 v.7.0. There was a previous question with answer from Hung Buy, a nordic guy.

0x3001 is actually “BLE_ERROR_NOT_ENABLED”, which is raised due to an extra step needed in S110 7.0.
Ulrich Myhre (Jul 27 ’14)convert to answer 

However I didn’t expect them not to update the examples shipped with the SDK.

When you download the individual releases, there is always a document called “Migration Document” that follows the release bundle. Everything you need to know for migrating between any version should be there. Unfortunately, not every SDK example is able to keep up, but the migration doc should outline the necessary changes if you need an older example to work.
Ulrich Myhre (Jul 27 ’14)convert to answer 

Following the answer chain I found this code snippet:

// Enable BLE stack ble_enable_params_t ble_enable_params; memset(&ble_enable_params, 0, sizeof(ble_enable_params)); ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT; err_code = sd_ble_enable(&ble_enable_params); APP_ERROR_CHECK(err_code);

 So what else needs to be changed?

Migration Document

So where is this mythical migration document.  It was allegedly inside the zip file that the Softmachine came in.  But NO!!   There are only migration documents for the major releases.  Getting a major release that is now out of date is quite a trick.  One might think that it would come from the same place as all the other releases:

But 7.0.0 is not in the stack.  So where do I find it.  AFter fiddling around for ages I eventually found the “beware of the leopard” sign and went through the trapdoor to the secret basement.

The trick is to click on the release number on the right.

This gets you here where you can download 7.0.0.

And there in the filing cabinet, obscured from  public gaze are a bunch of files all with the same name, but with different icons.  Hovering over the names one by one reveals:

Which is eleven pages of fun reading.

Anyway, back to the plot.  I figured out all the updates, and made sure I had the right combo of SDK, and softmachine, and sure enough…. it worked.

Leave a Reply