Run macro from HTTP with 1 click

If you have specific questions or problems with any of my Freeware applications, post them here.
Post Reply
homebro2000
Posts: 4
Joined: Mon Jan 08, 2024 4:31 pm

Run macro from HTTP with 1 click

Post by homebro2000 »

I have created few macros in coolterm. I want to execute them through HTTP.
I can manually go to http page and type command, but I want to make a command file or use apple script
and execute them. How would I go about to approach this?
homebro2000
Posts: 4
Joined: Mon Jan 08, 2024 4:31 pm

Re: Run macro from HTTP with 1 click

Post by homebro2000 »

ok, I figured it out. First of all I have to enable HTTP option in coolterm.
Then I can run below curl command in terminal and send code to my roland XS-1HD.

curl --data "POST /?method=post&WINID=0&DATA=XP1:0;&CMD=WriteLine" http://"IP Address":8080

Thanks anyways, Hope this helps other if they are using XS-1HD or Roland devices
User avatar
roger
Site Admin
Posts: 434
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Run macro from HTTP with 1 click

Post by roger »

Hi,

thanks for posting this. I'm glad you're getting the hang of the more advanced features of CoolTerm.

When you use WriteLine with an Enter key emulation of 0x02 (from your previous post), the 0x02 is sent AFTER XP1:0;
However, the XS-1HD Reference Manual (page 9) requires STX (0x02) BEFORE every command.

It is possible to encode characters in hexadecimal when using curl to post something to the CoolTerm web server. To send STX, you can use %02 in your DATA string. So, you can rewrite your command like this:

Code: Select all

% curl --data "POST /?method=post&WINID=0&DATA=%02XP1:0;&CMD=Write" http://"IP Address":8080
This uses the "write" remote command and makes sure the 0x02 is sent BEFORE the XP1:0; command. I don't have any Roland hardware to test this with, but I would expect this to work better.

Cheers,

Roger
Post Reply