measurement of RSSI or transit time of a message via BLE with the Nordic 52840 and another slave board.

I have this problem, with a Nordic nRF52840 board I have to transmit a byte of known length, which I have to select a priori, and transmit it to a second slave evaluation board and then measure the RSSI value and the time it takes for the data packet to arrive depending on where the board is located, thus also going back to the distance value at which the two boards are located.
I would then also like to do the same thing with my android smartphone used as a slave.

I have tried to follow the examples I can find of nRF connect for desktop a bit, and in particular the codes available in visual studio code, but the standard codes there do not seem to answer my question.
Could you perhaps help me by explaining where to find an example code to modify to achieve this, and how to program the second board via the nRF52840?

thanks in advance!

Parents Reply Children
  • Hi, 

    Take a look at this post on how to set the sample for BC840E. 

    Leonardo Balocchi said:
    Can I directly connect the BC840-E to the computer and flash it from VS Code as I did with the nRF52840?

    According to https://www.mouser.com/datasheet/2/915/BlueNor_BC840_datasheets-1622924.pdf, A Nordic nRF52840 DK is recommended for programming this evaluation board.

    -Amanda H.

  • Hi Amanda, thanks again for your reply.
    I'm sorry, but I'm still not clear on the process for programming the BC840 E board.
    If you could tell me the exact steps to follow I would be very grateful.

    From the datasheet of the BC840E board I see that the following line of code must be written from the terminal (with the nRF52840 connected to the PC I imagine, and the other BC840E board connected both to the PC for power and to the nRF52840 with the 10 connection wires): nrfjprog -f NRF52 --program BT840_AT_3in1PC181113.hex --chiperase --reset

    However when I try to run this line from nrf Serial Terminal and having selected the nRF52840 device it tells me "Please connect a device". Also, how is the file I want to load specified? and more importantly, where is it taken from and how does the terminal find that file path?

    Could you explain to me step by step what to connect and how to do it? 

  • Hi,

    Leonardo Balocchi said:
    From the datasheet of the BC840E board I see that the following line of code must be written from the terminal (with the nRF52840 connected to the PC I imagine, and the other BC840E board connected both to the PC for power and to the nRF52840 with the 10 connection wires): nrfjprog -f NRF52 --program BT840_AT_3in1PC181113.hex --chiperase --reset

    To run that command, you need to install nRF Command Line Tools.

    Guess you can program the BC840E directly without connecting nRF52840DK. You could try to program that image to see whether it can work or not.  

    To test the nrf_dm application for BC840E, refer to that post on the previous reply to add the config to the prj.conf, and then build/program via VS code. 

    -Amanda H.

  • I'm sorry Amanda, I still haven't managed to program the BC840E.
    I had already installed nRF command line tool, it is the first thing it makes me install following the nRF desktop installation tutorial.

    If I try to launch it by running the nrfjprog file it opens and closes the terminal for me, so I think this terminal is something that is already built into nRF desktop, and should not be opened separately.
    On the other hand, if I try to connect to the board from nRF serial terminal v1.1.0 (i.e. within nRF desktop) it tells me that no device is connected.

  • Hi, 

    Are you able to launch the nrfjprog by the Command Prompt and type "nrfjprog -v"? If so, you can program with that command provided by BC840E datasheet.

    You also could use nRF Connect Programmer to program the image. 

    -Amanda H.

Related