View Full Version : Some minor help with RS232 needed

April 19th, 2008, 06:07 PM
Hi Everyone,

I've recently upgraded from Girder 3.26b to version 4, and am loving it! I have successfully written a lua script to control the GrafikEye in my room, and am now trying to do the same for my Marantz SR8200 receiver.

Unfortunately, this particular reciever has a strange 232 protocol. It took me a while to get in G3, but it was (is) working with that version. In the end, I had to set the amp to 4800, 8, N, 1 and no handshaking. For commands to be executed, they had to be sandwiched inbetween RTS changes. For example, for power on, I sent:

RTS high
"POWER ON" (@1A1)
RTS low

This was pretty easy in G3 with the option to change handshaking right in the serial send command. In G4, how would I do this in the lua script (or with the serial send command)? That is, how should I fill in RTS HIGH and RTS LOW in the following script?

On = function (self)
self:SendCommand ("@1A1") -- on

I've already tried self.Serial:SetRTS (true) and self.Serial:SetRTS (false) and those don't seem to work.

Thanks for the awesome program and all your help!

Alan Bell
Toronto, Canada

Rob H
April 20th, 2008, 04:23 AM
I've just been reading over the old thread on this for Girder 3 from 6 years ago,
what a screwy protocol!

self.Serial:SetRTS(true) should be sufficient, perhaps you need a short delay in there? Better still would be to watch for the change to CTS in your ReceiveResponse method and only then would you send the command and lower RTS.

April 24th, 2008, 02:58 PM
Thanks for your advice. I actually got the self.Serial:SetRTS () command to work with some tweaking. Will post the lua script here when completed. Not going to bother with bidirectional communication as it works as is!