13.07.2015 Views

Rovio API - WowWee

Rovio API - WowWee

Rovio API - WowWee

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>WowWee</strong> Group Limited<strong>API</strong> Specificationfor<strong>Rovio</strong>Version 1.2October 8, 2008prepared by<strong>WowWee</strong> Group Limited


Introduction<strong>WowWee</strong> <strong>Rovio</strong> TM is a mobile wireless IP camera with a three-wheeled drive system.<strong>Rovio</strong> is equipped with an IR sensor on the front for basic obstacle avoidance. <strong>Rovio</strong>also has a NorthStar II sensor (also known as the TrueTrack TM sensor in <strong>WowWee</strong>terms). This sensor enables <strong>Rovio</strong> to self-navigate as it follows pre-programmedpaths. The NSII (NorthStar II) system reads the two IR spots projected onto theceiling by the TrueTrack Beacon integrated into the <strong>Rovio</strong> docking base or projectedby a <strong>Rovio</strong> TrueTrack standalone beacon (Room Beacon). The data acquired fromthe NS2 sensor provides an x- and y- coordinate and theta as well some other usefulinformation.


TABLE OF CONTENTINTRODUCTION ................................................................................................................................................ 2CGI COMMANDS SPECIFICATIONS ............................................................................................................ 5MOVEMENT COMMANDS SPECIFICATIONS............................................................................................ 7RESPONSE CODE COMMANDS TABLE....................................................................................................... 8MOVEMENT CONTROL – GETREPORT() ................................................................................................... 9MOVEMENT CONTROL – STARTRECODING()....................................................................................... 10MOVEMENT CONTROL – ABORTRECORDING() ................................................................................... 11MOVEMENT CONTROL – STOPRECORDING(STRING PATHNAME)................................................ 11MOVEMENT CONTROL – DELETEPATH(STRING PATHNAME)........................................................ 11MOVEMENT CONTROL – GETPATHLIST ()............................................................................................. 12MOVEMENT CONTROL – PLAYPATHFORWARD(STRING PATHNAME)........................................ 12MOVEMENT CONTROL – PLAYPATHBACKWARD (STRING PATHNAME).................................... 13MOVEMENT CONTROL – STOPPLAYING () ............................................................................................ 13MOVEMENT CONTROL – PAUSEPLAYING ().......................................................................................... 13MOVEMENT CONTROL – RENAMEPATH(STRING OLDPATHNAME, STRINGNEWPATHNAME)............................................................................................................................................ 14MOVEMENT CONTROL – GOHOME() ....................................................................................................... 14MOVEMENT CONTROL – GOHOMEANDDOCK()................................................................................... 14MOVEMENT CONTROL – UPDATEHOMEPOSITION ()......................................................................... 15MOVEMENT CONTROL – SETTUNINGPARAMETERS()....................................................................... 15MOVEMENT CONTROL – GETTUNINGPARAMETERS()...................................................................... 15MOVEMENT CONTROL – RESETNAVSTATEMACHINE ()................................................................... 16MOVEMENT CONTROL – MANUALDRIVE() ........................................................................................... 16MOVEMENT CONTROL – GETMCUREPORT ()....................................................................................... 17MOVEMENT CONTROL – CLEARALLPATHS()....................................................................................... 18MOVEMENT CONTROL – GETSTATUS() .................................................................................................. 18MOVEMENT CONTROL – SAVEPARAMETER( LONG INDEX, LONG VALUE)............................... 19MOVEMENT CONTROL – READPARAMETER( LONG INDEX)........................................................... 19MOVEMENT CONTROL – GETLIBNSVERSION().................................................................................... 19MOVEMENT CONTROL – EMAILIMAGE( STRING EMAIL ) ............................................................... 20MOVEMENT CONTROL – RESETHOMELOCATION()........................................................................... 20CAMERA CONTROL – GETDATA.CGI....................................................................................................... 20CAMERA CONTROL – GETIMAGE............................................................................................................. 21CAMERA CONTROL – VIDEO STREAMING............................................................................................. 21CAMERA CONTROL – CHANGERESOLUTION.CGI............................................................................... 22CAMERA CONTROL – CHANGECOMPRESSRATIO.CGI ...................................................................... 22CAMERA CONTROL – CHANGEFRAMERATE.CGI................................................................................ 22CAMERA CONTROL – CHANGEBRIGHTNESS.CGI ............................................................................... 23CAMERA CONTROL – CHANGESPEAKERVOLUME.CGI..................................................................... 23CAMERA CONTROL – CHANGEMICVOLUME.CGI ............................................................................... 24


