Jump to content
C4 Forums | Control4

Making RS232 Driver


VegardK

Recommended Posts

I am trying to make 2 new drivers for 2 new products both with RS232.

Electrocompaniet ECD2

Parrasound Halo JC2

On both i have manage to get the .PDF containing the ACII codes attached in this post, and I have tried converting them to decimal and use them in the driver. But I am unable to get it to work. So I need some serious help regarding the conversion to be sure it is right. When trying to see how other drivers work they have a $ before the 2 decimal numbers so I am not sure what the proper conversion is. Maybe its not decimal but something else? Its not HEX as I get error when trying to use this.

Also what is best practice to chose when making a DAC driver? and a Pre-Amp driver? Just use a Receiver as base and remove some features?

If someone could convert say the "off" command and tell me how I would be very happy. And i will make the rest and share them here with you all.

 

Thank you all!

Electrocompaniet_ECD2 RS232 Command Reference V1.pdf

Parasound_JC2RS232.pdf

Link to comment
Share on other sites


C4 handles ASCII, HEX or Binary codes or even mix and match in a single line - don't bother converting

For ASCII you just need to set the ASCII code in quotation marks

Power On for the Electrocompaniet:

 

"#PON<CR>"

 

 

 

 

Link to comment
Share on other sites

19 hours ago, Cyknight said:

C4 handles ASCII, HEX or Binary codes or even mix and match in a single line - don't bother converting

For ASCII you just need to set the ASCII code in quotation marks

Power On for the Electrocompaniet:

 

"#PON<CR>"

 

 

 

This does not seem to work. i did with the " marks in front and back of this, but it does not work. It is connected to the RS232 output 2 of the HC800, and I have in connection made this connection. But is there something else I am missing? I have also set the baudrate to 9600, thats what the manual says at least.

RS232-3.png

Link to comment
Share on other sites

That should be correct as far as the code goes - indeed if the syntax was incorrect it would throw up an error.

You could try: "#PON/r" or "#PON"/r (forgot which is correct - but the wizard will let you know).

 

In addition do check the other settings (bitstop, parity etc) as well.

 

Last but not least, looking at the documentation, it's a bit confusing I think. It states to use a straight-through cable with a PC, but also states that its an RS232C port - THAT means a cross-over (or nullmodem) connection - I'd try both types if I were you.

Link to comment
Share on other sites

Tried that too "#PON/r" no error but not working. Checked the aditional bitstop, party etc. All ok.

I am using this cable, dont see any other solution on the cables from this.

http://www.clasohlson.com/no/Skjøteledning/Pr325853000

When making the driver I am using the Receiver as a ground of base, maybe this is wrong? Or should this not matter?

Link to comment
Share on other sites

My Norwegian isn't what it used to be but as far as I can tell that's a straight-through cable - I'd dig for a null-modem/crossover variant to test as well.
 

Quote


I am using the Receiver as a ground of base

 

Sorry - not sure what that's supposed to mean?

Link to comment
Share on other sites

just that when making a driver it ask for what device it is, and i chose the receiver as base.

I think i will try find a different cable see if that helps. But I will also see if i can use a laptop to send a command directly to the unit. Just not sure what software to use...

Link to comment
Share on other sites

15 minutes ago, Cyknight said:

Oh understood - no that wouldn't matter at all.

As for a program - putty.

 

I'm used with putty on linux but not for sending RS232 commands. Any page recommended for what to write for it to work?

Link to comment
Share on other sites

I have manage to get the #PON/r to work for the EC product from the computer, but not from Composer. 

Also the Parasound I am not able to get sending a command from the PC. it says the string should be W 1 1 1<CR> sending this command does nothing. Any suggestion to this?

Link to comment
Share on other sites

Yeah i tried with both a straight trough and a nullmodem cable. the latter i needed a gender changer since the nullmodem i F in both ends. But I need F on the C4 side and M on the product side. I was also thinking of the handshake, but when cutting the cable there is all wires in there so that should not be any problem either.

