Let's connect #PineCone #BL602 @PINE64 to #LoRa RF96 ... Always connect Antenna before Power! ⚡... Bought from Tindie

https://www.tindie.com/products/m2m/lora-module-for-breadboard-with-antenna/

LoRa Module for Breadboard with Antenna by M2M Shop on Tindie

LoRa Module breakout board with 9 cm. Antenna

We'll port the #LoRa SX1276 Driver from #Mynewt OS to #BL602 IoT SDK ... Because the GPIO and SPI Hardware Abstraction Layers are quite similar

https://github.com/apache/mynewt-core/blob/master/hw/drivers/lora/sx1276/src/sx1276.c

apache/mynewt-core

An OS to build, deploy and securely manage billions of devices - apache/mynewt-core

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

#LoRa SX1276 Driver listens for GPIO Interrupts on 6 (!) GPIO Pins ... Maybe #BL602 can defer this ... If we're not receiving LoRa Packets 🤔

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/sx1276-board.c#L137-L185

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

#BL602 IoT SDK builds #LoRa Driver successfully yay! Now filling in the SPI Functions to talk to SX1276

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/sx1276.c#L213-L252

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

Let's test the #BL602 #LoRa Driver ... With the "LoRa Ping" app ported from #Mynewt OS

https://github.com/apache/mynewt-core/blob/master/apps/loraping/src/main.c

apache/mynewt-core

An OS to build, deploy and securely manage billions of devices - apache/mynewt-core

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

Let's test whether #BL602 can talk to #LoRa SX1276 over SPI ... By dumping some SX1276 registers

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L199-L213

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

Yep #BL602 talks OK to #LoRa SX1276 over SPI ... SX1276 register values look correct ... Now let's transmit a LoRa Message!

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L199-L213

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

#BL602 #SPI Unsolved Mystery ... BL602 must be configured for SPI Phase 1 to talk to #LoRa SX1276 ... But SX1276 actually uses SPI Phase 0! 🤔

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/sx1276-board.c#L112-L137

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

Our #LoRa SX1276 (actually RF96) is factory configured for 434 MHz, sez the Frequency Registers ... #BL602 will tune it to 923 MHz for Singapore

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L199-L213

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

How will we know if our #BL602 + #LoRa SX1276 are misbehavin’ on the airwaves? We got a spy ... An AirSpy Software Defined Radio

https://airspy.com/airspy-r2

Airspy R2 - airspy.com

The Airspy R2 is a blazing fast SDR scanner for VHF and UHF.

airspy.com

923 MHz on a quiet Singapore night ... Captured by #Gqrx and #Airspy R2 Software Defined Radio 📻

https://youtu.be/RJIRTz2zUok

#BL602 inits the #LoRa SX1276 Driver ... By writing a bunch of SX1276 Registers over SPI ... So far so good!

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L220-L270

#BL602 sends a #LoRa message ... By copying the message to SX1276 Transmit FIFO over SPI ... Was the message actually transmitted? Airspy will tell!

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L107-L124

Someday we shall pack #PineCone #BL602 @ThePine64 with #LoRa ... Into this cute clear Junction Box
But today we shall spy on #BL602 + #LoRa ... With an #Airspy R2 Software Defined Radio 📻
#BL602 + #LoRa SX1276 + Airspy SDR ... Inside an improvised Faraday Cage 🫕 ... It really works!

Nope Airspy SDR couldn't sniff our #BL602 #LoRa at 923 MHz ... Though it sniffed others thru the Faraday Cage (erm) Pot 🤔

https://github.com/lupyuen/bl_iot_sdk/blob/lora/customer_app/sdk_app_lora/sdk_app_lora/demo.c#L220-L270

CubicSDR software works better with Airspy ... Here's the #BL602 #LoRa Packet (64 bytes) centered at 923 MHz with bandwidth 125 kHz

https://cubicsdr.com/

Let's zoom into the #BL602 #LoRa Packet ... And hunt for the LoRa Chirp!

https://pubs.gnuradio.org/index.php/grcon/article/download/8/7/

1️⃣ Enable #LoRa SX1276 Power Amplifier 2️⃣ Increase Airspy sample rate to 10 MHz ... LoRa Packets never looked better!

https://github.com/lupyuen/bl_iot_sdk/commit/ae7e11a87f58ef63fea9b5c158aa66f3e81c145e#diff-6d25e21aa14e973456e3eb35c4298a576f14a5296ae392544e1ca61d8e463ed4

Enable power amplifier boost · lupyuen/bl_iot_sdk@ae7e11a

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

Captured the Legendary #LoRa Chirp! (The helix thingy)

https://pubs.gnuradio.org/index.php/grcon/article/download/8/7/

Lup Yuen Lee on LinkedIn: #BL602 #LoRa

Nope Airspy SDR couldn't sniff our #BL602 #LoRa at 923 MHz ... Though it sniffed others thru the Faraday Cage (erm) Pot 🤔 https://lnkd.in/gbAdbCs...

lupyuen/bl_iot_sdk

BL602 SDK (Pine64 fork plus enhancements). Contribute to lupyuen/bl_iot_sdk development by creating an account on GitHub.

@lupyuen I guess there's no sound in space.