After succesfully setting up a newer Foscam ipcam with the ipcamera binding and the Clickable Camera Widget, I tried to set up a second cam, which is a Foscam FI9821P. It appears to set up properly in the binding. When I try to use the Clickable Camera Widget, the snapshot photo appears as expected, but when I click on it, the streaming video never appears.
When I enter the:http://ip:88/cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat&format=1&usr=admin&pwd=password to enable the MJPEG streaming, I get:
<CGI_Result>
<result>-2</result>
</CGI_Result>
I don’t remember but I think the return code was different on the camera that works.
The camera streams to the Foscam app or web browser as expected.
I played around with the CGI command and determined that the cameras where it works, the return code is 0. I believe a return code of 3 is a password problem, but I’m not sure what a 2 means.
Foscam is making cameras now that do not support mjpeg. So check the manual and websites to check if your model can do it. The foscam API has an explanation on what the code means, when I am in front of a computer with the API I can take a quick look.
Thanks for the hint. I found some information about the API at
It looks like the return code of 2 is for Max Users. Not sure what the max is, but I know in addition to the binding I sometimes use the Foscam app. So I will try disabling the binding and shutting down any other access and try the CGI format command again.
The other thing the two cameras I’m having trouble with have in common is a password with a special character. I may try changing to a simpler password and see if that helps.
Logging out of everything didn’t seem to make a difference (still Return code 2), so I tried a simpler password. Now I’m getting return code 3, which the API documentation referenced above says is “User Not Exist”. I’m sure I’m using the correct user ID and password. I tried rebooting the camera. Perhaps there is something cached somewhere. I will continue to experiment.
Perhaps the documentation is old. I tried using a non existent user name, which gets a return of 2. I tried the correct user name and an incorrect password, which also gets 2. But the correct user name and password gets 3.
Just for everybody geting -3 as a return code. I also get it when the URL is not correct. Try testing with another URL that you know is correct and see if it works