Script icon Script — Multi-language ARC Script: build, run and debug Blockly, JavaScript, EZ-Script or Python with Intellisense, run/save/load and Roboscratch support Try it →
Russia
Asked — Edited

Hello,

I try to link to ARC from my TCP/IP client via Windows socket. Can anybody explain the protocol of communication at the server side? I can successfully connect from both my program and Telnet PuTTY, but calling EZ-Script functions encounters troubles. Using PuTTY, I could generate speech from string with Say( text to speech ), but Print( txt ) outputs nothing. Bare TCP/IP produces no reaction at all. I can send strings and the main question is how to mark their end. I can use null-terminated strings. Does anybody know how the receiving server is implemented?


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#9  

Another option to using the Telnet/TCP interface is to use the HTTP Server (custom) object. If you run the server, you can send script commands using HTTP Get in the following format:


get https://hostIP:port/script.cmd?code=script command

for example, I have a script manager with various commands to control my Foscam camera. I can execute the scripts using a controlcommand()


https://192.168.0.203:81/script.cmd?code=ControlCommand("FoscamScripts",ScriptStart,"CamRight";)

The web server responds OK

(note: this is not documented, so could potentially change with ARC updates. I discovered it by capturing packets when using the HTTP Server (custom) web page and watching what happened when I hit the buttons)

Alan