OpenShock / Firmware

Espressif Firmware for OpenShock, Controlling shock collars via Reverse engineered proprietary Sub-1 GHz Protocols.
GNU Affero General Public License v3.0
26 stars 6 forks source link

[Feature] Support changing OpenShock server at runtime #65

Closed redmushie closed 2 months ago

redmushie commented 8 months ago

Pre-submission checklist

What should be possible that currently is not?

Cofiguring the OpenShock server that the firmware connects to should be modifiable at runtime, not compile time.

Other remarks

No response

hhvrc commented 8 months ago

Why is this necessary?

redmushie commented 8 months ago

Because self-hosting is a primary feature and currently we're hard baking shocklink.net into all binaries.

hhvrc commented 8 months ago

Due to this being a change being one that is done very rarely I will not be swapping it at runtime, but will implement it as a set-and-reboot procedure, setting it at runtime introduces alot of complexity

redmushie commented 8 months ago

At a glance, I don't think that wouldn't make sense if you're still on the captive portal, since no gateway connection or auth token was acquired yet.

After thinking on it for a bit, I'm of the opinion that the minimum viable is "set and apply after reboot". Rebooting the board the second you change it will:

  1. Boot you out of the captive portal network (if changing it that way), and;
  2. Mess with attempts at automating configuration, as the serial connection will probably be interrupted, or at the very least be spammed with a large quantity of irrelevant logs. (Though I admit that's usually of little significance.)
hhvrc commented 2 months ago

Implemented in #223