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

[Feature Request] Updating wifi credentials via file on SD card root #193

Closed
iointerrupt opened this issue Sep 1, 2022 · 6 comments
Closed
Labels
enhancement New feature, improvement, or request

Comments

@iointerrupt
Copy link

iointerrupt commented Sep 1, 2022

Currently I believe the ability to change the wifi credentials exists via by either shelling into the camera via SSH/telnet or web ui.

Would it be possible to update the startup script to include a check for a "configure_wifi.cfg" on the root of the sd card or somewhere on the sd card to allow changing the wifi ssid/password that way? Obviously the script would also delete the configure_wifi.cfg afterwards to prevent a loop.

Justification: Sometimes the cams have to be reset to stock and yi home cam app has to be used to register the cam. My cams usually are on a locked down vlan with no internet access but to register, they have to have internet access. I have to first put them on my main network, register, updating firmware to yi-hack, login to yi-hack and change the wifi creds. Being able to do it via a file on the sd card would automate that process. Just a thought.

Edit: Just using the solutions already available perhaps an update to the system startup script /tmp/sd/yi-hack-v5/script/system.sh:

if [ -f /tmp/sd/configure_wifi.cfg ]; then
	mv /tmp/sd/configure_wifi.cfg /tmp/configure_wifi.cfg
	sync
	sh $YI_HACK_PREFIX/script/configure_wifi.sh
fi
@alienatedsec alienatedsec added the enhancement New feature, improvement, or request label Sep 17, 2022
@alienatedsec
Copy link
Owner

@iointerrupt thanks - noted

@alienatedsec
Copy link
Owner

@iointerrupt
Can you reference any solutions already available?

@iointerrupt
Copy link
Author

@iointerrupt Can you reference any solutions already available?

The original post above shows the piece of code added to the system.sh that could be a solution.

alienatedsec added a commit that referenced this issue Sep 29, 2022
@alienatedsec
Copy link
Owner

alienatedsec commented Sep 29, 2022

@iointerrupt done

The format needs to be as follows:
wifi_ssid=your_wifi_essid
wifi_psk=your_wifi_password

I will release another version soon

[Edited] removed square brackets as it was misleading

@alienatedsec
Copy link
Owner

Done v0.3.4 released

@alienatedsec
Copy link
Owner

This issue continues in #350 and describes the problem in more detail.

In short:

  • the template file configure_wifi.zip needs to be edited with your WiFi details in the format as is, and no Enter's or lines should be added or removed.
  • copy over to your SD card /recover folder - this is /tmp/sd/recover when in the console on your camera
  • reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, improvement, or request
Projects
None yet
Development

No branches or pull requests

2 participants