CAMERA CONTROL – SETCAMERA.CGI ................................................................................................. 24CAMERA CONTROL – GETCAMERA.CGI ................................................................................................ 24USER MANAGEMENT – GETMYSELF.CGI............................................................................................... 25USER MANAGEMENT – SETUSER.CGI...................................................................................................... 25USER MANAGEMENT – DELUSER.CGI ..................................................................................................... 26USER MANAGEMENT – GETUSER.CGI..................................................................................................... 26USER MANAGEMENT – SETUSERCHECK.CGI ....................................................................................... 26TIME – SETTIME.CGI..................................................................................................................................... 27TIME – GETTIME.CGI.................................................................................................................................... 27TIME – SETLOGO.CGI ................................................................................................................................... 27TIME – GETLOGO.CGI................................................................................................................................... 28NETWORK – SETIP.CGI................................................................................................................................. 28NETWORK – GETIP.CGI................................................................................................................................29NETWORK – SETWLAN.CGI ........................................................................................................................ 29NETWORK – GETWLAN.CGI........................................................................................................................ 30NETWORK – SETDDNS.CGI .......................................................................................................................... 30NETWORK – GETDDNS.CGI ......................................................................................................................... 31NETWORK – SETMAC.CGI ........................................................................................................................... 31NETWORK – GETMAC.CGI .......................................................................................................................... 31HTTP SERVER – SETHTTP.CGI ................................................................................................................... 32HTTP SERVER – GETHTTP.CGI .................................................................................................................. 32MAIL – SETMAIL.CGI .................................................................................................................................... 33MAIL – GETMAIL.CGI.................................................................................................................................... 33MAIL – SENDMAIL.CGI ................................................................................................................................. 34OTHER – SETNAME.CGI................................................................................................................................34OTHER – GETNAME.CGI............................................................................................................................... 34OTHER – GETSTATUS.CGI ........................................................................................................................... 35OTHER – GETLOG.CGI.................................................................................................................................. 37OTHER – GETVER.CGI .................................................................................................................................. 39OTHER – SETFACTORYDEFAULT.CGI ..................................................................................................... 40OTHER – REBOOT.CGI .................................................................................................................................. 40OTHER – GETDATA.CGI................................................................................................................................40OTHER – GETAUDIO.CGI.............................................................................................................................. 41OTHER – SETMEDIAFORMAT.CGI ............................................................................................................ 42OTHER – GETMEDIAFORMAT.CGI ........................................................................................................... 42OTHER – UPLOAD.CGI .................................................................................................................................. 43OTHER – CMD.CGI.......................................................................................................................................... 43


CGI Commands SpecificationsCategory CGI Commands DescriptionMovement Rev.cgi Refer to Movement Command tableCamera Control GetData.cgi Get MJPEGGetImage *Get ImageVideo Streaming *Stream VideoChangeResolution.cgiChange the resolutions of camera'simages.ChangeCompressRatio.cgiChange the quality setting of camera'simages.ChangeFramerate.cgiChange the frame rate setting ofcamera's images.ChangeBrightness.cgiChange the brightness of camera'simages.ChangeSpeakerVolume.cgiChange the Speaker Volume setting ofIP_Cam.ChangeMicVolume.cgiChange the Mic Volume setting ofIP_Cam.SetCamera.cgiChange camera sensor’s settingsUserManagementGetCamera.cgiGetMyself.cgiSetUser.cgiDelUser.cgiGetUser.cgiSetUserCheck.cgiGet camera sensor’s settingsGet the username who sent this HTTPrequest.Add a user or change the password forexisted user.Delete a user account.Get the users list of IP Camera.Enable or disable user authorizationcheck.Time SetTime.cgi (not tested) Set time zone and time.GetTime.cgiGet current IP Camera's time zone andtime.SetLogo.cgiSet a logo string on the image.GetLogo.cgiGet a logo string on the image.Network SetIP.cgi Tell IP Camera how to set an initial IP.GetIP.cgiGet IP settings.SetWlan.cgiChange settings for wireless LAN.GetWlan.cgiGet settings for wireless LAN.SetDDNS.cgi Set DDNS using dyndns.org / no-ip /dnsomatic serviceGetDDNS.cgiGet DDNS settingSetMac.cgiSet Mac addressGetMac.cgiGet Mac addressHttp Server SetHttp.cgi Set the parameters for HTTP server(Currently only TCP port).GetHttp.cgiGet HTTP server's settings.Mail SetMail.cgi Configure email for sending IPCamimages.GetMail.cgiGet email for sending IPCam images.SendMail.cgiSend an email with IPCam images.Other SetName.cgi Set name of the camera.GetName.cgiGet camera's name.GetStatus.cgiGet run-time status of <strong>Rovio</strong>.GetLog.cgiGet IP Camera's system logsinformation.GetVer.cgiGet IP Camera's version.SetFactoryDefault.cgiChange all settings to factory-default.Reboot.cgiReboot IP Camera.GetData.cgiGet images/status with "multipart/xmixed-replace"mime-type.GetAudio.cgiSend audio to server and playback at


SetMediaFormat.cgiGetMediaFormat.cgiUpload.cgiCmd.cgithe serverSet media formatGet media formatUpload firmware image (*.bin)Use this command to combine severalcommands to a single http request,* - not cgi command


Movement Commands SpecificationsAction Function NameDescriptionnumber1 GetReport() Generates report of current status2 StartRecoding() Start recording a path.3 AbortRecording() Terminates recording a path4 StopRecording(string PathName) Stop recording and store the path5 Deletepath(string PathName) Delete specific path6 GetPathList() Return stored paths7 PlayPathForward(string PathName) Replay a stored path from closest point tothe end8 PlayPathBackward (string PathName) Replay a stored path from closest point tothe beginning9 StopPlaying() Stop playing a path10 PausePlaying() Pause playing a path11 RenamePath(string OldPathName, Rename the path namestring NewPathName)12 GoHome() Drive to home location without docking13 GoHomeAndDock() Drive to home location with docking14 UpdateHomePosition() Update home location15 SetTuningParameters() Set homing, docking and drivingparameters16 GetTuningParameters() Return homing, docking and drivingparameters17 ResetNavStateMachine() Stop and reset to idle18 ManualDrive() Accepts manual driving commands19 RESERVED TestCommand() RESERVED20 GetMCUReport() Return MCU report21 ClearAllPaths() Delete all paths22 GetStatus() Return navigation status23 SaveParameter( long index, long value ) Stores robot parameters24 ReadParameter( long index ) Return robot parameters25 GetLibNSVersion() Return libNS and NS sensor versions26 EmailImage( string email ) Email current image / set an action (in pathrecording mode)27 ResetHomeLocation() Clear home location


