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

Add Semtech SX1272 support. Add basic LoRaWAN node and gateway support #194

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andresmanelli
Copy link

Content

  • Arch definitions for Semtech's SX1272/3 PHY
  • "high" level APIs to access the variables (some of them distributed across register boundaries)
  • protocol.lora definitions
  • protocol.semtech_udp_forwarder (used in LoRaWAN gateway)
  • radio-sx1272 applet, that sends / receives packages using LoRa modulation, PHY to PHY
  • radio-lora applet, that provides node and gateway functionality for LoRaWAN protocol.

Raw PHY Tx can and LoRaWAN node is connected to a socket for data transmission.

I tested both use cases with two Glasgow boards, and a TheThingsNetwork application with good results.

What is implemented in LoRaWAN

  • Network join via OTAA (Session keys computed and stored)
  • Message encryption / decryption per specification
  • Receive windows, with different RF parameters
  • DLsettings.RX2DataRate use for configuring the proper RF parameters in 2nd receive window

Caveats

  • Somehow the gateway receive socket takes more and more time to get the downlink packet, and I couldn't figure out why..

TODO

There is plenty TODO on the RF regions, MAC commands, Frequency hopping, ... but I won't do that in the near future so I though of submitting this PR as-is (functional, but somehow incomplete in a specification point of view)

Let me know the required changes to meet the project style/guidelines. I tried to follow other applets/arch code style.

Thanks!

… APIs

protocol.lora: Add LoRa and LoRaWAN protocol definitions, node and
gateway classes.
protocol.semtech_udp_forwarder: Add Semtech UDP forwarder protocol
applet.radio.sx1272: Add support for Semtech SX1272 PHY
@whitequark
Copy link
Member

Thanks for the PR! At a very quick glance, code looks reasonable. I'm currently very busy with nMigen, so it will take a significant amount of time for me to properly review and merge your PR.

Base automatically changed from master to main February 27, 2021 09:59
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

Successfully merging this pull request may close these issues.

2 participants