I’ve had a Foscam 8910W network camera setup in my home for quite some time. The core firmware and web interface on these devices have never really been a strong point. The web interface is very dated, and I thought it might be fun to give it a new look.
There are two firmware files provided by Foscam, a core firmware file and Web UI firmware file. I found a shell script called foscam_pkmgr that can unpack and repackage both of these firmware files.
I took the functions from foscam_pkmgr and created a new script to customize the web interface. My new script, foscam_customweb, does the following:
- Unpacks Web UI firmware
- Adds user customizations
- Repacks Web UI firmware
- Uploads it to the camera
In terms of customizations, I replaced the main page with a simple Twitter Bootstrap layout. I added keybindings to the arrow keys using jQuery to control the camera movement instead of having to click on buttons.
Here is the script in action:
./foscam_customweb -w 188.8.131.52.bin -s 192.168.1.100 -u admin Enter password for admin: xxxx Found Web UI Version : 184.108.40.206 Unpacking Files... Extracting Web UI to 220.127.116.11.bin_extracted Backing up index.htm file to index_orig.htm Copying custom Web UI from custom_web to 18.104.22.168.bin_extracted Repackaging the Web UI Checking Integrity of repacked Web UI: ->Version : 22.214.171.124 ->Checksum verified (06769afa) Firmware successfully packed to custom_126.96.36.199.bin Uploading Web UI firmware custom_188.8.131.52.bin to http://192.168.1.132/upgrade_htmls.cgi ok. Completed. Now just wait for camera to reboot.
If anything does go wrong you can always revert to the original firmware.
curl -u admin:password -F email@example.com http://192.168.1.100/upgrade_htmls.cgi