04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

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

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

Section 8. Operation<br />

8.6.3.2 Command Syntax<br />

Four levels of access are available through Basic Access Authentication:<br />

• all access denied (Level 0)<br />

• all access allowed (Level 1)<br />

• set variables allowed (Level 2)<br />

• read-only access (Level 3)<br />

Multiple user accounts and security levels can be defined. .csipasswd is created<br />

and edited in the Device Configuration Utility (DevConfig) (p. 92) software Net<br />

Services tab, Edit .csipasswd File button. When in Datalogger .csipasswd File<br />

Editor dialog box, pressing Apply after entering user names and passwords<br />

encrypts .csipasswd and saves it to the <strong>CR1000</strong> CPU: drive. A check box is<br />

available to set the file as hidden. If hidden when saved, the file cannot be<br />

accessed for editing.<br />

If access to the <strong>CR1000</strong> web server is attempted without correct security<br />

credentials, the <strong>CR1000</strong> returns the error 401 Authorization Required. This<br />

error prompts the web browser or client to display a user name and password<br />

request dialog box. If .csipasswd is blank or does not exist, the user name<br />

defaults to anonymous with no password, and the security level defaults to readonly<br />

(default security level can be changed in DevConfig). If an invalid user<br />

name or password is entered in .csipasswd, the <strong>CR1000</strong> web server will default to<br />

the level of access assigned to anonymous.<br />

The security level associated with the user name anonymous, affects only API<br />

commands. For example, the API command SetValueEx will not function when<br />

the API security level is set to read-only, but the CRBasic parameter SetValue in<br />

the WebPageBegin() instruction will function. However, if .csipasswd sets a<br />

user name other than anonymous and sets a password, security will be active on<br />

API and CRBasic commands. For example, if a numeric security pass code is set<br />

in the <strong>CR1000</strong> Status table (see Security (p. 70) section), and .csipasswd does not<br />

exist, then the security code must be entered to use the CRBasic parameter<br />

SetValue. If .csipasswd does exist, a correct user name and password will<br />

override the security code.<br />

API commands follow the syntax,<br />

where,<br />

ip_adrcommand=CommandName&parameters/arguments<br />

ip_adr = the IP address of the <strong>CR1000</strong>.<br />

CommandName = the the API command.<br />

parameters / arguments = the API command parameters and associated<br />

arguments.<br />

& is used when appending parameters and arguments to the command<br />

string.<br />

Some commands have optional parameters wherein omitting a parameter results<br />

in the use of a default argument. Some commands return a response code<br />

indicating the result of the command. The following table lists API parameters<br />

373

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

Saved successfully!

Ooh no, something went wrong!