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
  • Hi Amanda, about your answer "I recommend that you use the Radio test sample, then select only one channel, like channel 40 as an example. Then put it in TX mode": To set the parameters you specified, do I have to act directly on the source code, or is there an easier way to do it?
    I read in the link you sent me about commands that can be entered via the user interface, but I didn't quite understand what it is and how I can use it.

    it is not possible to do this directly from nrf Connect Desktop?

    And when I try to insert the commands I found under "user interface" (for example print_rx or start_channel) in the link "Radio test (short range)" example you linked me, in the nrf Serial Terminal (nrf Desktop Connect tool), they do not work.

Children
  • Hi,

    Leonardo Balocchi said:
    To set the parameters you specified, do I have to act directly on the source code, or is there an easier way to do it?

    Try to send the following commands on the top of the nRF Serial Terminal to do a modulated carrier at frequency 2440MHz: 

    start_channel 40

    start_tx_modulated_carrier 

    Then used an nRF52DK/nRF52840DK connected to the nRF RSSI viewer app (nRF Desktop Connect tool) to confirm that the DUT was transmitting. 


    You can see the 2440MHz channel rise up. 

    -Amanda H.

  • Hi Amanda,

    I tried repeating the tests you told me, entering the sequence of commands (start_channel 40 and start_tx_modulated_carrier) but the result is not what I see in your photo.
    I attach a photo of the result I see:

  • Hi, 

    You should make sure the Radio test sample runs on your test target BC840E board and get the boot-up log as my figure. Then, type the commands and get the corresponding return.

    Amanda Hsieh said:

    Then, use a nRF52840DK to connect the nRF RSSI viewer app. 

    -Amanda H.

  • Hi Amanda,

    I tried to upload the example you described and which I found within the GitHub repository (github.com/.../radio_test.c ), as within the examples provided by NRF Connect in VS code, there is no radio_test example.
    Downloading it and doing "open an existing application" in VS Code gives the following errors during compilation:

    1) "No SOURCES given to Zephyr library: lib__libc__common".
    2) "implicit declaration of function 'NRFX_MHZ_TO_HZ' [-Wimplicit-function-declaration]"

    in the default code found on the net, without making any changes.
    How can I proceed to resolve these errors?
    The library mentioned in the error is also present in other applications that run without errors.
    It should also not be a folder location error.

    and also if I try to add the prj.conf file configuration in the building these errors pop up:

    1) sys/printk.h: No such file or directory

     2) #include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (C:\Users\leonardo\Downloads\sdk-nrf-master\sdk-nrf-master\samples\peripheral\radio_test\src\radio_cmd.c).

     3) cannot open source file "init.h"

     4) init.h: No such file or directory

     5) cannot open source file "shell/shell.h"

  • Hi, 

    Which NCS version are you using?

    The radio_test sample can be found under samples/peripheral/radio_test in the nRF Connect SDK folder structure.

    I would suggest you update the SDK via the Toolchain Manager and then load the radio_test sample from the NCS instead of downloading it from the web. 

    -Amanda H.

Related