BrettB0727 Posted February 11, 2011 Posted February 11, 2011 I am trying to do this soap commands, and it definitely looks like they are supported pre2.0, but are they supported in 2.0 and later? I am SSHing into my controller via Terminal on my Mac. I am trying to start with the following command:<c4soap name="GetVersionInfo" async="False" />But it gives me the following response:-sh: Syntax error: newline unexpectedAnybody know what I am doing wrong?Thanks for the help,Brett
RyanE Posted February 11, 2011 Posted February 11, 2011 What port are you connecting to?Regular telnet / ssh into the box on the normal telnet or SSH port will give you a shell, not the C4Soap interface.You need to connect to port 5020 or port 5021 (SSL).RyanE
BrettB0727 Posted February 11, 2011 Author Posted February 11, 2011 What port are you connecting to?Regular telnet / ssh into the box on the normal telnet or SSH port will give you a shell, not the C4Soap interface.You need to connect to port 5020 or port 5021 (SSL).RyanEGo it, so do I connect using:telnet root@CONTROLLERIPADDRESS:5020 ?
RyanE Posted February 11, 2011 Posted February 11, 2011 As this is not documented by Control4, you're somewhat on your own.Give you a hint, though. It's just a socket connection, not a telnet connection... i.e. there's no username, and you probably can't communicate with it via telnet, since it requires null characters (0x00 or \0) to terminate the C4Soap messages.RyanE
BrettB0727 Posted February 12, 2011 Author Posted February 12, 2011 As this is not documented by Control4, you're somewhat on your own.Give you a hint, though. It's just a socket connection, not a telnet connection... i.e. there's no username, and you probably can't communicate with it via telnet, since it requires null characters (0x00 or \0) to terminate the C4Soap messages.RyanEThanks for this hints Ryan!For anyone who is following along I wrote the following script and just executed it via terminal:#!/usr/bin/php -q<?php$fp = fsockopen("192.168.29.10", 5020, $errno, $errstr, 30);if (!$fp) { echo "$errstr ($errno)<br />\n";} else { $out = "<c4soap name=\"GetVersionInfo\" async=\"False\" />\0"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp);}?>It yielded the following:<c4soap name="GetVersionInfo" seq="" result="1"><versions><version name="Director" version="2.0.5.99233" buildtype="" builddate="Nov 24 2010" buildtime="14:35:12"/><version name="MediaManager" version="2.0.5.99233" buildtype="" builddate="Nov 24 2010" buildtime="13:36:35"/></versions></c4soap>
RyanE Posted February 12, 2011 Posted February 12, 2011 FYI, bbcode doesn't work inside the <code> section. Your code would make a bit more sense if you removed the italics codes, and just put in an actual local network address, like 192.168.29.10...Oops! I just told everyone my controller's IP address!RyanE
BrettB0727 Posted February 12, 2011 Author Posted February 12, 2011 FYI, bbcode doesn't work inside the <code> section. Your code would make a bit more sense if you removed the italics codes, and just put in an actual local network address, like 192.168.29.10...Oops! I just told everyone my controller's IP address!RyanEHaha you are just full of good advice!Now my "code" is complete with Ryan's local IP address
RyanE Posted February 12, 2011 Posted February 12, 2011 Indeed.<c4soap name="GetVersionInfo" seq="" result="1"><versions><version name="Director" version="2.1.0.104929" buildtype="" builddate="Jan 18 2011" buildtime="07:43:08"/><version name="MediaManager" version="2.1.0.104929" buildtype="" builddate="Jan 18 2011" buildtime="06:10:22"/></versions>
ILoveC4 Posted February 12, 2011 Posted February 12, 2011 2.1.0.104929Nice. Is it nearly ready for release? I wish I would have wrote down the version I saw at CES...it would be interesting to see its progress.Edit: damn Swype...LOL
thecodeman Posted February 12, 2011 Posted February 12, 2011 2.1.0.104929Nice. Is out nearly ready for release? I wish ki would have write down the version I saw at CES...it would be inbreeding to see its progress.Inbreeding aside, no.
xc420 Posted February 12, 2011 Posted February 12, 2011 As this is not documented by Control4, you're somewhat on your own.Give you a hint, though. It's just a socket connection, not a telnet connection... i.e. there's no username, and you probably can't communicate with it via telnet, since it requires null characters (0x00 or \0) to terminate the C4Soap messages.RyanEI've sent c4soap commands via telnet. Use [ctrl-space] to add a null byte at the end before hitting [enter] but It won't work in Windows. I guess it doesn't work in 2.0+telnet 192.168.1.100 5020
RyanE Posted February 12, 2011 Posted February 12, 2011 Should work the same to port 5020.I don't know how specifically to send a null byte (it may differ depending on terminal program), but there's no difference between that and the PHP code posted, which I just used on 2.1 to show my version.No, it's not close to release. I'm in internal beta, one of the first, which unfortunately, doesn't give much indication when final release will actually be.Sorry.RyanE
Recommended Posts
Archived
This topic is now archived and is closed to further replies.