This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf51 ble advertising

I'm trying to do BLE advertising with an nRF51 without the softdevice, has anyone already tried this? maybe there is an example of this?

Parents
  • There is also this alternative implementation: github.com/.../ See the radio-broadcaster example specifically.

  • If you copy the RADIO0 configuration options from radio.c in the example I linked, and strip out the callback and state stuff, you will have the simplest advertiser you can get. You probably want a timer implementation to do multiple advertisements, and the blessed stack has support for this. It can also do callbacks when RX/TX happens in case you want to implement scan responses. In the simplest sense, you have to configure the radio fields (MODE, TIFS, PCNF1, CRCCNF, CRCPOLY, etc.), then set PACKETPTR to some uint8_t[39], put your data in there, then enable start TASKS_RXEN. If the READY->START SHORTS is set, the radio will automatically transmit the packet once it is ready. You have to repeat this for all advertising channels (37, 38 and 39).

    This might sound complex, but I think "blessed" solves this in an easy-to-understand way.

Reply
  • If you copy the RADIO0 configuration options from radio.c in the example I linked, and strip out the callback and state stuff, you will have the simplest advertiser you can get. You probably want a timer implementation to do multiple advertisements, and the blessed stack has support for this. It can also do callbacks when RX/TX happens in case you want to implement scan responses. In the simplest sense, you have to configure the radio fields (MODE, TIFS, PCNF1, CRCCNF, CRCPOLY, etc.), then set PACKETPTR to some uint8_t[39], put your data in there, then enable start TASKS_RXEN. If the READY->START SHORTS is set, the radio will automatically transmit the packet once it is ready. You have to repeat this for all advertising channels (37, 38 and 39).

    This might sound complex, but I think "blessed" solves this in an easy-to-understand way.

Children
No Data
Related