Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
RS232 response garbled from RFX 9600
This thread has 9 replies. Displaying all posts.
Post 1 made on Friday December 11, 2020 at 12:17
canavan
Long Time Member
Joined:
Posts:
July 2004
20
I'm trying to read which audio channels are currently active on my processor, a TagMclaren AV23R DP with a TMA-1 interface. I can write commands and read a response correctly e.g. using my good old DEC VT420, both to and from the RFX9600 as well as to and from the TMA-1. However, if I send the command to the TMA-1 from the RFX9600, the response is just always the same binary mess instead of the expected 2 lines of text. If I send an incorrect command, or if I set any of the interface parameters (speed, bits, parity, ...) incorrectly, I get no response at all (as expected), so at least transmission does work. I'm using 9600bps 8N1 all around, and I've tried RS232 ports 2 and 3 on the RFX and both ports on the TMA-1.

I'm just using write() and receive() on CF.extender.serial[1].

Depending on the command I send, I always get the same number of bytes back that is approximately correct for the expected response. There's an obvious correlation between what the pronto receives and what the TMA-1 sends, e.g. /-/-/-/- in the output gets "translated" to "jzjzjzjz"

I'm using the same cable when testing with the VT420, so I'd assume that those are not the culprit.

Any Ideas what could be wrong in my setup?
Post 2 made on Friday December 11, 2020 at 13:49
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
What is configured in the TMA1 for stop bits and baud rate? Are you sure it is 1 and 9600?

[Link: manualslib.com]

Can you post an example of the script you are attempting to use here (a simple test harness, not your full config) for a double-check? I want to see the ordering of your calls. However, I must admit that the data you are seeing does not match values where bits would be shifted in the stream.


With regard to using send and receive on the RFX9600, you might want to be aware of this.

[Link: remotecentral.com]

serial.receive("abc",8,5000)

will cause the serial port to be flushed whereas

serial.receive("",8,5000)

will not flush the buffer.

serial.receive(null,8,5000)
if null is accepted as valid, will also not flush the buffer.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Friday December 11, 2020 at 19:22
canavan
Long Time Member
Joined:
Posts:
July 2004
20
The VT420 is configured as 9600 8N1, and it can send and receive with both the TMA-1 and the RFX9600, which makes the whole affair pretty weird.  I've tried 19200 for the TMA-1 and the RFX, and I get nothing if the bit rate is not the same on both sides, and (almost?) exactly the same responses when they are the same for both. Sending clearly seems to be working, I can turn on/off and control other devices that are connected to the TMA-1, the Status request should be correct as well, otherwise no response is sent.

Actually runnable test code that exhibits the problem for me:

var e = CF.extender[0];
var s = e.serial[1];

try {
s.bitrate = 9600;
s.databits = 8;
s.parity = 0;
s.stopbits = 1;
s.send("TMA AVP 1 STATUS\n");
var x = " "; var i = 0;
try {
do {
r = s.receive(null, 1, 100);
x += r; i+=1;
} while (r !="" && r!= null && i< 500);
} catch (e) {
System.print("READ ERROR: " + i + ":\n" + x);
}
System.print("READ : " + i + ":\n" + x);
} catch (e) {
System.print("ERROR: " + e);
}
OP | Post 4 made on Saturday December 12, 2020 at 14:33
canavan
Long Time Member
Joined:
Posts:
July 2004
20
I've tried 2 more things: A PC with an FTDI USB-RS232 dongle works flawlessly with the TMA-1,

On the oher hand, an Arduino with a pair of RS232-TTL converters and the [Link: arduino.cc] sketch shows similar binary nonsense as a reply to commands that the TMA-1 apparently receives correctly, but, while the length of the response is consistent, the exact data returned varies, unlike what the RFX9600 does. That sketch also reflects data 1:1 if I short pin 2 and 3 on the far end.
Post 5 made on Saturday December 12, 2020 at 16:07
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
It could be a voltage level issue as RS232 specification was originally 12V and the Philips RFX is only 5 V.

The fact that the Arduino is having issues as well points me in this direction.

You might try a voltage level shifter. (search amazon) between the 2 ports and use +12V as a reference. You could also try using a MAX232 (again search amazon) and use +12V as input to that board.

I found this. Maybe it will help?

[Link: forum.allaboutcircuits.com]

Last edited by Lyndel McGee on December 12, 2020 17:37.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 6 made on Saturday December 12, 2020 at 21:03
canavan
Long Time Member
Joined:
Posts:
July 2004
20
On December 12, 2020 at 16:07, Lyndel McGee said...
It could be a voltage level issue as RS232 specification was originally 12V and the Philips RFX is only 5 V.

The fact that the Arduino is having issues as well points me in this direction.

You might try a voltage level shifter. (search amazon) between the 2 ports and use +12V as a reference. You could also try using a MAX232 (again search amazon) and use +12V as input to that board.

I found this. Maybe it will help?

[Link: forum.allaboutcircuits.com]

Thanks.

It kind of sounds like a voltage issue, but the other way around, since the TMA-1 can understand the RFX all right, but the other direction fails, and I'm reasonably certain that the VT420 is using providing proper +-13V signals. Looks like I have to re-assemble that Windows XP PC to get my parallel port oscilloscope running again.

The arduino RS-232 interface boards I'm using are based on the MAX232, and they should also output +-12V (or so), and if I read the datasheet correctly, they should accept 5V inputs, so I'd assume that the TMA-1 outputs something even more wonky.
Post 7 made on Sunday December 13, 2020 at 14:49
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
You might try putting a 1K or 4.7K resistor between the TX PIN of the TMA-1 and the RX pin of the RFX9600. Not sure this will help but it could be worth a shot.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 8 made on Sunday December 13, 2020 at 17:02
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Try setting parity to a string value of 'none' vs integer 0 just to rule out any issues with firmware. The app version they mention occurs around the time of final transition into PEP2-based firmware (7.2.22).


From the dev guide.

Additional info
Since application version 7.2.18, the parity property can also be set using string literals: “none”,
“odd” and “even”, however when retrieving the property, integer values will still be returned.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 9 made on Thursday December 17, 2020 at 06:06
canavan
Long Time Member
Joined:
Posts:
July 2004
20
Turns out it's not really a problem with the voltages, those are surprisingly consistent among all the devices I've tested. The TMA-1 doesnt conform to the RS232 standard and is sending its data with 0.5 stop bit instead of 1 or 2 (or 1.5). I have posted the log data I used to determine that at [Link: forum.arduino.cc]
Post 10 made on Thursday December 17, 2020 at 14:06
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,992
Pronto cannot handle anything but 1 or 2 and same goes for the serial port NPM module for NodeJS on Raspberry Pi.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse