Read the articles...
Semtech LoRaWAN endpoint stack, ported to BL602 from Apache Mynewt OS...
https://github.com/apache/mynewt-core/tree/master/net/lora/node
BL602 LoRaWAN firmware with command-line interface is here...
pinedio_lorawan
: BL602 LoRaWAN Firmware
To add this driver to an existing BL602 / BL604 project:
cd bl_iot_sdk/components/3rdparty
git submodule add https://github.com/lupyuen/lorawan