Global Cache Serial

Having problems? Maybe others have had the same problem too. Post HouseBot technical issues here.
Post Reply
jasonb1
Member
Posts: 34
Joined: Tue Nov 11, 2003 12:50 am

Global Cache Serial

Post 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...
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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
jasonb1
Member
Posts: 34
Joined: Tue Nov 11, 2003 12:50 am

Post 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.

"
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

We're making some progress...


Error = An existing connection was forcibly closed by the remote host
This shows that there is definitely a problem sending data to the GC-100. I'm not sure why the GC-100 would close the connection.



Try this:
  • Terminate HouseBot.
  • Open a command prompt.
  • Enter telnet 192.168.1.70 4999 Replace the IP with your actual GC-100 address.
  • Then type some data into the telnet window. You can try and send the actual data "44VL" if you want.
  • Does the telnet window show any errors? What does it show? Does the device respond to the command?
The firmware of my GC-100 is slightly behind yours, but I double-checked the latest API and it hasn't changed.



Scott
jasonb1
Member
Posts: 34
Joined: Tue Nov 11, 2003 12:50 am

Post by jasonb1 »

If I use telnet, it seems to work fine (no disconnects) other than I can't actually get any commands to the unit because it errors out every time sending me back "E04" (inappropriate command line). Telnet must be sending CR+LF even though I've configured it to send only CR when I hit Enter. I tried Ctrl+M and it still gives me the E04 back. Also, if I just leave telnet connected and perform various things directly on the unit, all the response strings are showing up in telnet properly.

- Jason
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

What OS are you running?



Does the HouseBot Received Data (or log data) show any data if you interact directly with the unit?



I wonder if something has changed in the firmware that could be causing this.



Scott
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Jason,



You omitted the IP address of your GC-100 in the problem report. I assume that this is because it is accessible over the Internet. If so, would you mind if I tried to connect from my machine? You can send me the IP address in a private message.



Just a thought,

Scott
jasonb1
Member
Posts: 34
Joined: Tue Nov 11, 2003 12:50 am

Post by jasonb1 »

I sent you a PM with the IP address. I'm using a fully updated Windows XP box to host HouseBot on. I just tried telnetting and it didn't look like the logs were showing received data during the telnet session.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Jason,



I was able to successfully connect to your GC-100 and send some data on port 1. I didn't see the errors that you were seeing. I hope I didn't mess up your volume while you were watching a movie :wink:



Do you have a firewall, router, proxy or active network component between the HB machine and the GC-100? If so, make sure you have ports 4999 and 5000 opened. If you successfully connected with telnet, I'm guessing that this is not the problem, but I'm not sure what else it could be.



Scott
jasonb1
Member
Posts: 34
Joined: Tue Nov 11, 2003 12:50 am

Post by jasonb1 »

I noticed that the unit was on and the volume was different so I figured it was you playing with it. Don't worry, it's still just a test setup and I expected it. I tried with HouseBot again and it was still not working, so, since it worked fine for you, I'm assume it's something with the TCP/IP stack on the HTPC machine. I rebooted and all seems to be working now.



I wonder if it's because of the changes I made to the IP configuration to initially connect to the GC-100 which I later undid but never rebooted (which shouldn't be necessary).



Sorry for wasting your time...

- Jason
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

No problem. I'm glad it's working for you now.



There's still one more change I need to make to the Plugin before I release a new version. In your version the property for specifying which device the received data is to be sent is at the wrong place. I need to move the configuration value into the module/port setup screen, since the gc-100 has multiple RS232 ports.



Scott
Post Reply