Quote from: winfried on February 19, 2026, 11:02:19 AMBut I found the RadioLib which supports STM32WLx. I will try to make P2P example working and post it here.
Quote from: winfried on February 19, 2026, 10:52:50 AMad serial monitor for debugging:
-DSERIAL_UART_INSTANCE=1 did not help.; PlatformIO Project Configuration File for LoRa P2P (Peer-to-Peer) Test
; OLIMEX LoRa-STM32WL-DevKit - Direct LoRa communication without LoRaWAN
[platformio]
description = "LoRa P2P Test - Direct device-to-device communication"
[env]
platform = ststm32
framework = arduino
lib_deps =
jgromes/RadioLib @ ^7.3.0
board = olimex_wle5
build_flags =
-DUSB_MANUFACTURER="Olimex"
-DUSB_PRODUCT="BB-STM32WL"
-DBLINK_PIN=PC_15
; LoRa-STM32WL-DevKit: with built-in USB-to-serial converter for monitoring
; using CMSIS-DAP for programming/Debug.
[env:LoRa_STM32WL_DevKit]
upload_protocol = cmsis-dap
monitor_speed = 115200
build_flags = ${env.build_flags}
-D PIN_SERIAL_TX=PB_6
-D PIN_SERIAL_RX=PB_7
[debug]
debug_tool = cmsis-dap
debug_init_break = tbreak setup
build_flags = ${env.build_flags}
-D PIN_SERIAL_TX=PB_6
-D PIN_SERIAL_RX=PB_7
; BB-STM32WL program and monitor
; Upload over serial using USART1
; USART1_RX : PA10
; USART1_TX : PA9
; set uC to boot mode with nboot=low on reset
[env:BB-STM32WL_serial]
build_flags = ${env.build_flags}
-DNODE_ID=0x2
-D PIN_SERIAL_RX=PA_10
-D PIN_SERIAL_TX=PA_9
upload_protocol = serial
upload_port = /dev/ttyUSB0
upload_speed = 115200
monitor_port = /dev/ttyUSB0
monitor_speed = 115200

; -DSERIAL_UART_INSTANCE=1 ...
-i GPIO_string GPIO sequence to enter/exit bootloader mode
GPIO_string=[entry_seq][:[exit_seq]]
sequence=[-]n[,sequence]
-R Reset device at exit.
...
void setup()
{
Serial1.begin(115200);
}
void loop()
{
Serial1.println("USART1 on PA9/PA10 working");
delay(1000);
}HardwareSerial SerialPort(PA10, PA9); // RX, TX
void setup()
{
SerialPort.begin(115200);
}
void loop()
{
SerialPort.println("Forced USART1 mapping");
delay(1000);
}