stm32-rs / stm32wlxx-hal

A Hardware abstraction layer for the stm32wl series chips written in rust.
Apache License 2.0
45 stars 18 forks source link

subghz: Allow custom lora sync word #383

Closed huming2207 closed 1 month ago

huming2207 commented 2 months ago

Hi @newAM

Firstly thanks again for your great effort for this library!

We are trying to use this library to implement a factory testing firmware for our LoRa products. The current implementation doesn't allow us to configure custom LoRa sync word, so our LoRa protocol won't work. Therefore I implemented this feature to make it fit to our use cases.

Regards, Jackson

newAM commented 2 months ago

Oh boy, CI really hasn't been run in a while. I'll take a look at that this weekend.

huming2207 commented 2 months ago

In regards to the changes, I'm also thinking to add a few more From<&[u8]> impls to those LoRa/GFSK config structs. For example imagine I've got a From<&[u8]> that allows let pkt_params = LoRaPacketParams::from(some_slice); so that I can pass pre-serialised config data over UART or SWD into the target for testing.

Are you interested? If yes then I will also push a separate PR. @newAM

huming2207 commented 2 months ago

@newAM any updates on this...?

edit: sorry I didn't see your latest commits on CI... I will wait you finish that first.

newAM commented 2 months ago

No worries! Can you update this branch? Then CI should start to work again.

huming2207 commented 2 months ago

No worries! Can you update this branch? Then CI should start to work again.

It should work now.

huming2207 commented 1 month ago

@newAM thanks!

In regards to the changes, I'm also thinking to add a few more From<&[u8]> impls to those LoRa/GFSK config structs. For example imagine I've got a From<&[u8]> that allows let pkt_params = LoRaPacketParams::from(some_slice); so that I can pass pre-serialised config data over UART or SWD into the target for testing.

Also I would like to know are you interested in more PRs? For example the STOP2 low power mode, LPUART's FIFO mode, and these From<&[u8]> stuff mentioned above?

I need the STOP1/STOP2 mode to work in my project, and I'm also keen on do some researches on LPUART FIFO mode.

newAM commented 1 month ago

Yeah! I'm definitively interested in more PRs, it just may take me a while to get to them :)

huming2207 commented 1 month ago

Great, will do later.