Home/Support/Support Forum/Problem with RCI over HTTP in a C++ program.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Problem with RCI over HTTP in a C++ program.

0 votes
Hello everybody,

I try to send parameters to a DIGI Connect ME -C with the RCI protocol over HTTP with a C++ program. So I have made a function which uses Post method to send the datas, but the device does not accept these. My C++ compiler uses HTTP 1.0 version, is it compatible ?

Thanks for your support,

Thomas
asked Jun 7, 2007 in NET+OS by Thomas_Bernard New to the Community (9 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

9 Answers

0 votes
Are your POST requests correctly formatted? What are the responses the Connect ME is returning? Have you made sure to include authorization?
answered Jun 7, 2007 by charliek Veteran of the Digi Community (408 points)
0 votes
Thanks for your answer, my problem was on my HTTP C++ component. I can now reboot my device, but when I try to change others parameter, this does not work.
in example I send this to change the serial port :

<rci_request version="1.1">
<set_setting>
<udp_serial>
<dest index="01">
<address>192.168.0.255</address>
</dest index>
</udp_serial>
</set_setting>
</rci_request>

The device answer me :
<rci_reply version="1.1"><error id="1"><desc>Request not valid XML</desc></error></rci_reply>

Can you help me to see where the problem is ?

Thanks a lot.

Thomas
answered Jun 11, 2007 by Thomas_Bernard New to the Community (9 points)
0 votes
I add that I already have one UDP serial port configured as :

Description Send To UDP Port
udp1 192.168.1.255 12000
answered Jun 11, 2007 by Thomas_Bernard New to the Community (9 points)
0 votes
okay I have resolve this problem ...

<rci_request version="1.1">
<set_setting>
<udp_serial index="01">
<address>192.168.0.255</address>
</udp_serial>
</set_setting>
</rci_request>

I have moreover an other problem : I want to create new user account by RCI protocol. Which RCI message must I send ?
answered Jun 11, 2007 by Thomas_Bernard New to the Community (9 points)
0 votes
Check out the RCI spec for <user>. Keep in mind the Connect ME can only handle two users. Also, if you want to set a password you have to use the <cleartextpassword> field (not listed in the RCI spec) under user.
answered Jun 11, 2007 by charliek Veteran of the Digi Community (408 points)
0 votes
Ok thanks, I have wrote this code :
<rci_request version="1.1">
<set_setting>
<user index="2">
<defined>off</defined>
<defined>on</defined>
<name>thomas</name>
<cleartextpassword>9876</cleartextpassword>
<commandline_access>on</commandline_access>
<default_access>commandline</default_access>
</user>
</set_setting>
</rci_request>

but the device answer me :
<rci_reply version="1.1"><set_setting><user><error id="4"><desc>Field specified does not exist</desc><hint>cleartextpassword</hint></error></user></set_setting></rci_reply>

I think <cleartextpassword> replace <password> but without encryption, but maybe I'm wrong. The <cleartextpassword> field is accessible with all version on device and all firmwares ? I have just 2 users (Root + thomas), and my firmware version of the device is :
Firmware: 1.9.0.6 (Version 82000856_F6 07/21/2006)
POST: 1.1.3 (release_82000867_G). If I don't specify the password in the RCI command, this command is accepted by the device and the name is changed in the users management tab, but the password is not kept.

Thomas
answered Jun 11, 2007 by Thomas_Bernard New to the Community (9 points)
0 votes
You are correct about the password field. I forgot to mention that you have to be running the most current version of firmware for the <cleartextpassword> field to work: http://www.digi.com/support/productdetl.jsp?pid=2466&osvid=0&s=53&tp=2 (82001116_h.bin).
answered Jun 11, 2007 by charliek Veteran of the Digi Community (408 points)
0 votes
Thanks a lot for your help. That works perfectly now.

Have a nice day !

Thomas
answered Jun 11, 2007 by Thomas_Bernard New to the Community (9 points)
0 votes
How do you get RCI to work with a -C module? I thought that was only for -S modules and the integration kit?
answered Dec 4, 2007 by jwormsley Community Contributor (78 points)
...