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
  • Hello Amanda, thanks for your reply.

    The two boards communicate, but I have encountered a problem.
    I'll explain the hw and sw setup: one board is the nRF52840 which was loaded with the nrf_dm application, the other is the evaluation board BC840E which has the default program with which it was pre-loaded (so I didn't program it).

    I placed the two boards 1m apart, and for the 2.4 GHz frequency I should have a path loss of 40.04 dB.
    On the BC840E board I connected a 5 dBi gain antenna.
    Knowing that the nRF52840 in transmission I set it for 0 dBm and that the antenna gain on the nRF52840 is 0 dBi, I should see about -35 dBm of RSSI, the problem is that the measured RSSI is about -2 dBm.
    (if I don't put the external antenna on the BC840E the count doesn't add up, in fact I see rssi_openspace=199.53, which isn't correct anyway).

    I can't tell if I have misinterpreted the RSSI value, can you please clarify this for me?

    Thanks in advance!

  • Hi, 

    I would suggest programming both boards with the nrf_dm application and comparing the result of using two nRF52840DKs with the nrf_dm application.

    -Amanda H.

  • How can I copy the programme on the nRF52840 to the BC840E board as well?
    I have the 10-wire connector to connect the two boards, but then what do I have to do from VS Code?

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

  • 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? 

Related