embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Misc LoRaWAN improvements

Open timokroeger opened this issue 3 years ago • 5 comments

Trying too get embassy-lora running on a LoRa-E5 Dev Board. I can see the join message arriving in the The Things Network console but the device does not receive the accept message yet. Opening this PR anyway because I think there are some nice things to decouple the lora crate from the nucleo board.

@lulf Could you test if this PR breaks your LoRa setup? Marking as draft for the time being.

timokroeger avatar Jul 01 '22 09:07 timokroeger

I fixed/modified the lorawan example with more configuration options to make downlink work in #843 . I also tried your branch with that fix, and downlink works for me.

Those settings could be the reason for downlink not working. Also note the special RX1 delay required for TTN

lulf avatar Jul 04 '22 08:07 lulf

@timokroeger I didn't see you marked this as ready for review until now. Does this mean you got things working as expected?

lulf avatar Jul 18 '22 07:07 lulf

Yes, this is ready for review. Rebased to resolve the merge conflicts. With a different LoRaWAN network provider I could occasionally receive downlink messages. Did not yet have the time to setup my own gateway to do any further testing.

timokroeger avatar Jul 19 '22 19:07 timokroeger

Good news! I got it working, but I had to do some TX tuning. I'll try to pinpoint the changes I needed to do, and maybe we can make that configurable if it's not already.

lulf avatar Aug 09 '22 08:08 lulf

@timokroeger Ok, it was the TX configuration that was not working for my board. I've raised a PR against this branch with stuff I needed https://github.com/timokroeger/embassy/pull/1

It makes the params configurable, but leaves LP tx as default. We can use HP tx as default as well, I dunno which approach is better.

It also adopts to the new rust-lorawan radio interface.

lulf avatar Aug 09 '22 10:08 lulf

@timokroeger I've released lorawan-device 0.8.0 which contains the radio changes. If you merge this https://github.com/timokroeger/embassy/pull/1 and then rebase this PR, it should be good to go I think.

lulf avatar Aug 26 '22 10:08 lulf

Rebased to include @lulf s changes

timokroeger avatar Aug 26 '22 13:08 timokroeger

Looks like just some cargo fmt is needed

lulf avatar Aug 29 '22 12:08 lulf

Build succeeded:

bors[bot] avatar Sep 04 '22 07:09 bors[bot]