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

Show thread
Follow

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

Show thread

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

Show thread

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

gist.github.com/lupyuen/cad581

Show thread

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

Show thread

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

Show thread

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

Show thread

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

Show thread

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

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

Show thread

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

Show thread
Show more
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.