Global Cache Serial
Posted: Thu Dec 11, 2003 2:46 am
by jasonb1
HouseBot 1.62.1
GC-100-12
It seems to be acting funny in the serial department. I haven't tried IR yet...
1. It seems to be sending incomplete commands the first time I change a property, then when I do it again, it seems to send the data out twice. This sequence is repeatable. I conclude this by watching the network link light on the device.
2. recieved data. My "Received data" property isn't getting filled in on data input.
I can see in the logs that the proper data is being sent and received, however. On the received data, in the logs, it's being split up too much. Is this because there is no "response timeout" like available in the generic serial module?
Note, I hooked this up to a device that was previously using the generic serial module. Does that have anything to do with it?
- Jason
P.S. I was also getting an error on module enable about not finding [] device definition. I didn't define anything for the second serial port. For the heck of it, I defined it and the error went away. I went back and set it back to "undefined" (* Select Definition *) like it was before but the error didn't come back.
This is kind of rambling, so let me know if you need more info...
Posted: Thu Dec 11, 2003 2:25 pm
by ScottBot
Jason,
It looks like the GC Serial code is a bit out of date. I've just brought it into sync with the Generic Serial Hardware Interface.
With the new plugin, you'll see the new Interface properties for
Response Timeout and
Received Data Serial Device Destination (you probably don't need this one).
The Response Timeout should fix your sporadic data reception problem. You should tune this value down to a number that is quick and reliable.
The
Received Data Property should now get set properly.
I saw the error about the empty hardware definition, but haven't looked into it yet (doesn't seem to be a big deal).
Other than remapping the Serial commands in the Device, the existing Serial Device should work fine.
I'm unable to reproduce the problem with data being sent partially or duplicated.
My testing setup is to simply loop the two serial ports together will a null modem cable. Maybe there's something in your configuration that I am not covering well. Try the new plugin and see if it makes any difference.
You can download the plugin from
here. This is not the whole plugin package, just the DLL. To install it you will need to stop HB, Copy the DLL into your \HouseBot\Plugins\Interfaces directory and then restart HB.
Once we get the kinks worked out, I'll release the whole plugin package. Let me know how it works for you.
Scott
Posted: Fri Dec 12, 2003 1:13 am
by jasonb1
It looks like we've got the Received Data property working right.
The following log shows the problem that I'm now seeing as I try to ramp the volume using an auto-repeat property button. This same setup works fine on a regular serial port. If I unplug the GC-100 and plug back in, then it may be able to successfully send a command one time. I find that sending other commands like power on/off or mute on/off might also cause this problem. I've removed the IP address of the GC-100 from the log.
Dec 11 2003,09:53:45PM,GC-100,Debug,"Attempting to connect to CP-100 at address [x.x.x.x]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Connection to CP-100 successful."
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [device,1,1 SERIAL
device,2,1 SERIAL
device,3,3 RELAY
device,4,3 IR
device,5,3 IR
endlistdevices
]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Attempting to connect to CP-100 at address [x.x.x.x] - Port [4999] for serial port [1]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [version,1,2.0.7.071503-1-12
]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Connection to CP-100 serial port 1 successful."
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [version,2,2.0.7.071503-1-12
]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [version,3,2.0.7.071503-1-12
]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [version,4,2.0.7.071503-1-12
]"
Dec 11 2003,09:53:45PM,GC-100,Debug,"Received Data from GC-100 [version,5,2.0.7.071503-1-12
]"
Dec 11 2003,09:53:56PM,GC-100,Debug,"Writing [5] bytes [34 34 56 4c 0d]"
Dec 11 2003,09:53:56PM,GC-100,Error,"Error sending command [44VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:56PM,GC-100,Debug,"Writing [5] bytes [34 35 56 4c 0d]"
Dec 11 2003,09:53:56PM,GC-100,Error,"Error sending command [45VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:57PM,GC-100,Debug,"Writing [5] bytes [34 36 56 4c 0d]"
Dec 11 2003,09:53:57PM,GC-100,Error,"Error sending command [46VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:57PM,GC-100,Debug,"Writing [5] bytes [34 37 56 4c 0d]"
Dec 11 2003,09:53:57PM,GC-100,Error,"Error sending command [47VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:57PM,GC-100,Debug,"Writing [5] bytes [34 38 56 4c 0d]"
Dec 11 2003,09:53:57PM,GC-100,Error,"Error sending command [48VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:57PM,GC-100,Debug,"Writing [5] bytes [34 39 56 4c 0d]"
Dec 11 2003,09:53:57PM,GC-100,Error,"Error sending command [49VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:58PM,GC-100,Debug,"Writing [5] bytes [35 30 56 4c 0d]"
Dec 11 2003,09:53:58PM,GC-100,Error,"Error sending command [50VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:58PM,GC-100,Debug,"Writing [5] bytes [35 31 56 4c 0d]"
Dec 11 2003,09:53:58PM,GC-100,Error,"Error sending command [51VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:58PM,GC-100,Debug,"Writing [5] bytes [35 32 56 4c 0d]"
Dec 11 2003,09:53:58PM,GC-100,Error,"Error sending command [52VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:58PM,GC-100,Debug,"Writing [5] bytes [35 33 56 4c 0d]"
Dec 11 2003,09:53:58PM,GC-100,Error,"Error sending command [53VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:58PM,GC-100,Debug,"Writing [5] bytes [35 34 56 4c 0d]"
Dec 11 2003,09:53:58PM,GC-100,Error,"Error sending command [54VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:59PM,GC-100,Debug,"Writing [5] bytes [35 35 56 4c 0d]"
Dec 11 2003,09:53:59PM,GC-100,Error,"Error sending command [55VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:59PM,GC-100,Debug,"Writing [5] bytes [35 36 56 4c 0d]"
Dec 11 2003,09:53:59PM,GC-100,Error,"Error sending command [56VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:59PM,GC-100,Debug,"Writing [5] bytes [35 37 56 4c 0d]"
Dec 11 2003,09:53:59PM,GC-100,Error,"Error sending command [57VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"
Dec 11 2003,09:53:59PM,GC-100,Debug,"Writing [5] bytes [35 38 56 4c 0d]"
Dec 11 2003,09:53:59PM,GC-100,Error,"Error sending command [58VL
] to GC-100. Error = An existing connection was forcibly closed by the remote host.
"