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

How to transmit and receive beacons using nRF51 DK?

I need to transmit and receive beacons using nRF51 DK. I saw a few examples in the SDK ble_beacons where we use the app, but I need code to transmit and receive both using the nRF51 Development kit. Also, can you give me steps for setting up GCC for the nRF51DK, how do I setup that IDE for using it with the DK, if there are any youtube videos for setting up the GCC for the nRF51DK please send me the links. Also while receiving the beacons, I need the RSSI value at the receiver and how do I get that value?  Thank you so much for your help. Also, I need to know while transmitting from one nRF51DK to another is it necessary to pair the boards etc?

  • Hi,

    I need code to transmit and receive both using the nRF51 Development kit.
    First of all I think there is a misunderstanding regarding beacons. A BLE beacon is per definition not receiving anything. It is just mindlessly broadcasting a handful of bytes. If you want bidirectional communication between two nRF51 devices I suggest that you start out with the UART/Serial Port Emulation over BLE and Nordic UART Service Client examples. 

    can you give me steps for setting up GCC for the nRF51DK
    Unfortunately, we only have this relatively old tutorial: Development with GCC and Eclipse

    I need the RSSI value at the receiver and how do I get that value? 
    Please have a look at these APIs: sd_ble_gap_rssi_start(), sd_ble_gap_rssi_stop(), and sd_ble_gap_rssi_get().

    I need to know while transmitting from one nRF51DK to another is it necessary to pair the boards etc?
    It depends. But I suspect that you might be confusing BLE pairing and bonding.

     

  • Hello MartinBL,

    First of all thank you so much for your help. I tried to execute the Nordic UART service Client on two dev boards, I programmed both the soft device and the hex file into both the boards ( I am not sure if I had to program both the boards with the same code but that's what I did) and both of those boards were advertising and not able to connect to each other. If you have any solution for that please let me know.

    Also, I executed the radio transmitter and receiver example in the SDK, Its path is <InstallFolder>\examples\peripheral\radio\receiver and <InstallFolder>\examples\peripheral\radio\transmitter. My question is is there some sort of API I can use to get the RSSI or the signal strength on the receiver side because I think the API's that you mentioned above are for BLE and this application does not use BLE. So if you had something that would be really helpful for my project.

  • Hi,

    BLE devices have various roles and you need both a Central and a Peripheral to make a link (See Ole Morten's comment here). This means that you cannot use the Nordic UART service Client example on both boards, but you need to use examples:

    <InstallFolder>\ble_peripheral\ble_app_uart

    on one board and

    <InstallFolder>\examples\ble_central\ble_app_uart_c

    on a different kits. The peripheral should then advertise and the central should scan. When the Central receives the advertising packets it will initiate the the connection. 

    To get the RSSI you can read the RADIO->RSSISAMPLE register (Reading this register directly will not work if you are using a softdevice since the softdevice is restricting your applications access to the radio peripheral).

  • Hello,

    First of all, while using the radio, I am not programming the soft device ( it was not there in the instructions on the infocenter page) and it is transmitting and receiving properly. How do I read the register as in what is the code for that? and if I cannot read it directly how should I go about it? 

  • Hi,

    If you are not using a Softdevice you can read the register directly. For example like this: uint32_t rssi = NRF_RADIO->RSSISAMPLE;

    To clarify, the Softdevice is Nordic's proprietary stack for BLE and ANT. If you use it, it will block and restrict access to certain peripherals as you can see in this list

Related