Hi all,
Richard is the name, playing with hardware is my game
got an nrf51-dk board, and tried the tutorial on how to turn this board into a discoverable beacon through mbed,
followed all the steps mentioned in the tut, but when trying to compile, I am getting an error that BLEDevice.h could
not be found, is there some additional action needed? Please help me, this is very interesting stuff.
Richard
nrf51-dk compile error
Re: nrf51-dk compile error
I have been working with Arduinos and as you described it seems
the BLEDevice.h is completely missing from your folder structure or misplaced.
As an example:
If that helps.
the BLEDevice.h is completely missing from your folder structure or misplaced.
As an example:
Code: Select all
Arduino
-->Libraries folder
--> NRF51-DK folder
=> examples folder (contains other example subfolders and .ino)
=> BLEDevice.h
If that helps.
Re: nrf51-dk compile error
did you include the BLE libraries within the mbed compiler?
you may also want to take a look at the following post; there are some changes made to the API's which make the examples break.
viewtopic.php?f=8&t=1448&p=3802&hilit=nrf51+dk#p3802
you may also want to take a look at the following post; there are some changes made to the API's which make the examples break.
viewtopic.php?f=8&t=1448&p=3802&hilit=nrf51+dk#p3802
Re: nrf51-dk compile error
here is a patch to apply against the original source code that was available in the blog post
http://evothings.com/how-to-turn-a-nord ... sing-mbed/
as i mention in the other thread; ARM has changed the SDK slightly and BLEDevice.h has been renamed to BLE.h. i will be updating the zip file we have on the blog post and we will also need to reflect this as an update to our examples in the evothings studio download. for now; you will need to apply the patch yourself.
http://evothings.com/how-to-turn-a-nord ... sing-mbed/
as i mention in the other thread; ARM has changed the SDK slightly and BLEDevice.h has been renamed to BLE.h. i will be updating the zip file we have on the blog post and we will also need to reflect this as an update to our examples in the evothings studio download. for now; you will need to apply the patch yourself.
Code: Select all
$ diff -ruN main.cpp.orig main.cpp
--- main.cpp.orig 2015-07-09 08:42:00.000000000 +0800
+++ main.cpp 2015-07-09 08:43:19.000000000 +0800
@@ -6,7 +6,7 @@
#define CONSOLE_LOG
#include "mbed.h"
-#include "BLEDevice.h"
+#include "BLE.h"
//-------------------------------------------------------------------------
@@ -116,10 +116,7 @@
//-------------------------------------------------------------------------
-void onConnection(Gap::Handle_t handle,
- Gap::addr_type_t peerAddrType,
- const Gap::address_t peerAddr,
- const Gap::ConnectionParams_t * connectionParams)
+void onConnection(const Gap::ConnectionCallbackParams_t *params)
{
INFO_NL(">> connected");
@@ -128,10 +125,10 @@
onLedDataWritten(&led_value, 1); // force LED's to be in off state
}
-void onDataWritten(const GattCharacteristicWriteCBParams *context)
+void onDataWritten(const GattWriteCallbackParams *context)
{
// was the characteristic being written to nRF51_GATT_CHAR_LED?
- if (context -> charHandle ==
+ if (context -> handle ==
gatt_characteristics[CHARACTERISTIC_LED] -> getValueHandle())
{
onLedDataWritten(context -> data, context -> len);
Re: nrf51-dk compile error
Back from holiday, tried the patch, and indeed, it is working now.
thanx !
thanx !
Re: nrf51-dk compile error
great - i have since updated the blog post and asked the boys to update the examples repository.
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 7 guests