I want to develop C# program to get product rssi value on specific channel by using nRF52840 dongle pca10059

I 'm developing a program (C# ) on PC for the nRF52840 dongle (pca10059) that is a RSSI scanner.

Scanning different BLE channels in the environment. The program is much like the nRF connects "RSSI viewer".

Finally,the goal of program is to scan for RSSI values while not connecting to any device, just scan a specific channel.

Here, What approach should I manually get rssi value from nRF52840 dongle (pca10059)?

Thanks!

 

Benny_Lin

Parents
  • Hi,

    We do not have any application examples implemented in C#, but the source code for the nRF Connect RSSI application (written in Node.js) is available on GitHub.

    The firmware running on the boards are also available in source code, and can be built for the nRF52840 Dongle. The RSSI application communicates with the dongle over USB CDC ACM, so it should be possible to integrate the required functionality in your C# application.

    Best regards,
    Jørgen

  • Benny_Lin said:
    The main.c is the RSSI viewer source code?

    No, main.c is the source code of the firmware running on the Dongle. The RSSI viewer application source code is found in https://github.com/NordicSemiconductor/pc-nrfconnect-rssi/tree/master/src.

    Benny_Lin said:

    I study and follow main.c . I manually use putty tool connect to Dongle via usb and send "start" 

    the response is 

    I'm not sure what format you are reading in Putty, but is I'm not sure it is converted correctly in the txt file.

    The packets from the RSSI firmware is 3 uint8_t bytes, starting with 0xFF, then the channel number, and finally the RSSI value:

  • Hi Jørgen

    My Result SCANLOG.txt from below 

    My DUT is nRF52840 pca10059 dongle

    1. open nRF Connect and select RSSI Viewer

    2. Download firmware RSSI Viewer by using DFU

    3. Open Putty Tool and Set Serial 

    4. From Screen , Key "start",then display response

    5.Save response to txt and name to SCANLOG.txt

    Here,

    Could you help to show your operate procedure?

    Thanks!

  • Hi,

    I'm using a similar approach to you, but I used RealTerm instead of PuTTY. Here you can set the "Display as" to uint8, so it is easier to read the actual values being transmitted. PuTTY will show the received data value as ASCII characters, which may not make sense when the data is binary.

    You can send the "start" command from "Send" tab. Enter the command in the textboc, check the "+RC" checkbox under EOL, and click the "Send ASCII" button.

    Best regards,
    Jørgen

  • Hi Jorgen

    I follow your SOP and successfully implement.

    But, I discovered problems. 

    Problem1

    From RSSI Viewer BLE channel range 0~39, In packet from RSSI firmware channel range is 0~80

    What difference is between RSSI Viewer channel and In packet from RSSI firmware channel?

    Problem2

    If do advertise RSSI value (channel 37 38 39) ,what command should I send?

    Could you help to analysis

    Thanks

  • Benny_Lin said:

    Problem1

    From RSSI Viewer BLE channel range 0~39, In packet from RSSI firmware channel range is 0~80

    What difference is between RSSI Viewer channel and In packet from RSSI firmware channel?

    The RSSI firmware measures RSSI on all frequencies/channels between 2400MHz and 2480MHz in 1 MHz steps. The BLE channels are placed between 2402MHz to 2480MHz, in 2MHz steps. If you are only interested in the BLE channels, you need to filter these out in your application, or modify the RSSI firmware to only measure RSSI on the relevant channels.

    Benny_Lin said:

    Problem2

    If do advertise RSSI value (channel 37 38 39) ,what command should I send?

    The RSSI firmware can be limited to only report advertising channels (2402, 2426, 2480MHz), by sending "scan adv true" before sending "start" command. To go back to all channels, send "scan adv false" command.

Reply
  • Benny_Lin said:

    Problem1

    From RSSI Viewer BLE channel range 0~39, In packet from RSSI firmware channel range is 0~80

    What difference is between RSSI Viewer channel and In packet from RSSI firmware channel?

    The RSSI firmware measures RSSI on all frequencies/channels between 2400MHz and 2480MHz in 1 MHz steps. The BLE channels are placed between 2402MHz to 2480MHz, in 2MHz steps. If you are only interested in the BLE channels, you need to filter these out in your application, or modify the RSSI firmware to only measure RSSI on the relevant channels.

    Benny_Lin said:

    Problem2

    If do advertise RSSI value (channel 37 38 39) ,what command should I send?

    The RSSI firmware can be limited to only report advertising channels (2402, 2426, 2480MHz), by sending "scan adv true" before sending "start" command. To go back to all channels, send "scan adv false" command.

Children
Related