Stm32wl55 mesh lora

Hi
Plans to meshtatic to use ? Or some experimental test?

Thanks

There is a variant for the Wio-E5 from Seeed Studio in the firmware, but its filesystem is not yet working. That device has a STM32WLE5JC module, so I guess it wouldn’t be too hard to port it to a STM32WL55 once it is fully working.

Nice!!!
No, it will not hard to port i once is fully working.

starting


Studyng…
Our modules are compatible…

Now investigating gpios used to RF SWITCH (LP,HP, etc)

// https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c
static const float tcxoVoltage = 1.7;

/* https://github.com/SeongJiIoT/LSM1x0A_SDK_LoRaWAN104/tree/main/Document
 * LSM100A module ONLY transmits through RFO_HP
 * Receive: PB12=0, PC13=0
 * Transmit(high output power, SMPS mode): PB12=0, PC13=1 */

static const RADIOLIB_PIN_TYPE rfswitch_pins[3] = {PB12, PC13, RADIOLIB_NC};

static const Module::RfSwitchMode_t rfswitch_table[4] = {
    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {HIGH, HIGH}}, END_OF_MODE_TABLE};

getting progress :slight_smile:

//\ E S H T /\ S T / C

.pio\libdeps\wio-e5\littlefs\lfs.c:1224:error: Corrupted dir pair at {0x0, 0x1}

EBUG | ??:??:?? 3 Filesystem files:

INFO | ??:??:?? 3 Scanning for i2c devices…

INFO | ??:??:?? 3 No I2C devices found

INFO | ??:??:?? 3 Meshtastic hwvendor=255, swver=2.1.18.b9ad2741

INFO | ??:??:?? 3 Initializing NodeDB

INFO | ??:??:?? 3 No /prefs/db.proto preferences found

INFO | ??:??:?? 3 Installing default DeviceState

DEBUG | ??:??:?? 3 Initial packet id 1481765933, numPacketId 4294967295

INFO | ??:??:?? 3 No /prefs/config.proto preferences found

INFO | ??:??:?? 3 Installing default LocalConfig

INFO | ??:??:?? 3 Setting default channel and radio preferences!

DEBUG | ??:??:?? 3 Expanding short PSK #1

INFO | ??:??:?? 3 Wanted region 0, using UNSET

INFO | ??:??:?? 3 No /prefs/module.proto preferences found

INFO | ??:??:?? 3 Installing default ModuleConfig

INFO | ??:??:?? 3 No /prefs/channels.proto preferences found

INFO | ??:??:?? 3 Installing default ChannelFile

INFO | ??:??:?? 3 No /oem/oem.proto preferences found

INFO | ??:??:?? 3 Setting default channel and radio preferences!

DEBUG | ??:??:?? 3 Expanding short PSK #1

INFO | ??:??:?? 3 Wanted region 0, using UNSET

DEBUG | ??:??:?? 3 region=0, NODENUM=0x500d4345, dbsize=0

INFO | ??:??:?? 6 Saving /prefs/db.proto

INFO | ??:??:?? 18 Saving /prefs/channels.proto

WARN | ??:??:?? 28 No GPS found - running without GPS

WARN | ??:??:?? 28 SX126xInterface(cs=1000, irq=1001, rst=1003, busy=1004)

INFO | ??:??:?? 28 Starting meshradio init…

DEBUG | ??:??:?? 28 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=0, t
ime 231 ms

DEBUG | ??:??:?? 28 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=253,
time 3246 ms

INFO | ??:??:?? 28 Radio freq=, config.lora.frequency_offset=

Is that DEBUG right ? and freeze the UART to send commands ?

second reset

This is the same as what we currently get using the Wio-E5.

It seems to be missing the values from the filesystem, e.g. Radio myRegion->freqStart -> myRegion->freqEnd: -> ( mhz) should display the real frequency range.

Do you have any experience with filesystems on embedded devices? We have at least this clue:

.pio/libdeps/wio-e5/littlefs/lfs.c:1224:error: Corrupted dir pair at {0x0, 0x1}