Can't find any other cables that could work....

I tried with W111/r also from the PC but doesn't seem to work. I just don't get this. Why should this be so hard... 

Link to comment
Share on other sites

HC800. The PC i use the USB to DB9 converter, that works fine on the EC product but not the Parasound. from the HC800 I have tried both serial port 1 and 2, then into the product. Making a driver with the proper baudrate etc, and then just putting in the on/off commands and connect it to the assigned serial on the HC800

Link to comment
Share on other sites

For the other unit, try using <SP> instead of 'actual' spaces.

 

As for not working on a controller - I'd test using a different controller to eliminate issues there - and make sure that all the Macros you need are filled in - not just the 'codes'

Link to comment
Share on other sites

Well there we might have a problem I have just typed in the codes. Then jumped to the finish and tried turning the device on/off.. Not done anything with the Macros... I will check the macros. But they should only just send that code nothing more, is there something special I need to do in the macros that I might miss out?

Link to comment
Share on other sites

Yeah I'm really sure there is something sketchy about those cables i got. And like you say there might be some converter in those gender changers as well, but there is no documentation on this. Now i tried with a nullmodem cable with a gender changer M to M.

I have just placed orders from one of our supplier for some other nullmodem cables F/F and with an adapter F/M, another extension cable that is F/F and F/M. So I will have some more to test in a few days. Hopefully it has to do with those.

Link to comment
Share on other sites

On 7/18/2016 at 7:33 PM, Cyknight said:

For the other unit, try using <SP> instead of 'actual' spaces.

 

As for not working on a controller - I'd test using a different controller to eliminate issues there - and make sure that all the Macros you need are filled in - not just the 'codes'

Ok so I'm back on trying now. But this does not work. I have been using Termite on the PC to send commands with a USB-RS232 adapter. This works on the EC product as said earlier, but the Parasound is no luck sending anything. So i feel I'm dead in the water on this product. I think I will have to send a mail to Parasound asking if this manual is complete or something missing.

Parasound_JC2RS232.pdf

Link to comment
Share on other sites

  • 3 weeks later...

Update:

I got hold of a Global Cache IP2SL. Tested it on my own system towards a Marantz receiver and it worked beautiful.

Went down to the client and started testing, nothing. Ok so then I started backtracking and testing more.

At hand I have:
- Straight Trough RS232 cable
- Nullmodem RS232 cable
- Gender changer adapter
- Nullmodem adapter
- USB to RS232
- Termite 3.2 Software

From the PC with the USB to RS232 I am able to send On/Off commands with various combinations of adapters and cables. When plugging the USB to RS232 from the PC onto the GC product and then send a On/Off command from C4 I am able to sniff the commands, so the commands comming from the C4/GC is correct.

But when I try different combinations of cables/adapters from GC to the EC DAC I am not able to turn the device On/Off.

This just doesn't make any sense, as the same commands works from the PC and the same commands are being sent from the GC. What is going on here???


I did some more testing from the PC and in Termite I can change a little on how the command/text is sent from the PC to the device. I can transmit text as:

1. Append nothing (transmitt text as is)
2. Append CR (Transmit the text and append a carriage return (ASCII 13))
3. Append LF (Transmit the text and append a new-line character (ASCII 10))
4. Append CR-LF (Transmit the text and append a carriage return and a new-line character (ASCII 10 +13))

Trying to send the command with 1 selected nothing happens. sending as 2, 3 or 4 and the device goes On/Off. 

 

So can it be that C4 sends the command as plain text not as ASCII? Is there a way for me to change this? How can I send the command #PON<CR> as ASCII 10 or 13?

Update2:

I have also used the iTest provided from GC to send commands directly from GC to the unit and that does work as well so there should not be any cable problems here. The problem seems to be how C4 is handling this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.