6 years, 5 months ago.

LoRa (LMiC) + Bluetooth Low Energy in one mbed program

I have a nRF51-DK dev board with a SX1276 LoRa shield. I combined the code from BLE_PhysicalWeb and LoraMacInC in my project and everything compiles fine.

If you look at the how-to to use the BLE and the LoRa examples then they both have different ways of keeping the program alive (presumably to lower battery use). BLE via:

    while (true) {

And lmic via:

os_runloop(); // this does the while(true) internally, but also calls hal_sleep()

I want to run both the LoRa and the BLE code at the same time. I figured I could use the threads from rtos but that's not supported on the Nordic chip.

Any tips?

Be the first to answer this question.