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

Adapting examples for NRF52840 dongle PCA10059

Greeting to Nordic Team!

I'm new to nordic devices as well as Q&A section, so apologies in advance if I make any mistakes raising a question.

Two things I would like to discuss:

Intro and adaptions I have made so far:

I have got two NRF52840 dongle, but no nrf52DK. I have downloaded and installed nrfConnect, Segger Embedded Studio, and SDK 15.2.0 as well as SDK15.3.0 (I wasn't sure which one I will be needing)I have gone through coule of tutorials fro BLE and Adapting examples for dongle links as follows:

1. https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial

2. https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial

3. https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial

and finally for adapting examples for dongle

https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial

Example in use: blinky_app

The first problem :

      I faced was as guided in the dongle programming tutorial, I can't see any preprocessor definitions rather the it says "inherit" and when I click three dots besides it, I find the text box complete empty and nothing over there. Do I need to write all of the stuff shown in the tutorial by myself or it appears by itself and I just need to remove the PCA10056 and replace it with PCA10059. If so, why my preprocessor definitions seems empty. same is case with the linker option it says "inherit" and the text box for linker is empty. Please provide an explanation for this.

Also in a thread I read, I need to explicitly undefine the board I'm not using(in this case it would be PCA10056). Link https://devzone.nordicsemi.com/f/nordic-q-a/43760/adapting-the-blinky-example-from-the-nrf52840-dk-to-the-nrf52840-dongle/171455#171455. Do you confirm this? 

The main Issue:

    I wish to create a project on nrf52840 dongle that accepts data from android app and stores it on SD card and later retrive it and send it to the desktop computer, all these is expected to happen over BLE. One of my friend has created an android app which has a form like structure which accepts several information from the user like Name, age, address, nature of complaints, complaints, etc. So far I'm able to connect my NRF52840 dongle with the android app and nothing further than that. Which SDK examples should I refer for my project? Or do I need to write completely different program for my project? as said earlier this my first time working with NRF device previously I have extensively worked with Arduinos and ESPs.

waiting for timely help and valuable guidance. Thanks in advance

Parents
  • Hi,

    If so, why my preprocessor definitions seems empty. same is case with the linker option it says "inherit" and the text box for linker is empty. Please provide an explanation for this.

    The reason you only see "inherit" is that you have not selected the common configuration. "Release" and "Debug" both inherit from "Common", and that is where you should do your changes. Please see this screenshot:

    Also in a thread I read, I need to explicitly undefine the board I'm not using(in this case it would be PCA10056). Link https://devzone.nordicsemi.com/f/nordic-q-a/43760/adapting-the-blinky-example-from-the-nrf52840-dk-to-the-nrf52840-dongle/171455#171455. Do you confirm this? 

    No. There is no need to undefine the other board, just remove the definition in the first place, and add the correct one for the dongle.

    Regarding your application, there are no examples that do this for you, but you can find several relevant examples in the SDK. You can find an SD card example under HW peripheral examples and several relevant BLE peripheral examples. You can also find examples of USB CDC for communication with the computer over USB if that is the intention.

    Please note that I recomend obtaining an nRF52840 DK to do the development since having a debugger is essential when sorting out issues.

    Br,

    Einar

Reply
  • Hi,

    If so, why my preprocessor definitions seems empty. same is case with the linker option it says "inherit" and the text box for linker is empty. Please provide an explanation for this.

    The reason you only see "inherit" is that you have not selected the common configuration. "Release" and "Debug" both inherit from "Common", and that is where you should do your changes. Please see this screenshot:

    Also in a thread I read, I need to explicitly undefine the board I'm not using(in this case it would be PCA10056). Link https://devzone.nordicsemi.com/f/nordic-q-a/43760/adapting-the-blinky-example-from-the-nrf52840-dk-to-the-nrf52840-dongle/171455#171455. Do you confirm this? 

    No. There is no need to undefine the other board, just remove the definition in the first place, and add the correct one for the dongle.

    Regarding your application, there are no examples that do this for you, but you can find several relevant examples in the SDK. You can find an SD card example under HW peripheral examples and several relevant BLE peripheral examples. You can also find examples of USB CDC for communication with the computer over USB if that is the intention.

    Please note that I recomend obtaining an nRF52840 DK to do the development since having a debugger is essential when sorting out issues.

    Br,

    Einar

Children
  • Regarding your application, there are no examples that do this for you, but you can find several relevant examples in the SDK. You can find an SD card example under HW peripheral examples and several relevant BLE peripheral examples.

    Thanks for your reply. Can you please point me to particular examples which I should go through? That would be of really great help. Since I'm newbie, I find it lil difficult understanding the entire examples. Which examples should I refer to receive data like I mentioned earlier from the Android app and where I can find its relevant documentation? 

    Once again, heartiest thanks for your reply and I'm gonna try switching that thing to "common". 

    Regards

  • I changed the setting to common and then I right click on the project and hit build. I am using ble_app_uart example now. it gave me couple of errors. I am attaching a screenshot of the same. what am I missing now? is uart example not meant to be used with dongle? if so what is the alternate example which would serve the purpose of uart example

  • Hi,

    There are no examples that do everything for you, and some things are not covered by any example. Specifically, these examples seem useful, but there may be others as well:

    • SD Card Example
    • For communicating with phone and PC as a peripheral device, you can refer to several peripheral examples, but it is perhaps easiest to start with UART/Serial Port Emulation over BLE. This gives you an easy way to send data back and forth.
  • Hi,

    You get the error because RX_PIN_NUMBER, TX_PIN_NUMBER, CTS_PIN_NUMBER and RTS_PIN_NUMBER are undefined. If you refer to components\boards\pca10056.h you will see that it is defined there (for the nRF52840 DK), which is because they are connected to the UART-USB bridge. The nRF52840 Dongle does not have a UART-USB bridge, and that is probably why they are not defined. So in order to use UART with the dongle, you just need to decide which pins you are using for UART, and add these defines to components\boards\pca10059.h with the correct pin numbers. Then you need to connect these pins to your UART device (for instance an external UART-USB bridge if connecting to a PC).

  • Can you assit me in pointing out to any document which explains this in bit more detail I am bit confused about its implementation right now. I want to connect the dongle to my PC and I want to receive data from android app to this dongle and view it on serial monitor software like arduino serial montor or any one similar to that.

    If I define any two pins as UART pins then how it would be possible? Should I then connect these pins to module like CP2102 and plug that module into the computer?Which example I should be using peripheral or the central Uart? or like what? Sorry if my question is too amateur but I'm really confused about this part

Related