Response Code Commands TableCode Error CodeDescription0 SUCCESS CGI command successful1 FAILURE CGI command general failure2 ROBOT_BUSY Robot is executing autonomousfunction3 FEATURE_NOT_IMPLEMENTED CGI command not implemented4 UNKNOWN_CGI_ACTION CGI nav command: unknown actionrequested5 NO_NS_SIGNAL No NS signal available6 NO_EMPTY_PATH_AVAILABLE Path memory is full7 FAILED_TO_READ_PATH Failed to read FLASH8 PATH_BASEADDRESS_NOT_INITIALIZED FLASH error9 PATH_NOT_FOUND No path with such name10 PATH_NAME_NOT_SPECIFIED Path name parameter is missing11 NOT_RECORDING_PATH Save path command received whilenot in recording mode12 FLASH_NOT_INITIALIZED Flash subsystem failure13 FAILED_TO_DELETE_PATH Flash operation failed14 FAILED_TO_READ_FROM_FLASH Flash operation failed15 FAILED_TO_WRITE_TO_FLASH Flash operation failed16 FLASH_NOT_READY Flash failed17 NO_MEMORY_AVAILABLE NA18 NO_MCU_PORT_AVAILABLE NA19 NO_NS_PORT_AVAILABLE NA20 NS_PACKET_CHECKSUM_ERROR NA21 NS_UART_READ_ERROR NA22 PARAMETER_OUTOFRANGE One or more parameters are out ofexpected range23 NO_PARAMETER One or more parameters are missing


Movement Control – GetReport()DescriptionGenerates a report from libNS module that provides <strong>Rovio</strong>’s current status.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 1PrivilegeNoneReturn ValueParameter Description Valueresponses Error checking 0 – no errorx, y, theta Average location of <strong>Rovio</strong> inrelation to the strongest roombeaconx,y = -32767 – 32768theta = -PI – PIroom Room ID. 0 = Home base.1-9 = Mutable roomprojector.ss Navigation Signal strength. 0 – 65535 (16bit)(Strong signal > 47000)(No signal < 5000)beaconbeacon_xnext_roomnext_room_ssSignal strength for dockingbeacon when availableHorizontal poition of beacon asseen by NSThe next strongest room beaconID seen.The signal strength of the nextstrongest room beacon.0 – 65535 (16bit)-32767 – 32768-1 = no room found.1-9 = Mutable room ID0 – 65535 (16bit)(Strong signal > 47000)(No signal < 5000)state Status of the <strong>Rovio</strong> 0 (idle)1 (driving home)2 (docking)3 (executing path)4 (recording path)resistance Status of robot resistance to drive NOT IN USEinto NS deprived areassmCurrent status of the navigation (For Debug purposes)state machine.ppCurrent way point when using 1 - 10path.flags Flags 1 = home position2 = obstacle detected4 = IR detector activatedbrightnessIndicates the current brightnesslevel1 (dimmest) – 6 (brightest)


Resolution Resolution 0 = [176x144]1 = [320x240]2 = [352x240]3 = [640x480]video_compression Video compression 0 = Low1 = Med2 = Highframe_rate Frame rate. 1 - 30privilegeShow current user privilege 0 = administratoruser_checkstatus.Whether need to have login andpassword.1 = guest user.0 = request on usernameand password1 = no request onusername and passwordspeaker_volume Speaker Volume. 0 (lowest) – 31 (highest)mic_volume Microphone Volume. 0 (lowest) – 31 (highest)wifi_ss Wifi Signal strength. 0 - 254show_time Whether show time in the image 0 = Not showing the time.1 = Showing time.ddns_state DDNS update status 0 = no update,1 = updating,2 = update successfully3 = update failedemail_state Current status of e-mail client. NOT IN USEbattery Battery status < 100 = turn itself off100-106 = try to go backhome106 – 127 = normalcharging Whether it is charging 0 – 79 = not charging80 = charginghead_position Head position 204 = position low135-140 = position midway65 = position highac_freq Projector’s frequency 0 = not detected1 = 50 Hz2 = 60 HzMovement Control – StartRecoding()DescriptionStart recording a path.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 2PrivilegeNone


Return Valueresponse (Please refer to “Response Code Commands Table”)Remark<strong>Rovio</strong> will resist going outside NorthStar coverage area while recording path<strong>Rovio</strong> will stop recording if coverage is lost<strong>Rovio</strong> will stop recording if user connection is lostMovement Control – AbortRecording()DescriptionTerminates recording of a path without storing it to flash memory.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 3PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – StopRecording(string PathName)DescriptionStops the recoding of a path and stores it in flash memory; javascript will give default name if userdoes not provide one.Grammar/rev.cgi?Cmd=nav&action=value&name=n_valueInput Parametervalue = 4n_value = (name of the path)PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – Deletepath(string PathName)DescriptionDeletes specified path.


Grammar/rev.cgi?Cmd=nav&action=value&name=n_valueInput Parametervalue = 5n_value = (name of the path)PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GetPathList ()DescriptionReturns a list of paths stored in the robot.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 6PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – PlayPathForward(string PathName)DescriptionReplays a stored path from closest point to the end; If the NorthStar signal is lost, it stops.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 7PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)


