![]() |
|
Serial Ucm - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Products (https://www.comfortforums.com/forum-3.html) +--- Forum: UCMs (https://www.comfortforums.com/forum-146.html) +--- Thread: Serial Ucm (/thread-1399.html) |
- John W - 03-16-2009 excuse me for butting in, it appears something is taking your ascii input string and converting it to hex. The values you see are the hex values of each of the characters. e.g. #31# is hex value of the character \'1\'. Sounds like you have a coding error ![]() - dcrera - 03-16-2009 Hi Yes, that\'s exactly what it is. I sent serial from other devices before and because it worked I did not care what the string looked like. In this case I am pulling my hair. If I know what Comfort is expecting, I can work backwards to decode. Thanks - John W - 03-16-2009 can you post the code thats sending this string ? What language are you programming in, and how do you know the string looks like this ? e.g. how are you displaying it - debug window, echoing to command line, using a listbox in a dialog, or what ? I would expect Comfort to receive the text string \"LI1234\" (but without the quotes). So as a hex byte array it should look like 4c4931323334 If you were to test using a terminal emulator rather than the Comfort panel you should receive and so display \"LI1234\". What I haven\'t checked is whether what your sending is infact a valid command string ![]() - dcrera - 03-16-2009 Hi, can you post the code thats sending this string ? No, I am using a function that sends serial command from C4 What language are you programming in, and how do you know the string looks like his ? Lua, The string is displayed in the log file. What I haven\'t checked is whether what your sending is infact a valid command string LI1234 is the signon and is validThanks - John W - 03-16-2009 Yes of course the code is, doh ! I wouldn\'t trust the log window as that could be doing something daft (could be using the wrong formatting parameters to display the string). Without seeing the code I can\'t say whether it matches what actually goes out on the 232 port either. try using a loopback to an rs232 on a computer rather than the comfort panel and use a terminal emulator window (need to configure the port settings to the correct baud etc). Then see what you get. At least your testing what actually goes across the lines this way. It may be something simple like you have the wrong baud rate, or it may be your code is mangling the string before it sends it down the 232 lines. Thats what I did anyway when I was messing about. In my case the code was sending 16bit wide chars that the debug window didn\'t show as being a problem. - dcrera - 03-16-2009 Hi John, Let me try sending to the serial port on my PC, that might show what\'s coming thru Thanks - dcrera - 03-16-2009 Hi I am talking serial ![]() Syntax is : SendToSerial(1, tohex(\"03H\") .. \"LI1234\" .. tohex(\"0DH\")) Thanks ![]() ![]() - John W - 03-16-2009 I see you posted your question on the following forum http://www.c4forums.com/viewtopic.php?pid=20596 So does that mean it is now working ? I hope so, as I know very little about Lua, as I don\'t program in it ![]() if its coming out okay in a terminal emulator i can\'t help any further, sorry. - dcrera - 03-17-2009 Hi John, Yes, it is working. Thanks for the assistance Cheers - dcrera - 04-17-2009 Hi Admin Please review the schematic for the serial port posted Thursday Mar 12th, 2009 11:44 am I had someone make one for me and it does not seem to work Thanks |