Home/Support/Support Forum/SCI Callback from Script - Internal Server Error
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

SCI Callback from Script - Internal Server Error

0 votes
Hi - I'm sending an SCI request via a Perl Script to a pc gateway to set an xbee pin. It works perfectly but I get an "500 Internal Server Error" returned. Web host says it's nothing on their end.- it must be script. I've tried ruby and python too and I get the same result. Works but error returned. Anyone know what I need to do in the script to handle this? The script is being called from html file. ty

use LWP::UserAgent;
$user_agent = LWP::UserAgent->new;

# Sets The Request up for Basic Authentication.
# Replace YourUsername and YourPassword with your username and password respectively.
'Device Cloud WS',

# XML Data to be sent in the Request Body.
$request = '<!--
See http://www.digi.com/wiki/developer/index.php/Rci for
an example of a python implementation on a NDS device to
handle this SCI request
<sci_request version="1.0">
<device id="00000000-00000000-00000000-00000000"/>
<rci_request version="1.1">
<do_command target="xig">
<at hw_address="00:00:00:00:00:00:00:00!" command="D0" value="4" apply="true" />

# Performs a post to Device Cloud and captures response.
$response= $user_agent->post("http://login.etherios.com/ws/sci",
'Content-Type' => 'text/xml',
'Content' => $request);

# Prints the Response Content.
print $response->decoded_content;

# If Device Cloud determines that the request wasn't successfully processed, die with the error message.
die $response->status_line;
asked Mar 11, 2014 in Digi Remote Manager by prichardson New to the Community (3 points)
edited Mar 10, 2014 by prichardson

Please log in or register to answer this question.

1 Answer

0 votes
Hi Prichardson,

You have mentioned that it works perfectly, it means the value of parameter D0 getting changed to 4?
answered Jun 12, 2014 by 16ksa23 Veteran of the Digi Community (426 points)