Currently LittleFS is implemented on emulated EEPROM on flash, but it’s only 2kB in size.

Hi, do you mean that frequency is stored in FS ?
This is the why that I’m getting blank…?
A member on stm32wl55 micropython lora lib solved the FS format this processor…
They can format on stm32wl55
I tested and works
Do you want the link of GitHub discussion ?
Sorry, not experience on FS

I hope that helps…talk with Angus

Yes, indeed the region is stored in the FS, and from that it derives the frequency range.

That GitHub discussion is about using MicroPython, so I’m afraid it won’t help much for C++.

But source code em C++, right ?

The source code of Meshtastic is in C++ indeed.

In my second boot, i can see my configs

DEBUG | ??:??:?? 0 Filesystem files:
DEBUG | ??:??:?? 1  channels.proto (53 Bytes)
DEBUG | ??:??:?? 1  db.proto (135 Bytes)
INFO  | ??:??:?? 1 Scanning for i2c devices...

may you send your boot sequence ?

Sure, here it is (from a while ago using firmware version 2.1.13):

.pio/libdeps/wio-e5/littlefs/lfs.c:1224:error: Corrupted dir pair at {0x0, 0x1}
DEBUG | ??:??:?? 5 Filesystem files:
INFO  | ??:??:?? 5 Scanning for i2c devices...
INFO  | ??:??:?? 5 No I2C devices found
INFO  | ??:??:?? 5 Meshtastic hwvendor=255, swver=2.1.13.de6c36dc
INFO  | ??:??:?? 5 Initializing NodeDB
INFO  | ??:??:?? 5 No /prefs/db.proto preferences found
INFO  | ??:??:?? 5 Installing default DeviceState
DEBUG | ??:??:?? 5 Initial packet id 1481765933, numPacketId 4294967295
INFO  | ??:??:?? 5 No /prefs/config.proto preferences found
INFO  | ??:??:?? 5 Installing default LocalConfig
INFO  | ??:??:?? 5 Setting default channel and radio preferences!
DEBUG | ??:??:?? 5 Expanding short PSK #1
INFO  | ??:??:?? 5 Wanted region 0, using UNSET
INFO  | ??:??:?? 5 No /prefs/module.proto preferences found
INFO  | ??:??:?? 5 Installing default ModuleConfig
INFO  | ??:??:?? 5 No /prefs/channels.proto preferences found
INFO  | ??:??:?? 5 Installing default ChannelFile
INFO  | ??:??:?? 5 No /oem/oem.proto preferences found
INFO  | ??:??:?? 5 Setting default channel and radio preferences!
DEBUG | ??:??:?? 5 Expanding short PSK #1
INFO  | ??:??:?? 5 Wanted region 0, using UNSET
DEBUG | ??:??:?? 5 region=0, NODENUM=0x5016112c, dbsize=1
INFO  | ??:??:?? 8 Saving /prefs/db.proto
INFO  | ??:??:?? 20 Saving /prefs/channels.proto
WARN  | ??:??:?? 30 No GPS found - running without GPS
WARN  | ??:??:?? 30 SX126xInterface(cs=1000, irq=1001, rst=1003, busy=1004)
INFO  | ??:??:?? 30 Starting meshradio init...
DEBUG | ??:??:?? 30 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 30 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=253, time 3246 ms
INFO  | ??:??:?? 30 Radio freq=, config.lora.frequency_offset=
pINFO  | ??:??:?? 30 Set radio: region=UNSET, name=LongFast, config=0, ch=19, power=30
INFO  | ??:??:?? 30 Radio myRegion->freqStart -> myRegion->freqEnd:  ->  ( mhz)
r=INFO  | ??:??:?? 30 Radio myRegion->numChannels: 104 x kHz
reINFO  | ??:??:?? 30 Radio channel_num: 20
INFO  | ??:??:?? 30 Radio frequency: 
INFO  | ??:??:?? 30 Slot time: 42 msec
INFO  | ??:??:?? 30 Set radio: final power level=22
INFO  | ??:??:?? 32 STM32WLx init result 0
INFO  | ??:??:?? 32 Frequency set to 
INFO  | ??:??:?? 32 Bandwidth set to 
INFO  | ??:??:?? 32 Power output set to 22
INFO  | ??:??:?? 32 STM32WL Radio init succeeded, using STM32WL radio
DEBUG | ??:??:?? 32 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=237, time 3057 ms
DEBUG | ??:??:?? 32 myNodeInfo.bitrate =  bytes / sec
INFO  | ??:??:?? 32 PowerFSM init, USB power=1