Movement Control – PlayPathBackward (string PathName)DescriptionReplays a stored path from closest point to the beginning; If NorthStar signal is lost it stops.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 8PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – StopPlaying ()DescriptionStop playing a path.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 9PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – PausePlaying ()DescriptionPause the robot and waits for a new pause or stop command.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 10PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)


Movement Control – RenamePath(string OldPathName, stringNewPathName)DescriptionRename the old path.Grammar/rev.cgi?Cmd=nav&action=value&name=OldPathName&newname=NewPathNameInput Parametervalue = 11PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GoHome()DescriptionDrive to home location in front of charging station.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 12PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GoHomeAndDock()DescriptionDrive to home location in front of charging station and dockGrammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 13


PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – UpdateHomePosition ()DescriptionDefine current position as home location in front of charging station.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 14PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – SetTuningParameters()DescriptionChange homing, docking and driving parameters – speed for driving commandsGrammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 15PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GetTuningParameters()DescriptionReturns homing, docking and driving parameters.Grammar/rev.cgi?Cmd=nav&action=value


Input Parametervalue = 16PrivilegeNoneReturn ValueResponse (Please refer to “Response Code Commands Table”)LeftRightForwardReverseDriveTurnHomingTurnManDriveManTurnDockTimeoutMovement Control – ResetNavStateMachine ()DescriptionStops whatever it was doing and resets to idle state.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 17PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – ManualDrive()DescriptionAccepts manual driving commands.Grammar/rev.cgi?Cmd=nav&action=value&drive=d_value&speed=s_valueInput Parametervalue = 18d_value = 0 (Stop)1 (Forward)2 (Backward)3 (Straight left)4 (Straight right)5 (Rotate left by speed)6 (Rotate right by speed)


7 (Diagonal forward left)8 (Diagonal forward right)9 (Diagonal backward left)10 (Diagonal backward right)11 (Head up)12 (Head down)13 (Head middle)14 (Reserved)15 (Reserved)16 (Reserved)17 (Rotate left by 20 degree angle increments)18 (Rotate right by 20 degree angle increments)s_value = 1 (fastest) – 10 (slowest)PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GetMCUReport ()DescriptionReturns MCU report including wheel encoders and IR obstacle avoidance.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 20PrivilegeNoneReturn ValueOffset Length Description0 1B Length of the packet1 1B NOT IN USE2 1B Direction of rotation of left wheel since last read (bit 2)3 2B Number of left wheel encoder ticks since last read5 1B Direction of rotation of right wheel since last read (bit 2)6 2B Number of right wheel encoder ticks since last read8 1B Direction of rotation of rear wheel since last read (bit 2)9 2B Number of rear wheel encoder ticks since last read11 1B NOT IN USE12 1B Head position13 1B 0x7F: Battery Full (0x7F or higher for new battery)0x??: Orange light in <strong>Rovio</strong> head. ( to be define)0x6A: Very low battery (Hungry, danger, very low battery level)libNS need take control to go home and charging0x64: Shutdown level (MCU will cut off power for protecting thebattery)


14 1B bit 0 : Light LED (head) status, 0: OFF, 1: ONbit 1 : IR-Radar power status. 0: OFF, 1: ONbit 2 : IR-Radar detector status: 0: fine, 1: barrier detected.bit 3-5: Charger staus0x00 : nothing happen0x01 : charging completed.0x02 : in charging0x04 : something wrong, error occur.bit 6,7: undefined, do not use.Movement Control – ClearAllPaths()DescriptionDeletes all paths in FLASH memoryGrammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 21PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)Movement Control – GetStatus()DescriptionReports navigation stateGrammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 22PrivilegeNoneReturn Valueresponse (Please refer to “Response Code Commands Table”)state = 0 (idle)1 (driving home)2 (docking)3 (executing path)


4 (recording path)Movement Control – SaveParameter( long index, long value)DescriptionStores parameter in the robot’s FlashGrammar/rev.cgi?Cmd=nav&action=value&index=index_value&value=value_valueInput Parametervalue = 23index_value = 0 – 19value_value = 32bit signed integerPrivilegeNoneReturn ValueResponse = 17 or 22. (Please refer to “Response Code Commands Table”)Movement Control – ReadParameter( long index)DescriptionStores parameter in the robot’s FlashGrammar/rev.cgi?Cmd=nav&action=value&index=index_valueInput Parametervalue = 24index_value = 0 – 19PrivilegeNoneReturn ValueResponse = 17 or 22. (Please refer to “Response Code Commands Table”)ValueMovement Control – GetLibNSVersion()DescriptionReturns string version of libNS and NS sensorGrammar/rev.cgi?Cmd=nav&action=value


Input Parametervalue = 25PrivilegeNoneReturn ValueResponse (Please refer to “Response Code Commands Table”)libNS versionMovement Control – EmailImage( string email )DescriptionEmails current image or if in path recording mode sets an actionGrammar/rev.cgi?Cmd=nav&action=value&email=e_valueInput Parametervalue = 26e_value = (email address)PrivilegeNoneReturn ValueResponse (Please refer to “Response Code Commands Table”)Movement Control – ResetHomeLocation()DescriptionClears home location in FLASH.Grammar/rev.cgi?Cmd=nav&action=valueInput Parametervalue = 27PrivilegeNoneReturn ValueResponse (Please refer to “Response Code Commands Table”)Camera Control – GetData.cgiDescriptionThe basic command for acquiring MJPEG


