Hacker News new | ask | show | jobs
by andoma 532 days ago
Yup, Rolled my own BLE Peripheral stack on NRF52 relying on nothing but Nordic's docs and the BLE specification. It's not fully feature complete but works well enough for me to communicate with the mcu from my MacBook using l2cap connections.
1 comments

The people in these talks go quite a bit further than just BLE packet TX/RX (which you can do with the documentation on most chips). In theory this work allows implementing a totally different protocol.
Nordic supports this explicitly I thought. (Others I agree but they often have crappy stuff anyway)
Yes, though sharing BLE with other protocols is challenging (even with first-class citizens like ANT+ there are various caveats). The proprietary protocols are Shockburst/Gazelle [0] which are based of the ancient nrf24 setup.

Having said that, the radio peripheral on the chip is dead simple to drive bare-metal. Create a packet (with the convenience function), put its address in a register and hit the 'send' bit (more or less, glossing over waiting for ready bits here). Receiving is as easy - point to where you want packets to land, go into RX mode and wait for the "packet received" bit to be set.

[0] https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/exa...