exactly equal to me!

please, after the first reset, make again the reset and send the boot log again…

After reset it indeed finds the configs, but it cannot read them (e.g. it’s missing the frequency values in the logs) and halts afterwards:

DEBUG | ??:??:?? 0 Filesystem files:
DEBUG | ??:??:?? 1  channels.proto (53 Bytes)
DEBUG | ??:??:?? 2  db.proto (139 Bytes)
INFO  | ??:??:?? 2 Scanning for i2c devices...
INFO  | ??:??:?? 2 No I2C devices found
INFO  | ??:??:?? 2 Meshtastic hwvendor=255, swver=2.1.18.5c34e36b
INFO  | ??:??:?? 2 Initializing NodeDB
INFO  | ??:??:?? 2 Loading /prefs/db.proto
INFO  | ??:??:?? 2 Loaded saved devicestate version 20
INFO  | ??:??:?? 2 No /prefs/config.proto preferences found
INFO  | ??:??:?? 2 Installing default LocalConfig
INFO  | ??:??:?? 2 Setting default channel and radio preferences!
DEBUG | ??:??:?? 2 Expanding short PSK #1
INFO  | ??:??:?? 2 Wanted region 0, using UNSET
INFO  | ??:??:?? 3 No /prefs/module.proto preferences found
INFO  | ??:??:?? 3 Installing default ModuleConfig
INFO  | ??:??:?? 3 Loading /prefs/channels.proto
INFO  | ??:??:?? 3 Loaded saved channelFile version 20
INFO  | ??:??:?? 3 No /oem/oem.proto preferences found
DEBUG | ??:??:?? 3 Expanding short PSK #1
INFO  | ??:??:?? 3 Wanted region 0, using UNSET
DEBUG | ??:??:?? 3 region=0, NODENUM=0x5016112c, dbsize=0
WARN  | ??:??:?? 3 No GPS found - running without GPS
WARN  | ??:??:?? 3 SX126xInterface(cs=1000, irq=1001, rst=1003, busy=1004)
INFO  | ??:??:?? 3 Starting meshradio init...
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=253, time 3246 ms
INFO  | ??:??:?? 3 Radio freq=, config.lora.frequency_offset=
pINFO  | ??:??:?? 3 Set radio: region=UNSET, name=LongFast, config=0, ch=19, power=30
INFO  | ??:??:?? 3 Radio myRegion->freqStart -> myRegion->freqEnd:  ->  ( mhz)
r=INFO  | ??:??:?? 3 Radio myRegion->numChannels: 104 x kHz
reINFO  | ??:??:?? 3 Radio channel_num: 20
INFO  | ??:??:?? 3 Radio frequency: 
INFO  | ??:??:?? 3 Slot time: 42 msec
INFO  | ??:??:?? 3 Set radio: final power level=22
INFO  | ??:??:?? 4 STM32WLx init result 0
INFO  | ??:??:?? 4 Frequency set to 
INFO  | ??:??:?? 4 Bandwidth set to 
INFO  | ??:??:?? 4 Power output set to 22
INFO  | ??:??:?? 4 STM32WL Radio init succeeded, using STM32WL radio
DEBUG | ??:??:?? 4 (bw=250, sf=11, cr=4/8) packet symLen=8 ms, payloadSize=237, time 3057 ms
DEBUG | ??:??:?? 4 LoRA bitrate =  bytes / sec

exactly this happens on my STM32Wl55 and freeze…

team, is it possible make tests using static data config? (not storing in FS)