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?
https://devzone.nordicsemi.com/question/14188/ble_app_lbs-error/ 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.
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
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);
So what else needs to be changed?
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.
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.