Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfm95 Support #9

Closed
BlinkyStitt opened this issue Jul 12, 2020 · 7 comments
Closed

rfm95 Support #9

BlinkyStitt opened this issue Jul 12, 2020 · 7 comments

Comments

@BlinkyStitt
Copy link

BlinkyStitt commented Jul 12, 2020

Hello! I'm just starting a project and was planning on using a rfm95 lora radio. It looks like you don't yet have support for lora, but I was wondering if you have put any thoughts into it yet. I'm not ready to write this part of the code yet, but would be happy to help.

@ryankurte
Copy link
Member

I believe the rfm95 is driver compatible with the sx127x series (though I have not tried it). I do have ryankurte/rust-radio-sx127x for these devices, which provides lora and gfsk support, using this crate (though it is in need of an update due to some churn both here and in embedded-hal).

I have been planning to extract the LoRa modulation enums from the sx127x and sx128x drivers to provide a lora module in this crate and a common LoRaChannel that can be used with the Channel trait to support generic use of LoRa compatible radios.

If this meets your requirements I'd be happy to accept PRs! And if you have other ideas I'd be interested to hear em.

@BlinkyStitt
Copy link
Author

BlinkyStitt commented Jul 12, 2020 via email

@BlinkyStitt
Copy link
Author

BlinkyStitt commented Jul 18, 2020

So the rfm95 (at least the one I'm using: https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/pinouts) doesn't seem to have a busy_pin. What should I do to skip that pin?

@ryankurte
Copy link
Member

it's probably due a rename (or document) but BUSY is DIO0 and READY is DIO1 as they are configured by default, so you should be able to just use them.

@BlinkyStitt
Copy link
Author

BlinkyStitt commented Jul 20, 2020 via email

@ryankurte
Copy link
Member

ryankurte commented Jul 20, 2020

No worries! The SPI protocol leans heavily on BUSY to wait for radio command responses, so if possible you'll need to wire that up (or make some not insignificant mods to the library).

This library doesn't use READY yet, so you should be alright without that. It is however particularly useful to avoid polling on state (which you can see in the sx128x driver), so I would recommend wiring it if you can.

To support both having and not-having either pin we would need a default impl of is_ready() in the base that uses SPI to check for masked interrupts, with a specific impl for types where READY (or DIO1) implements InputPin, this has been on the list for a while but again, it's a wee bit tricky and not critical for my use so hasn't been done yet.

I also always intended to rename the types to DIO0-1 but never got around to it, happy to accept PRs doing any of these things if you like.

@BlinkyStitt
Copy link
Author

tl;dr: yes, use https://github.com/ryankurte/rust-radio-sx127x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants