embassy
embassy copied to clipboard
Misc LoRaWAN improvements
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.
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
@timokroeger I didn't see you marked this as ready for review until now. Does this mean you got things working as expected?
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.
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.
@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.
@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.
Rebased to include @lulf s changes
Looks like just some cargo fmt is needed