Lup Yuen Lee 李立源 Profile picture
IoT Techie and Educator / Apache NuttX PMC @lupyuen@qoto.org

Apr 7, 2021, 21 tweets

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

github.com/lupyuen/bl_iot…

Our #BL602 #LoRaWAN Driver has many Layers (like Shrek) ... Let's peel the Shrek ... (erm) Layers 🧅

github.com/lupyuen/bl_iot…

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…

#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…

For #Arduino Fans: @RAKwireless has a #WisBlock #LoRaWAN Tutorial ... We shall try this later

github.com/RAKWireless/Wi…

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…

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…

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.…

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…

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…

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…

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…

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…

#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…

Here's a friendly doc by STMicro that explains MCPS Messaging in our #BL602 #LoRaWAN Driver

st.com/content/ccc/re…

...Which explains why so many folks at STMicro are now reading this #BL602 #LoRaWAN Thread

😉

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…

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…

Why #BL602 "pbuf" is OK for handling #LoRaWAN Packets

github.com/lupyuen/bl_iot…

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…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling