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

Adapting ble_app_blinky_c to work with nRF52840 Dongle

Using this \nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_blinky and nRF5_SDK_17.0.2_d674dde\examples\ble_central\ble_app_blinky_c

As described in \examples\ble_central\ble_app_blinky_c 

I am using win 10, VS Code and a Dongle!!!

The \examples\ble_peripheral\ble_app_blinky works fine and I can use the Android app BlinkyTest to flash the dongle (using nrfutil, not nrfjprog) to test it and it works ok, so I assume I have a working toolchain.

Basically I want to make one dongle (the server, aka ble_app_blinky) turn the light on and off on the other dongle (the client akak ble_app_blinky_c)  (and for the server to recognise that a button was pressed on the client dongle). At least that is how I read the documentation says it should work.

I realise that I will have to make adjustments to at least main.c to re-assign the leds and buttons, but first I need to get the thing to build.

Because you don't have a dongle version of the examples\ble_central\ble_app_blinky_c I am trying to adapt it to work with the dongle pca10059. To do this I have copied over the code from the pca10056 folder. I have adjusted the Makefile and c_cpp_properties.json which tells the compiler where to look for the include files. (I am a bit of a noob with C, but I'm getting there).

So my first problem is that I am getting problems with intellisense telling me that in main.c


90  NRF_BLE_SCAN_DEF(m_scan);
and some other stuff isn't defined.        
So if I go to the definition I locate nrf_ble_scan.h   I have referenced this in my include files
However, at about line 137 I am getting a strange error where it is saying it doesn't like a "const"!!!
typedef struct
{
    ble_gap_scan_params_t const * p_scan_param;    
And at this point I'm stuck.
I'm assuming that ble_gap_scan_params_t
 is defined somewhere, but the IDE is telling me that it is defined in 17 out of 20 files. I'm thinking I'm on a lost trail here.
Any ideas please.
By the way any thoughts on what else I might need to look at (like removing any Segger stuff) that I should consider?
Of course the ideal solution for me would be for Nordic to provide an actual version for the dongle!!!!! I mean, you sell it after all Slight smile
Thanks
Gordon.

Parents Reply
  • Not really "figured out" et. I'd really like to stick with VS Code and I think I'm very close. Why do you think it is a VS Code linker issue. I'm not getting any errors with the linker as the thing builds. The VS Code linker is just the

    GNU Arm Embedded Toolchain/10 2020-q4-major

    toolchain one isn't it?

    The issue seems to be with configuring includes or defines I think. I'm only a newbie at this stuff. More a Javascript guy.

Children
No Data
Related