Took me a while to figure out how to build the CH341 SPI Driver with DKMS and Kernel Headers ... Yep it works on Pinebook Pro Manjaro! 🎉
Here's how we open the CH341 SPI Port ... And transfer SPI data to #LoRa SX1262
https://github.com/lupyuen/pinedio_usb_sx126x_driver/blob/master/src/main.c
Semtech's #LoRa SX1262 Driver requires an SPI HAL ... Here's how we do it with CH341 SPI
https://github.com/lupyuen/pinedio_usb_sx126x_driver/blob/master/src/main.c#L101-L138
Let's do a simple test of our #PineDio USB Driver ... Read some SX1262 Registers over SPI
https://github.com/lupyuen/pinedio_usb_sx126x_driver/blob/master/src/main.c#L31-L46
Yep our #PineDio USB Driver returns some Register Values for #LoRa SX1262! 🎉
https://github.com/lupyuen/pinedio_usb_sx126x_driver#output-log
Our #PineDio USB Driver returns the exact same Register Values ... As BL602 with LoRa #SX1262! 🎉
https://lupyuen.github.io/articles/lorawan#troubleshoot-lorawan
Oops just discovered that the new Semtech Reference Driver doesn't support LoRaWAN ... So we switched to the older #LoRa SX1262 Driver ... Exact same driver used by BL602!
Let's transmit a #LoRa Message on #PineDio USB Dongle with these settings ... Connected to Pinebook Pro
https://github.com/lupyuen/lora-sx1262/blob/master/src/main.c
#PineDio USB Dongle @PINE64 transmits a #LoRa Packet ... Which appears as a LoRa Chirp on Airspy SDR! 🎉
https://github.com/lupyuen/lora-sx1262/blob/master/src/main.c
#PineDio USB Dongle sends #LoRa Packet to RAKwireless WisBlock ... But received packet is consistently garbled ... As reported by @JF 🤔
https://github.com/lupyuen/lora-sx1262#wisblock-receiver-log
#PineDio Dongle sends a 64-byte #LoRa Packet ... But the 64-byte Packet doesn't appear in the dmesg Log for CH341 SPI Driver 🤔
https://github.com/lupyuen/lora-sx1262#pinedio-usb-dmesg-log
Aha! When #PineDio Dongle sends a 29-byte #LoRa Packet to RAKwireless WisBlock ... It's received OK! Anything more will be garbled 🤔
https://github.com/lupyuen/lora-sx1262#wisblock-receiver-log
CH341 doesn't seem to support 32-byte SPI Transfers ... Hope this fixes @JF's #PineDio #LoRa USB Dongle! 👍
https://github.com/lupyuen/lora-sx1262/blob/master/src/sx126x-linux.c#L665-L687
#PineDio USB Dongle shall now receive a #LoRa Message ... From RAKwireless WisBlock
https://github.com/lupyuen/lora-sx1262/blob/master/src/main.c#L74-L119
What's inside #PineDio USB Dongle? CH341 connected to #LoRa SX1262 (over SPI)
https://lupyuen.github.io/articles/usb?2#pinedio-lora-usb-adapter
#PineDio USB Dongle runs the exact same #LoRa SX1262 Driver ... As #PineDio Stack BL604!
https://lupyuen.github.io/articles/usb?3#lora-sx1262-driver-for-pinedio-usb
What do #PineTime, #PineDio USB and PineDio Stack BL604 have in common? They run on NimBLE Porting Layer!
https://lupyuen.github.io/articles/usb?5#nimble-porting-layer
Here's how we read the #LoRa SX1262 Registers on #PineDio USB Dongle
https://lupyuen.github.io/articles/usb?6#read-sx1262-registers
How do we make the same #LoRa SX1262 Driver run on #PineDio USB and PineDio Stack BL604? ... With Layers of Platform Dependent and Independent Code (Like Shrek)
https://lupyuen.github.io/articles/usb?8#source-files-for-linux
Our #PineDio USB Driver defines these Callback Functions ... For transmitting and receiving #LoRa Messages
https://lupyuen.github.io/articles/usb?10#initialise-lora-sx1262
But #LoRa Messages sent by #PineDio Stack BL604 to RAKwireless WisBlock are not garbled ... Even though PineDio Stack and PineDio Dongle are running the same SX1262 Driver Code! 🤔
https://lupyuen.github.io/articles/lorawan#configure-lora-transceiver