Wio-E5 (STM32 and SX1262)
-
Hi All,
I have been messing around with a module called the Wio-E5 from Seeed Studio.
Ever since the NRF5 series came out I have wanted something similar but with a LoRa or RFM69 radio. The Wio-E5 looked like just the thing:https://www.seeedstudio.com/LoRa-E5-Wireless-Module-Tape-Reel-p-5302.html
https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/Cortex-M4 processor and SX1262 radio on a chip (STM32WLE5 series)
Supposedly low power consumption (still testing).
The module is small, but hand solderable package.I finally have one of these running as a coin cell powered temperature / humidity sensor.
My very basic E5 node and gateway
I have been able to get it to talk to my RMF95 gateway also.
If you want to give it a try, I have added code to the MySensors fork on my github: https://github.com/spike314/MySensors
in the development branch.You will need:
- For programming STM32
- STLink. There are cheap ones on aliexpress, but I got a legit STLink-V3MiniE for only US$11.70 on Mouser.
- STM32Cube Programmer from https://www.st.com/
- Arduino Libraries (available in the Arduino library manager)
- STM32duino Low Power
- STM32duino RTC
- Arduino Board files
- STM32 MCU based boards (available in the Arduino board manager)
- Updates for MySensors (already in the development branch on my github)
- STM32 files from Pull Request 1442, from @WhiskyDelta, @Koolru, and others
- RLSX1262 files : based on @eiten SX126X driver and:
- RadioLib https://github.com/jgromes/RadioLib (available in the Arduino library manager). Radiolib supports the STM32WL series. So I am using it for low level code to the radio.
- Update to for AES Conflict
- You will get a compile error because both MySensors and STM32 define AES.
- the offending STM32 file is here: \arduino15\packages\STMicroelectronics\hardware\stm32\2.8.1\system\Drivers\CMSIS\Device\ST\STM32WLxx\Include\stm32wle5xx.h
- In this version, line 998: #define AES ((AES_TypeDef *) AES_BASE)
- I changed to: #define AESWL ((AES_TypeDef *) AES_BASE)
- This resolves the conflict. There are probably better ways. I'd rather change the STM32 code than MySensors, but there are downsides:
- Other files would probably need the update if you are using something besides a STM32WLE5 ....
- If you update the STM32 library, you will have to go and change this define again.
- Clear the factory bootloader
- ground the PB13 pin and reboot the module to get into programming mode
- Using the STM32Cube Programmer:
- Hit Option Bytes (OB) button. Under Read Out Protection, change to AA and hit Apply.
- Disconnect and (re-)Connect. You should get “Data read successfully”.
- Program w Arduino
- In your sketch, #define MY_RADIO_RLSX126x
- Update the SX126X settings in MyConfig.h as desired, or override them in your sketch.
- Use these board settings:
- Board: Generic STM32WL Series
- Board PN: Generic WLE5JCIx
- UART Support: Enabled Generic Serial
- Newlib Nano
- STM31CubeProgrammer (SWD)
And, there you go!
It's all still a bit rough. I'll post some more notes and sample code when I get a chance.Happy New Year!
- For programming STM32