Now we port the #LoRaWAN Driver ... From Apache #Mynewt OS to #RISCV #BL602

github.com/lupyuen/bl_iot… Image
Our #BL602 #LoRaWAN Driver has many Layers (like Shrek) ... Let's peel the Shrek ... (erm) Layers 🧅

github.com/lupyuen/bl_iot… Image
The Application Layer (left) of our #BL602 #LoRaWAN Driver exposes LoRaWAN Functions to Application Firmware ... Join Network, Open/Close Port, Transmit/Receive Packets

github.com/lupyuen/bl_iot… BL602 LoRaWAN Driver: Appli...
#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

mynewt.apache.org/latest/tutoria… Image
For #Arduino Fans: @RAKwireless has a #WisBlock #LoRaWAN Tutorial ... We shall try this later

github.com/RAKWireless/Wi… Image
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)

github.com/lupyuen/bl_iot… Image
What's MCPS in the #BL602 #LoRaWAN Driver? ... That's the "MAC Common Part Sublayer", which is defined in the Semtech LoRaWAN Stack

stackforce.github.io/LoRaMac-doc/Lo… Image
Semtech #LoRaWAN Stack is structured according to IEEE 802.15.4 ... Yep LoRaWAN shares the same legacy as Thread, Zigbee and 6LoWPAN! We shall port this #IoT Legacy to #BL602

en.wikipedia.org/wiki/IEEE_802.… Image
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

github.com/lupyuen/bl_iot… Image
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!

lupyuen.github.io/articles/lora2… Image
Curiously, our #BL602 #LoRaWAN Driver includes a Command-Line Interface (bottom) that Transmits and Receives LoRa Packets ... Directly calling the SX1276 Driver 🤔

github.com/lupyuen/bl_iot… Image
Uh-oh our #BL602 #LoRaWAN Driver (from Mynewt) passes LoRaWAN Packets in Mbuf Format ... Let's find something equivalent on BL602 🤔

github.com/lupyuen/bl_iot… Image
What's an Mbuf? Why is it used by our #BL602 #LoRaWAN Driver? Mbufs are Chains of Fixed-Size Blocks ... Works great with little RAM (no fragmentation) ... Created for BSD Unix in 1983!

mynewt.apache.org/latest/os/core… Image
#BL602 IoT SDK has a "pbuf" in the lwIP Lightweight TCP/IP Stack ... Maybe our BL602 #LoRaWAN Driver can use this instead of Mbuf? 🤔

github.com/lupyuen/bl_iot… Image
Here's a friendly doc by STMicro that explains MCPS Messaging in our #BL602 #LoRaWAN Driver

st.com/content/ccc/re… Image
...Which explains why so many folks at STMicro are now reading this #BL602 #LoRaWAN Thread

😉 Image
Yep "pbuf" from the #BL602 Lightweight IP Stack can be used instead of Mbuf ... We just need to shift the Header / Payload Pointer to work on #LoRaWAN Packets

github.com/lupyuen/bl_iot… Image
We verify that #BL602 "pbuf" Packet Buffers can handle a full #LoRaWAN Packet ... Header: 20 bytes, Max Payload: 255 bytes

github.com/lupyuen/bl_iot… Image
Why #BL602 "pbuf" is OK for handling #LoRaWAN Packets

github.com/lupyuen/bl_iot… Image
Our #LoRaWAN Driver uses Mbuf Queues (from Mynewt OS) ... We shall convert them to #BL602 pbuf Event Queues ... From the NimBLE Porting Library

github.com/lupyuen/bl_iot… Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Lup Yuen Lee 李立源

Lup Yuen Lee 李立源 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!