From: Neil C. <nc...@li...> - 2008-02-16 04:23:29
|
Troy Carpenter wrote: > On Friday 15 February 2008 04:05:47 pm Pete Flaherty wrote: >> Just a quick thought. I had simailar issuse a while back, and I traced it >> to flakey timing on th e built in RS232 port ... added a usb serial dongle >> and all got much better ... > > Thanks Pete for pulling me out of my dispair because in retesting your > suggestion, I had a thought of a troubleshooting method (more on that > starting in the next paragraph). I have tried the USB dongle thing and got > the same results...even now I just tried it and got the same results. > > However, I do actually now think this is a problem with MH somehow, either in > my personal code or the library itself. Let me explain what I have done. > > While still having the 5401 connected to the USB dongle, which is > device /dev/ttyUSB0, I ran the "ser2net" program That basically connects the > serial port to a TCP port on the PC, in this case 52000. So, from another > machine I telnet to port 52000 on the MH server. I get left over buffered > output, but then it stops. When I try to type ASCII characters, like MH > would send, I get error code responses (which is what I would expect since I > don't know the command sequences off the top of my head). But, as I trip > zones and watch the screen, I see all the correct encoded output from the > 5401, even the time broadcast every 4 minutes. Arming and disarming via a > panel generates the correct codes. > > For instance, arm the system in away mode from the panel. First I see: > 6561D2 System is in exit delay > 7011C9 1 minute later, special arming action > 65211FF This says the system is now armed in away mode. > 550224002150892 Standard time/date broadcast (very recent, too). > > So, if my serial terminal sees this stuff, why doesn't MH? It's almost as if, > once the 5401 reports the buffer overflow, MH stops listening. The USB > dongle has a light that blinks when there is activity, and when MH is not > listening, it is constantly blinking. > > Now, I will need to do some research and figure out what the command sequences > are that I need to send to see something happen. Then I guess I will pull > out my debugging hat and figure out exactly what is going on with MH. It > could be anywhere from the 5401 library to the serial port driver code. > > Too bad I can't make the 5401 library code telnet to this port instead of use > it directly. Imagine if that ability was added to MH for any serial device, > they could sit anywhere in the world where there is a PC running software > like ser2net. Is the serial port mode raw? Take a look at you ini file for your DCS settings. This is just a guess but I think I've seen something odd like that previously. -- Linux Home Automation Neil Cherry nc...@li... http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies |