Page 1 of 1
Housebot Server locks up at 100% CPU when sending serial cmd
Posted: Sat Sep 25, 2004 1:37 pm
by dlmorgan999
I have Housebot working great with IR. Now I'm trying to use the generic serial plugins to get a basic serial device working. I have configured a few commands and linked them to buttons on a theme. Everything works but I have found that I can only send *one* command.
Right after the command has been sent the CPU usage goes to 100% with HouseBotServer consuming 95%+. If I close HouseBot the user interface goes away but the process is still running and I have to end task with process manager before I can start HouseBot again. I don't know if this is a bug or a configuration issue. I tried to set up some tracing to troubleshoot but I couldn't get it to work right. Any suggestions?
Posted: Sat Sep 25, 2004 1:50 pm
by ScottBot
Can you give me some specifics on the config so I can try and reproduce it here? Like:
- Do you have multiple commands associated with the Property value or just one?
- Can you tell if the first command gets sent before going to 100%? If you enable tracing for the Generic Serial Hardware Interface, it might show this better. You can enable tracing by clicking on "Hardware Module Type" property label when viewing the Hardware Interface. Check the Enabled checkbox in the diagnostic tracing group.
- Are they hex or ascii commands?
- Are you using any substitution characters in the command string? If so, what?
Posted: Sat Sep 25, 2004 2:11 pm
by dlmorgan999
Hi Scott,
I'll do my best to answer all of your questions. The device I am controlling is a Xantech ZPR68-10 audio/video matrix switcher. I have large number of commands I ultimately want to send but right now I only have two defined until I get everything working. The two commands are volume (which I set up to use * and %1%) and source component. At first I thought the problem might be with my setup of the wildcard so I tried the source select and the problem still occurred.
The source command string is "!01I8+" (all commands are plain ASCII text and the quotes are not part of the command). This command is called Z1 Source 8. In the device I have a property called "Source Component" which I added using "Configure Generic Serial Port Devices". Then on the device I went to the Commands tab for the "Source Component" property and associated the Radio value with the "Z1 Source 8" command.
The command *is* being sent before the CPU goes to 100% - it appears that the 100% CPU happens about one second later.
The debug revealed something that might be interesting. The last three lines are of the log are:
- Received character [] - Int [13]
- Successful Transmission of Command associated with Property and Value [ZPR68.Source Component.Radio]
- Sending Subscription Notification for list [Generic Serial Data Received]
Let me know if you need anything else from me. Thanks for the help!
-- Dave
Posted: Sat Sep 25, 2004 3:51 pm
by ScottBot
Dave,
Thanks for the info. It sounds like a fairly simply setup.
Can you issue the same command from HyperTerminal (com app included with windows)? Can you issue two commands with it?
Also, doublecheck to make sure the baud, parity, flow control (the ZPR68-10 uses no handshaking) is setup right. Since it is acting up on the initial transmission, it makes me suspicious of the connection parameters.
There were some low-level error messages that were being suppressed in the released version of the plugin. Please try the attached plugin and see if it generates any error messages. Just unzip the attached DLL and copy it into your \HouseBot\Plugins\Interfaces directory over the old one (you may want to backup the old one first).
Posted: Sat Sep 25, 2004 5:27 pm
by dlmorgan999
Hi Scott,
I actually used Hyperterminal first to test my connectivity before I started setting up the device in HouseBot. I just checked again and I can send as many commands as I like. I double-checked the comm setup and it is correct (9600, N-8-1, no handshaking). I replaced the DLL you provided but I didn't get any additional messages. Hmmmm.... Should I perhaps try deleting and recreating the device?
-- Dave
Posted: Sat Sep 25, 2004 5:39 pm
by dlmorgan999
Hi Scott,
I figured out the problem although I'm not sure who's "fault" it is. The ZPR68 was connected to COM3 which is the first port of a 4-port Equinox serial board that I have installed. I moved the ZPR68 to COM1 (using the native port on the PC) and it works just as expected. Are you aware of any possible issues either with using something higher than COM2 and/or using another serial card? As I mentioned I was able to access this just fine using Hyperterminal.
-- Dave
Posted: Sat Sep 25, 2004 8:40 pm
by ScottBot
Glad that you found the problem. I'm not aware of an issue with the upper com ports. I've got a quad port serial card that works with another plugin that uses the same serial code.
However, there's certainly a problem there somewhere. Regardless of the configuration, it shouldn’t send the CPU to 100%.
Posted: Sat Sep 25, 2004 9:25 pm
by dlmorgan999
I'm going to rebuild the server before too long and I'll see if the problem continues. I think I may need more than two serial ports in the end so if the problem continues after the rebuild (and probably on a different device) I'll make another posting.
-- Dave
Posted: Sat Sep 25, 2004 10:27 pm
by ScottBot
Sounds good. I may have discovered something by that time.