gets its Device EUI, Join EUI and App Key from the Secure Element ... But since doesn't have a Secure Element, we hardcode them in the "Soft" Secure Element

github.com/lupyuen/LoRaMac-nod

Our App was waiting for the Join Request to be transmitted before receiving the Join Response ... But because we're polling SX1262, we missed the Join Response ... Let's fix this with the multithreading functions from NimBLE Porting Layer

Log: gist.github.com/lupyuen/d3d9db

NimBLE Porting Layer is a portable library of Multithreading Functions ... We've used it for on Linux and FreeRTOS ... Now we call it from Apache OS

github.com/lupyuen/nimble-port

To build NumBLE Porting Layer on OS we need to enable: 1️⃣ POSIX Timers & Message Queues 2️⃣ Clock Monotonic 3️⃣ Work Queues 4️⃣ SIGEV_THHREAD

github.com/lupyuen/nimble-port

runs neater on Apache OS ... After implementing Timers and Multithreading with NimBLE Porting Layer ... No more polling and sleep()!

gist.github.com/lupyuen/cad581

SX1262 will trigger a GPIO Interrupt on OS when it receives a Packet ... We wait for the GPIO Interrupt to be Signalled in a Background Thread

github.com/lupyuen/lora-sx1262

Our App resends the same Nonce to the Gateway ... Which (silently) rejects the Join Request due to Duplicate Nonce ... Let's fix our Random Number Generator

gist.github.com/lupyuen/b38434

We enable the Entropy Pool in OS ... To generate Strong Random Numbers for our Nonce

For Random Number Generator, select the Entropy Pool ... To generate Strong Random Numbers for our Nonce

After disabling logging, our App successfully joins the Network! 🎉 Now we transmit some Data Packets over LoRaWAN

Log: gist.github.com/lupyuen/0d3012

Our Gateway receives Data Packets from OS! 🎉 The Message Payload is empty ... Let's figure out why 🤔

Log: gist.github.com/lupyuen/0d3012

Our App sent an empty Message because our message is too long for LoRaWAN Data Rate 2 (max 11 bytes) ... Let's increase the Data Rate to 3

gist.github.com/lupyuen/5fc076

NimBLE Porting Layer doesn't work for multiple Callout Timers on OS, unless we loop the thread ... Will submit a Pull Request to Apache NimBLE 👍

github.com/lupyuen/nimble-port

Switching a GPIO Interrupt Pin to Trigger On Rising Edge ... Crashes with an Assertion Failure ... I'll submit a NuttX Issue, meanwhile I have disabled the assertion

github.com/lupyuen/incubator-n

Show newer
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.