Grammar/ChangeResolution.cgi?ResType=value[&RedirectUrl=sUrl]Input ParameterNonePrivilegeNoneReturn ValueAn instance captured motion image.Camera Control – GetImageDescriptionThe basic command for acquiring ImageGrammar/Jpeg/CamImg[value].jpgInput Parametervalue = 4 digits random numberPrivilegeNoneReturn ValueAn instance captured image.Camera Control – Video StreamingDescriptionThe basic command for acquiring ImageGrammarRtsp://xxx.xxx.xxx.xxx/webcam (under IE with WebSee.cab ActiveX only)Input ParameterNonePrivilegeNoneReturn ValueStreaming VideoExample


Camera Control – ChangeResolution.cgiDescriptionChange the resolution setting of camera's images.Grammar/ChangeResolution.cgi?ResType=value[&RedirectUrl=sUrl]Input ParameterCamera supports 4 types of resolution:0 - {176, 144}1 - {352, 288}2 - {320, 240} (Default)3 - {640, 480}PrivilegeAdministratorReturn ValueNoneCamera Control – ChangeCompressRatio.cgiDescriptionChange the quality setting of camera's images. (only available with MPEG4)Grammar/ChangeCompressRatio.cgi?Ratio=value[&RedirectUrl=sUrl]Input ParameterRatio:0 – 2 (representing low, medium and high quality respectively)Default Value: 1 (medium)PrivilegeAdministratorReturn ValueNoneCamera Control – ChangeFramerate.cgiDescriptionChange the frame rate setting of camera's images.


Grammar/ChangeFramerate.cgi?Framerate=value[&RedirectUrl=sUrl]Input ParameterFramerate:2 – 32 frame per seconds respectivelyDefault Value: 30PrivilegeAdministratorReturn ValueNoneCamera Control – ChangeBrightness.cgiDescriptionChange the brightness setting of camera's images.Grammar/ChangeBrightness.cgi?Brightness=value[&RedirectUrl=sUrl]Input ParameterBrightness:0 - 6 (The lower the value is, the dimmer the image is)Default Value: 6PrivilegeAdministratorReturn ValueNoneCamera Control – ChangeSpeakerVolume.cgiDescriptionChange the Speaker Volume setting of IP_Cam.Grammar/ChangeSpeakerVolume.cgi?SpeakerVolume=value[&RedirectUrl=sUrl]Input ParameterSpeaker Volume:0 - 31 (The lower the value is, the lower the speaker volume is)Default Value: 15PrivilegeAdministrator


Return ValueNoneCamera Control – ChangeMicVolume.cgiDescriptionChange the Mic Volume setting of IP_Cam.Grammar/ChangeMicVolume.cgi?MicVolume=value[&RedirectUrl=sUrl]Input ParameterMic Volume:0 - 31 (The lower the value is, the lower the mic volume is)Default Value: 15PrivilegeAdministratorReturn ValueNoneCamera Control – SetCamera.cgiDescriptionChange camera sensor’s settingsGrammar/SetCamera.cgi?Frequency=value[&RedirectUrl=sUrl]Input ParameterFrequency:50 – 50Hz60 – 60Hz0 – Auto detectPrivilegeNoneReturn ValueNoneCamera Control – GetCamera.cgiDescriptionGet the camera sensor’s settings


