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

Upgrade to TTN V3 #1

Open
amotl opened this issue Oct 31, 2021 · 4 comments
Open

Upgrade to TTN V3 #1

amotl opened this issue Oct 31, 2021 · 4 comments

Comments

@amotl
Copy link
Member

amotl commented Oct 31, 2021

Hi there,

@Tonkenfo is working on bringing in updates to TTN V3 to Terkin, see also [1]. Thanks to all the authors and maintainers of this library, @jeroennijhof, @pjb304, @henningth and @BNNorman and, last but not least, @mcmayer of @mayeranalytics for conceiving the original pySX127x library.

The branch ttn3 will track the recent improvements by @BNNorman and the branch ttn3-terkin will make similar adjustments like we did for TTN v2, see ttn2...daq-tools:ttn2-terkin.

This mainly removes all references to GPS (691cfc0, e431860) and provides a pure-Python configuration variant (772f552). However, on top of that, @Tonkenfo reported he needed to revert e74f489. The outcome can be inspected via ttn3...daq-tools:ttn3-terkin.

With kind regards,
Andreas.

[1] https://community.hiveeyes.org/t/terkin-variante-fur-cpython-raspberry-pi-dragino-lora-gps-hat/3180/12

amotl added a commit that referenced this issue Oct 31, 2021
This reverts commit e74f489.

Reverting this commit makes things work for @tonke.

References:
- #1
@BNNorman
Copy link

BNNorman commented Nov 1, 2021

Nice to see my work being credited. In the last 6 months or so I have also made a lot of changes to make the dragino code more compliant with V3 since the original code is no longer maintained.

  • caching settings as required by LoRaWAN Spec V1.0.4. If using OTAA this means that a JOIN_REQUEST does not need to be sent on every power up as the session keys are cached. The original code appended keys and fCntUp to the end of dragino.ini now it uses cache.json - the advantage is that the cache file can be removed to force a new JOIN_REQUEST and it doesn't interfere with the initial config.
  • MAC command handling - the original code did not respond to MAC downlink commands. MAC handling and caching is handled by a new file MAChandler.py
  • Port selection - made it easy to select the uplink port. Also passing the port as an additional parameter with the downlink message callback.
  • GPS handling moved into a separate class which uses a thread to look for valid GPS signals. GPS is also expected to be handled by gpsd
  • Config file dragino.ini is now dragino.toml which includes sections for the frequency plan information rather than the simplistic frequncyplan.py (removed)
  • able to add uplink MAC commands - Replies to downlink MAC commands are handled automatically but it is now possible to send uplink requests such as LINK_CHECK_REQ and TIME_REQ (not very useful)

You can find my clone and changes here:-

https://github.com/BNNorman/dragino-1

It will be used in anger soon in a council run speed sign.

Feel free to uncover any bugs.

amotl referenced this issue in BNNorman/dragino-1 Dec 20, 2021
All GPS related calls return None
@amotl
Copy link
Member Author

amotl commented May 10, 2022

Dear Brian,

thanks a stack for sharing a detailed overview about the development progress on this library. Your maintenance efforts are a great contribution to the community.

Now, another six months later, and coming from mayeranalytics/pySX127x#21 (comment), we observe through BNNorman/dragino-1@7038230...master that you are still very active on improving the software.

Maybe you are willing to share another update in highlevel form like your last post to outline a concise summary of all the improvements since your last update? It would be so sweet! 1

Keep up the spirit and with kind regards,
Andreas.

Footnotes

  1. Maybe I can take the chance to converge those drafts into a corresponding patch to your repository, adding a CHANGES.rst file, in order to contribute something back to support your efforts.

@BNNorman
Copy link

BNNorman commented May 12, 2022

Thanks @amotl. I appreciate being appreciated - LOL - though I developed the code for selfish reasons. Others have found it useful.

Recent changes/additions are:-
1 Support for AU915-928-FSB2 in response to an request from Australia . This probably means it supports US915 and similar frequency plans too. I am selfishly busy on my EU application so have not looked at other frequency plans.
2 Added code to dragino.py to check that set_mode() for the RFM895 works and if not declare the SPI as the probable culprit and halt rather than producing reams of pointless logging. This recently proved to be the case with a Dragino Lora/GPS HAT which died on another user. He replaced the HAT.

Regards
Brian

PS regarding the RST - feel free and thanks.

@amotl
Copy link
Member Author

amotl commented May 12, 2022

Thank you for the updates, Brian. @chuanisawesome and others might like them as well. Cheers!

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