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

Receiving on a set BLE frequency

HI!

I'm currently working on a project where I'd like to send and receive BLE messages using my own channel hopping mechanism.

I've read into the 17.0.2 Examples > Peripheral > radio_test files for a first look at this but I'm having trouble actually making sure the things that I'm sending on a set frequency are able to be received.

As it seems easier to first do an unmodulated message, Id preferred doing this first

So far I have as peripheral/sender

/**
 * 
 * Function from radio_test.c example, line 306
*/

void radio_unmodulated_tx_carrier(uint16_t channel)
{
    radio_disable();

    //Radio modes constants: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__radio__hal.html#gacf631e29d43c93acac290a18850e9c40
    nrf_radio_mode_set(NRF_RADIO_MODE_BLE_1MBIT);
    //Using standard BLE 1MBit/sec

    //Radio tx powers constants: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__radio__hal.html#gaf10bff1d03d8156b3af56540701d6b3d
    nrf_radio_txpower_set(NRF_RADIO_TXPOWER_0DBM);

    //Set the frequency, in MHz
    nrf_radio_frequency_set(channel);

    //Task constants: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__radio__hal.html#ga607fff2f027c323b3dc8af40ab489a2f
    nrf_radio_task_trigger(NRF_RADIO_TASK_TXEN);
}

Which I derived from the mentioned example.

But now I'm having trouble receiving this. Also because I can't seem to find a good tutorial or something to explain this.

( https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__nrf__radio__hal.html is an empty reference guide?)

The current receiving function that I have is almost identical but changing the last task trigger to a 'TASK_RXEN' instead of 'TX'.

Any help or a good tutorial link :)?

Besides this I have some questions as well

1. This radio_disable() function, is this needed? It seems that if I boot up the board it should be disabled by default, why start by disabling this?

2. As of Bluetooth 5 we have bigger beacon packets. I assume this Radio HAL is only capable of using this 255byte message size right? The examples are using rather small payloads so I can't really tell.
Now that I'm typing this I'm not sure that this is even how this works, will look into this right after this post :)

3. Something totally unrelated, but I've spend too much time on this already so I figured I'd ask now.
I am still unable to turn on my LEDS in any way. I've flashed the basic turn-on-the-4-LEDS-examples, looked at the code, tried to replicate my own bsp_board_leds_on() functions, sdk_config should be fine? It's so basic that I gave up putting time into but it would be nice to toggle a led when an event occurs for example.

Currently the only LED blinking is the yellow power one.

Any tips?

Thanks in advance, 

Steven

Parents Reply
  • Great, got a personal project working with some IO and logging functionalities.

    I do like the way this type of project is set up :)

    I'm still not sure how to use the provided functions. I've looked around in the bluetooth > controller > ll_sw directory, but I'm not sure what to use. There are very similar files (for example ll.h, lll.h, the radio.h in nordic > hal > nrf5)

    Thanks,

    Steven

Children
Related