Grammar/GetCamera.cgi?[&JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueEach line represents an item, and every item is in the format as Name = Value.(Refer to SetCamera.cgi)User Management – GetMyself.cgiDescriptionGet the username who sent this HTTP request.Grammar/GetMyself.cgi?ShowPrivilege=[&JsVar=variable[&OnJs=function]]Input ParameterValue:True / FalsePrivilegeNoneReturn ValuePrivilege = 0 (for common user)Privilege = 1 (for super user)(Always returns 0 if it is in Non-authorization mode under SetUserCheck.cgi)User Management – SetUser.cgiDescriptionAdd a user or change the password for existed user.Grammar/SetUser.cgi?User=sUserName&Pass=sPassword [&RedirectUrl=sUrl]Input ParameterUsername & PasswordPrivilegeAdministrator


User Management – DelUser.cgiDescriptionDelete a user account.Grammar/DelUser.cgi?User=sUserName[&RedirectUrl=sUrl]Input ParameterUsernamePrivilegeAdministratorUser Management – GetUser.cgiDescriptionGet the users list of IP Camera.Grammar/GetUser.cgi[?ShowPrivilege=][&JsVar=variable[&OnJs=function]]Input ParameterTrue / FalsePrivilegeAdministratorReturn ValueIf “ShowPrivilege” = trueEach line represents a usernameEach line represents a privilege (after all the username)If “ShowPrivilege” = falseNo privilege will be shown.User Management – SetUserCheck.cgiDescriptionEnable or disable user authorization check.Grammar/SetUserCheck.cgi?Check=[&RedirectUrl=sUrl]Input ParameterTrue / FalsePrivilegeAdministrator


Return ValueNoneTime – SetTime.cgiDescriptionSet server time zone and time.Grammar/SetTime.cgi?[&Sec1970=value1][&TimeZone=value2][&RedirectUrl=sUrl]Input ParameterSec1970 - seconds since "00:00:00 1/1/1970".TimeZone – Time zone in minutes. (e.g. Beijing is GMT+08:00, TimeZone = -480)(Visit GetTime.cgi for time information on IP Camera)PrivilegeAdministratorReturn ValueNoneTime – GetTime.cgiDescriptionGet current IP Camera's time zone and time.Grammar/GetTime.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueEach line represents an item, and every item is in the format as Name = Value.(Visit SetTime.cgi for details)Time – SetLogo.cgiDescriptionSet a logo string on the image.Grammar/SetLogo.cgi?[&showstring=value1][&pos=value2][&RedirectUrl=sUrl]


Input Parametershowstringtime - timedate - datever - versionpos0 – top left1 – top right2 – bottom left3 – bottom right(visit GetLogo.cgi to get the time information on IP Camera)PrivilegeAdministratorReturn ValueNoneTime – GetLogo.cgiDescriptionGet a logo string on the image.Grammar/GetLogo.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueEach line represents an item, and every item is in the format as Name = Value.(visit SetLogo.cgi for details)Network – SetIP.cgiDescriptionTell IP Camera how to set an initial IP.Grammar/SetIP.cgi?[Interface=][&Enable=][&IPWay=][&CameraName=sName][&IP=sIP][&Netmask=sNetmask][&Gateway=sGateway][&DNS0=sDNS0][&DNS1=sDNS1][&DNS2=sDNS2][&RedirectUrl=sUrl]Input ParameterIf IPWay=manually, IP, Netmask, Gateway, DNS0 (DNS1, DNS2) should also be specified.(visit GetIP.cgi for the current setting)


PrivilegeAdministratorReturn ValueNoneNetwork – GetIP.cgiDescriptionGet IP settings.Grammar/GetIP.cgi[Interface=&][?JsVar=variable[&OnJs=function]]Input ParameterInterface- eth1- wlan0PrivilegeNoneReturn ValueCameraName, DNS0, DNS1, DNS2, Enable, IPWay, IP, Netmask and GatewayEach line represents an item, and every item is in the format as Name = Value.(visit SetIP.cgi for details)Network – SetWlan.cgiDescriptionTell IP Camera how to set an initial WiFi.Grammar/SetWlan.cgi?[Mode=][&Channel=sChannel][&ESSID=sEssid][&WepSet=][&WepAsc=sWepAsc][&Wep64type=][&Wep64=sWep64][&Wep128type=][&Wep128=sWep128][&RedirectUrl=sUrl]Input ParameterIf IPWay=manually, IP, Netmask, Gateway, DNS0 (DNS1, DNS2) should also be specified.(visit GetIP.cgi for the current setting)PrivilegeAdministrator.Return ValueNone


Network – GetWlan.cgiDescriptionGet WiFi settings.Grammar/GetWlan.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueESSID, channel, Mode, WepSet, WepAsc, WepGroup, Wep64, Wep64type, Wep128 andWep128typeEach line represents an item, and every item is in the format as Name = Value.(visit SetIP.cgi for the current setting)Network – SetDDNS.cgiDescriptionSet dyndns.org service for IPCamGrammar/SetDDNS.cgi?[Enable=][Service=][&User=sUsername][&Pass=sPassword][&DomainName=sDomainName][&IP=sIPAddress][&Proxy=sProxyServer][&ProxyPort=iProxyServerPort][&ProxyUser=sProxyUsername][&ProxyPass=sProxyPassword][&RedirectUrl=sUrl]Input ParameterService – DDNS service providerUser – usernamePass – passwordIP – IP address (null for auto detect)Proxy – name of the proxyProxyPort – port of the proxyProxyUser – username of the proxyProxyPass – password of the proxyPrivilegeAdministratorReturn ValueNoneRemarkSet the account for dyndns.org. To connect the dyndns server, if HTTP proxy is required, set theProxy relative value, otherwise leave them blank. If sIPAddress is not set, IPCam will detect the IPaddress automatically.Visit GetDDNS.cgi to get the current setting.


Network – GetDDNS.cgiDescriptionGet DDNS settingsGrammar/GetDDNS.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueEach line represents an item, and every item is in the format as Name = Value.(Refer to SetDDNS.cgi)Return information represent by “Info” should be one of the following values:UpdatedUpdating FailedUpdatingIP CheckedNot UpdateNetwork – SetMac.cgiDescriptionSet Mac addressGrammar/SetMac.cgi?[MAC=mac address]Input ParameterMACPrivilegeAdministratorReturn ValueNoneNetwork – GetMac.cgiDescriptionGet Mac addressGrammar/GetMac.cgi[?JsVar=variable[&OnJs=function]]


Input ParameterNonePrivilegeAdministratorReturn ValueMac AddressHttp Server – SetHttp.cgiDescriptionSet the parameters for HTTP server (Currently only TCP port).Grammar/SetHttp.cgi?Port=iPort[&RedirectUrl=sUrl] (for modifying one port)/SetHttp.cgi?Port0=iPort0&Port1=iPort1[&RedirectUrl=sUrl] (for modifying more than one port)Input ParameterPort, Port0, Port1 (Port Name)Port valuee.gSetHttp.cgi?Port=8080SetHttp.cgi?Port0=8080&Port1=8230(visit GetHttp.cgi for the current setting)PrivilegeAdministratorReturn ValueNoneHttp Server – GetHttp.cgiDescriptionGet HTTP server's settings.Grammar/GetHttp.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValuePort0Port1


Each line represents an item, and every item is in the format as Name = Value.(visit SetHttp.cgi for the current setting)Mail – SetMail.cgiDescriptionConfigure email for sending IPCam images.Grammar/SetMail.cgi?Enable=[&MailServer=sServer][&Sender=sSenderName][&Receiver=sReceiverAddress][&Subject=sSubject][&User=sUserName][&PassWord=sPassword][&CheckFlag=CHECK][&Interval=iMilliSeconds][&RedirectUrl=sUrl]Input ParameterEnable – IgnoredMailServer - mail server addressSender - sender’s email addressReceiver - receiver’s email address, multi-receivers separated by ‘;’Subject - subject of emailUser - user name for logging into the MailServerPassWord - password for logging into the MailServerCheckFlag - whether the MailServer needs to check passwordInterval - IgnoredPrivilegeAdministratorReturn ValueNoneMail – GetMail.cgiDescriptionGet email settings.Grammar/GetMail.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeAdministratorReturn ValueMailServer, Port, Sender, Receiver, Subject, Body, User, PassWord, CheckFlag and EnableEach line represents an item, and every item is in the format as Name = Value.(visit SetMail.cgi for the current setting)


Mail – SendMail.cgiDescriptionSend an email with IPCam images.Grammar/SendMail.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeAdministratorReturn ValueNone(visit SetHttp.cgi for the current setting)Other – SetName.cgiDescriptionSet camera's name.Grammar/SetName.cgi?CameraName=


Return ValueCameraName(visit SetName.cgi for the current setting)Other – GetStatus.cgiDescriptionGet run-time status of <strong>Rovio</strong>.Grammar/GetStatuscgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNoneReturn ValueText with length of 95Byte Description Value0, 1 Camera State 00 - off01 – on2, 3 Modem State 00 - off01 - on line(common mode)02 - connecting(common mode)4, 5 PPPoE State same as Modem state6, 7, 8 x-direction Reserved9, 10, y-direction Reserved1112, 13, FocusReserved1415, 16, Bright 0 – 2551718, 19, contrast 0 – 2552021 resolution 00 - {176, 144}01 - {320, 240}02 - {352, 288}03 - {640, 480}22 compression Reservedratio23 privilege 0 - super user(administrator)1 - common user24, picture index (999999 - invalid picture)25, .., 2930 email state 0 - do not send motion-detected pictures1 - send motion-detected pictures, success2 - send motion-detected pictures, fail (wrongIP, user or password?)


31 user check 0 - do not check user, any user can connectand act as a super user1 - username and password required, onlyusername is "administrator" has the superprivilege.32, image file length in bytes34, .., 3940,42, .., 55lengthmonitor rect4 - left(0-9999)4 - top(0-9999)4 - right(0-9999)4 - bottom(0-9999)56 ftp state 0 - disable ftp upload1 - enable ftp upload, and upload success2 - enable ftp upload, but fail(wrong IP, user orpassword?)57, 58,5960,61, ...,65saturation 0 - 255motion detectedindex(999999 - init value)66, 67, Hue 0 - 2556869, 70, sharpness 0 - 2557172 motion detectway0 - no motion detectnon-zero - motion detect73 sensor'sfrequency0 - outdoor1 - 50Hz2 - 60Hz74 channel mode 0 - fixed mode1 - round robin mode75, 76 channel value In fixed mode, the value may be from 0 to 3In round robin mode, the value may be from 1to 1577, 78, audio volume7980 dynamic DNSstate0 - no update1 - updating2 - update successfully3 - update failed81 audio state 0 - audio disabled1 - audio enabled82, 83, frame rate8485,86,87Speakervolume88, 89, Mic volume9091 Show Time 0 - do not show time in image1 – show time in image92 WiFi Strength 0-15, 0 is Max.93, 94 BatteryLevel 0-0xFF, 255 is Max.


Other – GetLog.cgiDescriptionGet <strong>Rovio</strong>’s system logs information.Grammar/GetLog.cgi[?JsVar=variable[&OnJs=function]]Input ParameterNonePrivilegeNone (different privilege right may result in different content)Return ValueTime – operation time since power on (in second)Log –byte 0, 1 - reason for recording this log, refer to table below. eg: 27 is shown that new client connectto IP Camera.byte 2 ~ 5 - reserved.byte 6 ~ 13 - operator's IP. eg: 0A820B57 is 10.130.11.87.byte 14 ~ 25 - operator's MAC. eg: 0000E8E26A88 is 00:00:E8:E2:6A:88.byte 26 ~ 35 - time of this log.For byte 0, 10 Information1 Error11 Set user12 Del user13 Set user check14 Open camera15 Close camera16 Change resolution17 Change quality18 Change brightness19 Change contrast20 Change saturation21 Change hue22 Change Sharpness23 Set email24 Set ftp server25 Dial (pppoe)26 Dial (modem)27 New client28 Set Motion Detect29 Set Monite Area30 Set Server Time31 Set Server IP32 Set Http Port


Examplec"Set Motion Detect", 28,"Set Monite Area", 29,"Set Server Time", 30,"Set Server IP", 31,"Set Http Port", 32,""];function Hex2IP(s){var sRt = "";var sSuc = false;var iDec;for (var i = 0; i < 4; i++){if (i > 0) sRt += ".";iDec = parseInt(s.substr(i * 2, 2), 16);if (iDec != 0) sSuc = true;sRt += iDec;}return (sSuc?sRt:"");}function Hex2MAC(s){var sRt = "";var sSuc = false;var iDec;for (var i = 0; i < 6; i++){if (i > 0) sRt += ":";iDec = parseInt(s.substr(i * 2, 2), 16);if (iDec != 0) sSuc = true;sRt += s.substr(i * 2, 2);}return (sSuc?sRt:"");}function ShowLog(s){var sLine, sRes, iType, iTime;var iTimeAdjust = parseInt(s.substr(0, 10), 10);var dTimeAdjust = new Date();sRes = "";dTime = new Date(dTimeAdjust - 1000 * iTimeAdjust);sRes += "System Boot"+ (dTime.getMonth()+1)+ "/" + dTime.getDate()+ "/" + dTime.getYear()+ " " + dTime.getHours()+ ":" + dTime.getMinutes()+ "";delete dTime;for (var i = 10; i < s.length; i += 36){sLine = s.substr(i, 36);iType = parseInt(sLine.substr(0, 2), 10);for (var j = 0; j < sLogConst.length - 1; j += 2){


if (iType == sLogConst[j + 1]){sRes += "" + sLogConst[j];break;}}if (j >= sLogConst.length - 1)sRes += "Unknown log info (" + iType + ")\n";sRes += "" + sLine.substr(2, 4);sRes += "" + Hex2IP(sLine.substr(6, 8));sRes += "" + Hex2MAC(sLine.substr(14, 12))iTime = parseInt(sLine.substr(26, 10), 10);dTime = new Date(dTimeAdjust - 1000 * (iTimeAdjust - iTime));sRes += ""+ (dTime.getMonth()+1)+ "/" + dTime.getDate()+ "/" + dTime.getYear()+ " " + dTime.getHours()+ ":" + dTime.getMinutes()+ "";delete dTime;}sRes += ""document.write(sRes);}Main InfoAppend InfoOperator IPOperator MACTimeShowLog(sLog);Other – GetVer.cgiDescriptionGet <strong>Rovio</strong>’s base firmware version, <strong>Rovio</strong> also has a UI version and a NS2 version this function onlyget the base OS version.Grammar/GetVer.cgi[?JsVar=variable[&OnJs=function]]


