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 comm with rfx9600, strange error, some help please
This thread has 11 replies. Displaying all posts.
Post 1 made on Tuesday April 14, 2009 at 09:55
TrustNo1
Long Time Member
Joined:
Posts:
February 2009
19
Hi everybody,

I am currently trying to get some rs232 communication working using a TSU9600 and a RFX9600. Normally communication using defined equipment works fine. However when I try using Javascript I get a strange error.
I have reduced all to just a empty page with one button. The javascript for the button was copied and paste from the developers guide. An extender (rfx9600) was edit to the project.
Source code for the button:
var e = CF.extender[0];
if( e == null )
{
Diagnostics.log("Extender 0 is not defined");
}
else
{
var s = e.serial[0];
if( s == null )
{
Diagnostics.log("Extender 0 is not a serial extender");
}
else
{
s.bitrate = 9600;
s.databits = 8;
s.parity = 0; // None
s.stopbits = 1;
label = s.match("MV?\r","\r",250);
}
}

When I start the simulator I get the following error when button pushed (script activated):

ProntoScript error: Failed
Offending button script: (untagged)
Offending line #18: " label = s.match("MV?\r","\r",250); "



I always get this message, even if i wanna use the relays or just send something to the extender.
I have tried everything I could think of but without results. I read many of you have no issues.... so I wonder what i did wrong or missed?
Could anyone please help me forward as this already blocking me from any progress for several (long) days ....:(

Any reply is very much appreciated.

Eagerly awaiting your help.


PS I use the latest version of Pronto Professional 2
Rgds,

JT
Post 2 made on Tuesday April 14, 2009 at 11:29
pthornhill
Long Time Member
Joined:
Posts:
June 2008
53
code looks good to me.

have you tried changing the "label = ..." line to a simple 232 send command to check that works? ie. s.send([232cmd]). Start simple and build up always works for me!!

at least that way you can narrow it down to the 2-way capturing 232 response that's causing you a problem.

try that and post what happens
OP | Post 3 made on Tuesday April 14, 2009 at 11:58
TrustNo1
Long Time Member
Joined:
Posts:
February 2009
19
Hi Pthornhill,

Tried that, same error. Also when I use a string variable like
var serial_command="POW/r". Also when I try to set or get a relay status. Also when I use
var label=s.match.....
Also same error when I use different names for the variables.... all remain in the same error.......
I always get the same error.... :(

I haven't tried it on an actual TSU9600 as I haven't got an adapted base unit so I have no view on the System.print() output. The TSU is located at a friend of mine and I develop the software and debug using the simulator and the console...

Thanks already for your reply and hopefully someone has had the same problem and knows a solution..
Rgds,

JT
Post 4 made on Tuesday April 14, 2009 at 15:26
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
Extenders are not supported in the simulator. You must download and test using real equipment.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 5 made on Monday April 20, 2009 at 10:19
TrustNo1
Long Time Member
Joined:
Posts:
February 2009
19
Hi Lyndell,

I understand the extenders are not simulated. However I expected that it would crash in the simulator. The error in the simulator means all remaining code in the script is ignored.... makes it a little hard to test....

So there is no possibility to check code which will be working with extenders in the simulator even if i do not need the actual behavior of the extender.. just a check if the code is correct ... ??
Rgds,

JT
Post 6 made on Monday April 20, 2009 at 11:45
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
Jeez,

What more can I say about extenders are not supported in the simulator?

Let me try and rephrase that which I've already said in such a way that it makes you feel a little better.

That is... "NO part of the extender is or can be "simulated" at this time in the PEPV2 simulator. This includes any testing of ProntoScript code that utilizes an extender. If you need to test this code, you MUST debug said code directly on the remote."

And, you will NEVER get this software on a Mac. All requests for this feature are a waste of time.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 7 made on Monday April 20, 2009 at 12:36
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Make the base station mod, attach the cable to your PC and debug the Prontoscript code using a PC
Post 8 made on Monday April 20, 2009 at 13:25
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
For mod info. See http://www.the-gordons.net.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 9 made on Wednesday April 22, 2009 at 03:19
TrustNo1
Long Time Member
Joined:
Posts:
February 2009
19
Hi Barry and Lyndel,

Thanks for your reply. I will make the modification on the base.. but it keeps me from testing apps for my friends in my own house... my friends have a different configuration regarding equipment and pronto's. But your mod will at least help me when I locally test, and I will reread my code to prevent any small typing errors..;-)
Rgds,

JT
Post 10 made on Wednesday April 22, 2009 at 14:17
Jon Welfringer
Long Time Member
Joined:
Posts:
December 2002
175
Technically, you could (remotely) test against your friends extender. He just needs to do some port forwarding on his router to the extender and you need to use his public IP address.
Post 11 made on Wednesday April 22, 2009 at 17:17
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
On April 22, 2009 at 03:19, TrustNo1 said...
Hi Barry and Lyndel,

Thanks for your reply. I will make the modification on the base.. but it keeps me from testing apps for my friends in my own house... my friends have a different configuration regarding equipment and pronto's. But your mod will at least help me when I locally test, and I will reread my code to prevent any small typing errors..;-)

Why re-read? Why not use an editor that checks syntax or a tool such as JSLint?
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 12 made on Thursday April 23, 2009 at 04:00
TrustNo1
Long Time Member
Joined:
Posts:
February 2009
19
Hi Jon and Lyndel,

Never a day to old to learn something new.. ;-)
I am going to test the forwarding option you gave Jon, thanks!
Lyndel thanks for your advice on testing the code... I haven't done any programming since a couple of years.. used to develop realtime systems and develop software on VMS systems... and they all have very well developed debuggers... so I have to adapt a little to tools on PC's (not my favorite as a addicted Apple user never likes to switch to PC ;-).

Again many thanks.
Rgds,

JT


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