GrumpyMeow / XiaomiXiaofangFirmware

Custom firmware for the Xiaomi Xiaofang IP Camera
41 stars 11 forks source link

Hangs from time to time #38

Open sshaikh opened 6 years ago

sshaikh commented 6 years ago

Although on the whole the fw works wonders, I have the following issue:

1) at random times the camera will stop providing a stream. 2) a reboot fixes this, but also requires wifi to be enabled again (as a reboot reverts SSID back to fangwifi) 3) Enabling wifi in webui (ie one button) makes everything work again, so wifi settings are being persisted.

I'd like to set up a daily script to a) reboot and then b) activate wifi as per the webgui.

Can you please help me with the above, in particular the wifi activation? What would the relevant cli command be?

Thanks

sshaikh commented 6 years ago

The following in rc.local does the autoconnect:

#ifconfig wlan0 192.168.1.1
#hostapd -B -P /var/run/hostapd.pid /etc/hostapd.conf
#udhcpd -f /etc/udhcpd.conf &

ifconfig wlan0 up
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf >/dev/null
udhcpc -p /var/run/udhcpc.wlan0.pid -i wlan0 >/dev/null

Just bear in mind that this stops the wifi hotspot from ever coming up.