Input ParameterNonePrivilegeNoneReturn ValueVersion – Date and Time of the firmware$Id (Subversion) – filename, version number, date, time and authorOther – SetFactoryDefault.cgiDescriptionChange all settings to factory-default.Grammar/SetFactoryDefault.cgiInput ParameterNonePrivilegeAdministratorReturn ValueNoneOther – Reboot.cgiDescriptionReboot <strong>Rovio</strong>.Grammar/Reboot.cgiInput ParameterNonePrivilegeAdministratorReturn ValueNoneOther – GetData.cgiDescriptionGet images/status with "multipart/x-mixed-replace" mime-type.


Grammar/GetData.cgi[?Status=]Input ParameterTrue / falsePrivilegeNoneReturn ValueGetData.cgi is designed for "server-push". "Server-push" means that user need not always detectcamera's state, and the camera server transfers the camera data on its own.GetData.cgi[?Status=false] returns:Content-Type: image/jpegContent-Type: image/jpeg...GetData.cgi?Status=true returns:Content-Type: image/jpegContent-Type: text/plain...ExampleOther – GetAudio.cgiDescriptionSend audio to server and playback at server sideGrammar/GetAudio.cgiInput ParameterNone


PrivilegeNoneRemarkThe data flow is from client to IPCam, which is different from GetData.cgi.The audio data must be send with HTTP POST method.Audio format: 16bit PCM, 8000HzOther – SetMediaFormat.cgiDescriptionSet the media formatGrammar/GetMediaFormat.cgi?[Audio=][&Video=][&RedirectUrl=sUrl]Input ParametersAudioName = 0 – 4sVideoName = 0 – 1PrivilegeAdministratorReturn ValueNoneOther – GetMediaFormat.cgiDescriptionGet the media formatGrammar/GetMediaFormat.cgiInput ParameterNonePrivilegeNoneRemarkAudio0 – AMR1 – PCM2 – IMAADPCM3 – ULAW4 – ALAWVideo1 – H2632 – MPEG4


