I have 4 Vilar IP Cams. Recently I needed to move two of them to a new network. The setup program that came with the cam did not find the cameras so I had to do the setup via the web interface. It turned out however that the network settings page (Basic -> Network) did not save/apply the changes I made in to the page controls.
Since I'm Firefox user and I also do some pretty basic web development I enabled Firebug and checked what the malfunctioning Apply button actually does.
I debugged this settcpip function by:
- Enabling Script debugging
- Reloading the page (in Firebug UI)
- Set breakpoint at the line
element = document.getElementById('StaticIP');
To my surpise the element turned out to be ... null. I checked the HTML source and yes - there was no such id.
I had two options:
- Short-circuit the function used to check for correct IP address
Since I already spent too much time fixing a bug present in ~20 obviously never tested versions of the firmware I decided to check if the form submit will work at all.
What I did was to go the Apply button source and replace settcpip with document.form1.submit()like in this screen shot:
After that hitting Apply worked like a charm and I was able to change my cam's IP address.
If you want to use the same trick, please bear in mind that a single mistake in the form may trigger your cam unreachable. Then you'll most probably need to reset it to factory defaults by pressing the reset switch for at least 20 seconds.