-
Notifications
You must be signed in to change notification settings - Fork 101
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
[y211ga] Yi Home Camera 1080p: on weak wifi connection: sometimes no reconnect #996
Comments
I'm having the same problem on my "y623". Wifi signal at over 80% and it keeps disconnecting. When it does it's not able to reconnect. I've implemented your script and it seems to be fine. |
The script is a good idea. |
Update 17/2. My question is what will happen when we update the app to a new firmware.Could it be included in the firmware natively? @roleoroleo |
Since today it looks like that the problem is solved by this workaround. In the log I can see, that in some cases the script has reconnected the cam to wifi successfully. Unfortunately today the connection got lost again and this time the workaround hasn't repaired the connection. Only the cronjob, which reboots the cam every 6 hours, has solved the issue this time. In the written logfile /tmp/sd/yi-hack/wlanlog.txt I could see:
for 549 times. Even the following entry is continusly logged except from date and time:
Unfortunately there is no "SCANNING" or "CONNECTING" to see. Maybe I should try to change |
Update: Since I want to avoid restarting the camera (cause recording on sd card continues even without wifi), I have expanded and test the workaround at my test camera a bit. Beforce sending an My newer extended workaround: As from @roleoroleo recommended I added the line above in a new file I'll observe and report. |
it's great, but I see some "issues":
i'm considering the following improvements:
|
Now I have put the workaround into a script and optimized it further. Improvements:
I saved the following code as file /tmp/sd/yi-hack/wifi_failsafe_watchdog.sh and set this file at the /tmp/sd/yi-hack/startup.sh, so that the /tmp/sd/yi-hack/startup.sh now looks like this (of course after removing the previous workaround at this file): /tmp/sd/yi-hack/startup.sh
/tmp/sd/yi-hack/wifi_failsafe_watchdog.sh
I decided not to check the internet access in favor of the established wifi connection, because this workaround was originally intended to keep the wifi connection "stable" and secure. Without wifi connection it is neither possible to see if the camera is still alive nor access to the web interface/ssh. With established wifi connection access to the web interface/ssh should be possible for further measures possible. In addition, an internet disruption would then also have an impact on the camera itself if the script would restart the camera, for example. So I think foucussing on an established wifi connection should be the best in that case. |
[y211ga] Yi Home Camera 1080p: on weak wifi connection: sometimes no reconnect
Hello together.
Many thanks for the great work with this firmware. At one camera unfortunately the wifi signal is weak and cannot be optimized (its in an birds nest box). Sometimes (my guess when the neighbors using her wifi) our wifi-signal seemed to be to weak and the connection break. Unfortunately the cam sometimes does not connect to wifi again and has to be rebooted.
In another thread I've found the following script, wich I edited for myself and it seemed to work for me and reconnect the cam again:
while true; do if ! wpa_cli -i wlan0 status | grep -q "wpa_state=COMPLETED"; then echo -e "$(date): CONNECTION LOST\n\n$(wpa_cli -i wlan0 status)\n\n$(wpa_cli interface)\n\n$(ps)\n-----\n\n" >> /tmp/sd/yi-hack/wlanlog.txt; sleep 2; wpa_cli -i wlan0 reconfigure; fi; sleep 10; done &
I have added this code at the end of the file "/tmp/sd/yi-hack/script/mqtt_advertise/startup.sh" and rebooted the cam. To be safe I also restart the cam every six hours with active cronjob.
Because the cam is buildin at an birds nest box the physical access to it is a little bit complicated. Thats why I tried to reproduced the behaviour at another cam with mobile tethering (placed far away from the cam) and additional with deauth attacks to my mobile hot spot to simulate. Unfortunately I cannot reproduce the lack of reconnection. But even at the real cam this behaviour happens only sometimes a day (sometimes multiple times a day, but sometimes after several days of working).
Now the connection seemed to be more stable (or rather faster reconnecting) and the cam does not need to be an manual reboot again.
Here are the /proc/net/wireless from the real cam, on wich it happens:
WiFi Strength (according to web ui): 58 %
With the workaround showing above there was following interventions, where the script reconnected the cam successfully:
I faced this behaviour with FW 0.2.6, later with FW 0.3.0 and now with FW 0.3.3. For a while I replaced the cam with another one (cause i thought that they were broken) and I changed the sd card, as well. In the end it tourned out, that only the wifi connection were the problem - the cam itself recorded on local storage (even without reconnecting).
BELOW THIS LINE the output is only from my test constellation:
And here at the test-cam where I simualted the behaviour:
WiFi Strength (according to web ui): 48 %
In detail:
Even the workaround seemed to work for me, I'm not sure, if it is the best way and even the "/tmp/sd/yi-hack/script/mqtt_advertise/startup.sh" could be possible recreated update or maybe web ui on configuration so that the workaround possible don't stay.
Is there anything to check or configure better? The problem occurs with swap enabled and swap disabled; there seemed always to be ~12MB of free memory.
Thanks for help and greetings LF.
The text was updated successfully, but these errors were encountered: