nf-interpreter icon indicating copy to clipboard operation
nf-interpreter copied to clipboard

Add SNTP from DHCP

Open networkfusion opened this issue 2 years ago • 3 comments

Description

  • Add ability to retrive time from DHCP.
  • ChibiOS & TI: Ensure the SNTP service is stopped before configure.
  • ChibiOS: Set default lwIP MAC to developer ID.
  • ChibiOS: Initalize SNTP properly.
  • Change default servers to seperate concerns.

Motivation and Context

  • Improves ability to run on more networks.
  • Stops ntp server from being swamped by requests (if possible).

How Has This Been Tested?

Tested on an STM32F769I

Before, devices failed to get time from network helper in a reasonable timeframe. ~~It is now pretty much instantanious for me.~~ Edit: spoke too soon.

Screenshots

Types of changes

  • [x] Improvement (non-breaking change that improves a feature, code or algorithm)
  • [ ] Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • [ ] New feature (non-breaking change which adds functionality to code)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Config and build (change in the configuration and build system, has no impact on code or features)
  • [ ] Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • [ ] Dependencies (update dependencies and changes associated, has no impact on code or features)
  • [ ] Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • [ ] My code follows the code style of this project (only if there are changes in source code).
  • [ ] My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • [ ] I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • [ ] I have read the CONTRIBUTING document.
  • [ ] I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

networkfusion avatar Oct 20 '23 16:10 networkfusion

All of the changes in this PR seem to help, but still suffering from the underlying issue sometimes (what ever it may be). Possibly a callback when the ip or time is set because it seems to always work on second deploy.

Hopefully it will help future debugging.

networkfusion avatar Oct 20 '23 18:10 networkfusion

Please see my comments. If we're going forward with this (which I agree that's a good improvement) for consistency sake, it has to behave the same way in the other platforms. Let me know if you want me to take care of that.

Yes, please adjust what you see fit to bring inline with other platforms etc.

networkfusion avatar Oct 23 '23 10:10 networkfusion

@josesimoes I had a bit of time, so have "attempted" to add to other platforms.

networkfusion avatar Oct 23 '23 15:10 networkfusion