Skip to content

Conversation

@crschardt
Copy link
Contributor

Description

An incorrect static IP address can make the coprocessor unreachable and may require a reflash to recover access. This PR adds a toggle switch to protect against this occurring.

The switch is located underneath the static IP address entry field as shown here:
static

The toggle is disabled whenever a change is made to the static IP address and only becomes enabled when the UI reloads after updated network settings have been applied. Once active, the user must select the switch and press "Save" again to persist the static IP settings. If the switch isn't turned on and saved, the coprocessor reverts to DHCP the next time that PhotonVision restarts. If the static IP setting is bad, the user won't be able to turn on the switch and the coprocessor will be reachable again after a power cycle.

This code will detect if it is being applied as an offline update on a coprocessor that already has static IP configured and it will treat it as properly verified and not reset the network to DHCP.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why, including events that led to this PR
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends)
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@github-actions github-actions bot added documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items backend Things relating to photon-core and photon-server labels Feb 2, 2026
@crschardt crschardt changed the title Add a switch that the user must toggle to confirm that the static IP address is working Add a toggle switch to confirm the static IP address is working Feb 2, 2026
@mcm001
Copy link
Contributor

mcm001 commented Feb 2, 2026

Another option we have is to maintain our DHCP lease, add the static IP to the interface, and only then allow the old DHCP address to be released?

@crschardt
Copy link
Contributor Author

Another option we have is to maintain our DHCP lease, add the static IP to the interface, and only then allow the old DHCP address to be released?

I'm not sure how we confirm that the static address works. Are you suggesting that we change to static, wait for the user to acknowledge something (like a dialog) and revert to DHCP if they don't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants