Now we port the #LoRaWAN Driver ... From Apache #Mynewt OS to #BL602
https://github.com/lupyuen/bl_iot_sdk/tree/lorawan/components/3rdparty/lorawan
Our #BL602 #LoRaWAN Driver has many Layers (like Shrek) ... Let's peel the Shrek ... (erm) Layers 🧅
https://github.com/lupyuen/bl_iot_sdk/tree/lorawan/components/3rdparty/lorawan
The Application Layer (left) of our #BL602 #LoRaWAN Driver exposes LoRaWAN Functions to Application Firmware ... Join Network, Open/Close Port, Transmit/Receive Packets
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/3rdparty/lorawan/src/lora_app.c
#Mynewt OS has a #LoRaWAN Command-Line App that calls the Application Layer of the LoRaWAN Driver ... We shall port this app to #BL602 too
https://mynewt.apache.org/latest/tutorials/lora/lorawanapp.html
For #Arduino Fans: RAKwireless has a #WisBlock #LoRaWAN Tutorial ... We shall try this later
https://github.com/RAKWireless/WisBlock/tree/master/examples/communications/LoRa/LoRaWAN
The Node Layer (centre) in our #BL602 #LoRaWAN Driver handles the networking operations for our BL602 LoRaWAN Node ... It's called by the Application Layer (left)
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/3rdparty/lorawan/src/lora_node.c
What's MCPS in the #BL602 #LoRaWAN Driver? ... That's the "MAC Common Part Sublayer", which is defined in the Semtech LoRaWAN Stack
https://stackforce.github.io/LoRaMac-doc/LoRaMac-doc-v4.4.7/index.html
The Medium Access Control Layer (right) of our #BL602 #LoRaWAN Driver implements the LoRaWAN Protocol: Encryption, Receive Window, Duty Cycle, ... It exposes the MCPS Messaging Interface (IEEE 802.15.4) to the Node Layer (centre) via an Event Queue
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/3rdparty/lorawan/src/mac/LoRaMac.c
The #LoRaWAN Protocol is explained in this thread: Encryption, Receive Window, Duty Cycle, ...
How shall we implement the #BL602 #LoRaWAN Event Queue for the Medium Access Control Layer? With the NimBLE Porting Layer of course!
https://lupyuen.github.io/articles/lora2#multitask-with-nimble-porting-layer
Curiously, our #BL602 #LoRaWAN Driver includes a Command-Line Interface (bottom) that Transmits and Receives LoRa Packets ... Directly calling the SX1276 Driver 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/3rdparty/lorawan/src/lora_cli.c
Porting pbuf Packet Buffer Queue from Mynewt OS to #BL602 ... Makes me hungry for Peanut Butter Jelly Sandwich 🤤
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/3rdparty/lorawan/src/pbuf_queue.c
Using this simpler Windows CMD script to build the #BL602 #LoRaWAN Driver ... Quicker for fixing build errors
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/customer_app/sdk_app_lorawan/run.cmd
Add the "c_cpp_properties.json" file to #VSCode ... So that our #BL602 #LoRaWAN Build Errors are highlighted
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/.vscode/c_cpp_properties.json
Reference Implementation of Semtech #LoRaWAN Stack is here ... Includes drivers for SX1262 and SX1276
Bought the RAKwireless #LoRaWAN Gateway: #WisGate Developer D4H ... Will benchmark this with #Pine64 LoRa Gateway (Also based on RAKwireless RAK2287)
https://docs.rakwireless.com/Product-Categories/WisGate/RAK7248/Datasheet/
#ChirpStack on RAKwireless #WisGate can generate random Application Keys for #LoRaWAN Over-The-Air Activation (OTAA) ... We shall use keys to activate our #BL602 and #WisBlock devices wirelessly
https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/
Something (or Someone) is transmitting #LoRaWAN Packets every minute ... Signal Strength (RSSI) shows that they're a few hundred metres away
https://gist.github.com/lupyuen/8dacf002196507695a7624ef7f80a34f
Based on earlier #LoRa Coverage Testing (with #BL602 and #WisBlock) ... High chance that our Mystery #LoRaWAN Transmitter is at the nearby Subway Station 🤔
https://lupyuen.github.io/articles/wisblock#analyse-the-lora-coverage
Someday I might walk around with RAKwireless #WisGate to find the Mystery #LoRaWAN Transmitter ... But for now let's test WisGate with WisBlock and BL602!
https://docs.rakwireless.com/Product-Categories/WisGate/RAK7248/Datasheet/
Still fixing #LoRaWAN Driver for #BL602 ... So let's test WisGate with WisBlock first
https://github.com/lupyuen/bl_iot_sdk/tree/lorawan/components/3rdparty/lorawan
@lupyuen
Cool code Prof. Much success. Btw what os is new platform youre porting to? Old one was this apache newt right?
@lupyuen
You need to think of secu now. Who is and who isnt allowed on the net. Either no entrance from blacklist or whitelist guests only allowed.
@lupyuen
One more hint. Try to measure signal strength and drive around with detector and record gps plus power detected.
That should help to narrow it down.
Good luck.
#BL602 IoT SDK has a "pbuf" in the lwIP Lightweight TCP/IP Stack ... Maybe our BL602 #LoRaWAN Driver can use this instead of Mbuf? 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorawan/components/network/lwip/src/include/lwip/pbuf.h#L185-L222