Other – Upload.cgiDescriptionUpload new firmware imageGrammar/Upload.cgiInput ParameterPosted file [name = SourceFile]PrivilegeAdministratorRemarkOther – Cmd.cgiDescriptionUse this command to combine several commands to a single http request, that is, user can call two ormore commands through Cmd.cgi.Grammar/Cmd.cgi?Cmd=sCommandName1 [&ParamName1=sParamValue1][&ParamName2=sParamValue2][...] [Cmd=sCommandName2 [&ParamName1=sParamValue1][&ParamName2=sParamValue2][...]] [Cmd=sCommandName3...] [JsVar=variable[&OnJs=function]][&RedirectUrl=sUrl]InputList of commands that can be combined with Cmd.cgi:ChangeResolution.cgiChangeCompressRatio.cgiChangeFramerate.cgiGetMyself.cgiSetUser.cgiDelUser.cgiGetUser.cgiSetUserCheck.cgiSetTime.cgiGetTime.cgiSetIP.cgiGetIP.cgiSetWlan.cgiGetWlan.cgiSetHttp.cgiGetHttp.cgiSetName.cgiGetName.cgiGetLog.cgiGetVer.cgiReboot.cgiSome commands may use the same parameter's name, so the parameter's position should be incorrect order. If you place parameters of sCommandName1 after sCommandName2, the behaviors ofIP Camera is unexpected.If there are sub-commands that get information from <strong>Rovio</strong>, (such as GetUser.cgi,PPPoE.cgi?Action=GetInfo), "RedirectUrl" should not be specified, otherwise the browser will be


edirected to the address specified by "RedirectUrl", and certainly not what you want.PrivilegeNoneExample1. Add user abc(password 123), and delete user cba:/Cmd.cgi?Cmd=SetUser.cgi&User=abc&Pass=123&Cmd=DelUser.cgi&User=cba2. Get the settings of IP and WiFi:/Cmd.cgi?Cmd=GetIP.cgi&Cmd=GetWlan.cgifunction ShowResult(o){alert(s);}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!