Industrial IoT: Raspberry Pi as LoRaWAN node

TL::DR Get a LoRaWAN module that can be controlled overt UART to use with a Raspberry Pi.

The SX1262 is a LoRa RF Tranceiver. Think of it as the device that handles the RF Phy layer capturing or creating the RF signals and passing them on to a controlling MCU.

LoRaWAN - as you note - is a protocol (amongst other things at the higher system level) - that runs over LoRa (and potentially FSK) modulation as the carrier. The LoRaWAN protocol - at the node level - is implemented as a software stack (e.g. LMIC, LoRaMAC_Node or what ever), which then runs on a MCU - often the same one used to manage the SX1262 Xcr. You can buy LoRa Radio modules - these do not run LoRaWAN themelves - or you can buy LoRaWAN modules - these integrate the LoRa Xcr & and MCU running a suitable LoRaWAN stack. (GIYF as is TTN Forum!) Often these are controlled over a UART interface vs the direct SPI i/f used for running the SX12xx radio and often implement an ‘AT’ like command structure making the interface and control ‘simple’ and abstracted from the managing sensor system.

As you will no doubt have read across the forum (search) the LoRaWAN stack has some quite exacting (and deterministic) requirements wrt timing of operation if it is to run reliably. Therefore the general rule is to run the Stack on a seperate controller or ensure that if running any local management or application code that it is set to a lower priority and to ensure it will not interfere with the correct functional operation of the LoRaWAN stack. For that reason we dont run LoRaWAN Stacks on general purpose PC type systems or Linux like implementations where there is no way of absolutely controlling the processor’s operation and ensuring that any multitasking activities even just OS housekeeping fn’s let alone application/user code or interupts from interfering with the precise operation of the LoRaWAN Stack. RPi’s - whilst great for running the Packet Forwarder and other supporting functions of a LoRaWAN Gateway - are generally considered unsuitable for implementing a LoRa Node directly. Whilst great for running complex sensor system and implementing local/edge data processing and ‘intelligence’ that allow data reduction to sending a simple ‘alarm’ like data message over LoRa or LoRaWAN, they shouldnt be generally used as the LoRaWAN controller but rather should be complimented by a seperate LoRaWAN modem, that takes care of this critical functionality.

You do not provide a link to the Waveshare product you have to hand but assuming it is this one

Documented here

You will note it is clearly called out as a LoRa HAT NOT a LoRaWAN HAT, and indeed in the device introduction it states:

This product uses a private protocol and does not support LoRaWAN.