Page 1 of 2
CM11A Error
Posted: Mon Nov 03, 2003 2:56 pm
by martijnj
Hi Everybody,
Does anybody have an idea what the following means
Error reading COM port. Error=Insufficient data in read buffer.
This error appears every time I change something with my remote. I turn of a lamp. Some devices show there status change in the next line but others don't show.
What wrong Or what am I doing wrong.....
Martijn
Posted: Mon Nov 03, 2003 3:53 pm
by ScottBot
Martijn,
The only thing you can really tell from that message is that the HouseBot CM11a plugin was expecting to receive more data from the CM11a than it did actually receive.
First, make sure you have the latest version of the software (version 1.60). There were some important changes made to the CM11a plugin that may help resolve the problem.
If you are running version 1.60, please generate a trace file and send it to me. To generate a trace file:
- From the HouseBot main menu, select 'Settings/Tracing...'.
- Press the 'Advanced' button.
- Select the name of the cm11a interface in the list (it will be prefixed with an asterisk).
- Select the 'File' checkbox and enter a file name in the edit field below (file name only).
- Press OK to dismiss all dialogs.
- Try and use the interface again. This should generate data in the log file.
- Turn the tracing off by returning to the 'Advanced' tracing dialog and removing the check by the 'File' option.
- Send the trace file to me at '[email protected]'. The file can be found in the HouseBot\Logs directory.
Scott
CM11 error
Posted: Wed Nov 05, 2003 1:52 am
by ChrisR
Scott,
I'm getting the same behaviour. I'm using the UK version of the CM11 (the CM12), I don't know if the difference in timings on a 50Hz mains line might be important. Martijn - are you on a 50 or 60Hz mains?
I get the error when a remote transmitter sends data onto the line that is picked up by the CM12/Housebot. I have two different makes of transmitter and both show the same error. I first got the problem using 1.6, I then re-installed 1.52 to see if that mad any difference, and seemed to get the same behaviour, but I just re-installed 1.52 on top of 1.6, so it may not be a clean install.
I will get a tracefile together, but it won't be until the weekend.
Thanks & regards
Chris
Posted: Wed Nov 05, 2003 3:39 am
by martijnj
Hi Chris & Scott,
I use 50 Hz on 220 volts.
I installed the new dll but now I sometimes (not always) get the error that there is a byte to much.
I will trun trace back on and send te file when I get the error
Martijn
Re: CM11 error
Posted: Wed Nov 05, 2003 10:15 pm
by ScottBot
Chris,
I have an update to the CM11a plugin that may fix the problem. You can
download it here.
To install the new plugin:
- Stop HouseBot
- Unzip the new CM11a.dll plugin and copy it into your \HouseBot\Plugins\Interfaces directory. You may want to backup the current DLL first.
- Restart HouseBot
Let me know if this helps.
Scott
Posted: Thu Nov 06, 2003 2:55 am
by ChrisR
Thanks Scott,
I'll test it this w/e and get back to you.
Chris
Posted: Sun Nov 16, 2003 8:12 am
by ChrisR
Scott,
I finally got some time to quickly test the updated plugin, and it is much more reliable, thankyou. I made a clean install of v1.6 and then copied over the new plugin. When I first fired it up I got 100% OK results from one of my X10 transmitters, but a few (maybe 10%) read errors from my TM13U (wireless to X10). I then setup a trace log file for the C11a interface to capture these, and since setting up the trace I get no errors at all (there's an engineering law about this behaviour isn't there?).
I won't be able to commit a machine to running housebot continuously for a bit, but I'll try to get some more trace time over the next week or so and get back to you.
Thanks again for your support
Regards
Chris
Posted: Sun Jan 18, 2004 6:25 pm
by e10kstarfire
Hi Scott,
I am suffering from this problem with a CM12U also (insufficient data in read buffer).
I'm running Housebot 1.63 on my server which is on 24x7.
The scenario I currently have is, a command to say turn on a lamp works fine but then the next command which may be a few hours later fails with the above error, but when I try it again manually after a few seconds it typically works.
Now, I do have a UPS and apparently that can cause problems with X10 signals but I wouldn't have thouh it would affect the PC serial to CM12U connection...
Would it be possible to have some sort of retry feature in Housebot to try the commands again if they fail? I would find this useful.
Thanks,
Simon.
ps. I also have activehome and on the occasions I have ran this (with housebot shutdown of course) it has not failed to control the CM12U properly - but I haven't used it a lot
Posted: Sun Jan 18, 2004 9:18 pm
by ScottBot
Simon,
If you could run a trace to capture this when it happens, it would be useful in determining the problem. A step-by-step list for creating a trace can be found earlier in this thread.
HouseBot will retry when sending data if it encounters a failure. However, if it is receiving some data, there's not much to retry. An error of 'insufficient data', probably means that it was expecting one thing and received another, but didn't know how to handle the odd situation. This is why a data trace is essential for diagnosis.
I'm pretty sure that it is a HouseBot CM11a plugin problem. ActiveHome and other packages probably work fine. The CM11 has been a challenge to get right (I guess you can tell that I don't use it in my home
).
Posted: Mon Jan 19, 2004 5:02 am
by e10kstarfire
Hi Scott,
I have switched tracing on so will see what happens.
From memory when I've had it tracing before, you are expecting to read 1 byte but there are zero in the buffer.
As I can just run the command again and it typically works, perhaps that could be added as an retry option in the future but I agree, getting the CM11A plugin working correctly is the best fix.
When I get the next failure I will provide you a trace log.
Regards
Simon.
eidt: just noticed that at x10.com the manual states the baud rate for communication with the CM11A should be 4800, I had it set to 9600 so have changed this
Posted: Tue Jan 20, 2004 6:32 am
by e10kstarfire
Well, its being running every half hour and hasn't failed once with tracing in place - typical!
I've changed it to hourly.....
Posted: Wed Jan 21, 2004 4:50 pm
by e10kstarfire
Well, its still working fine
I will probably leave the tracing running anyway.
Posted: Wed Jan 21, 2004 4:55 pm
by ScottBot
It's funny how tracing fixes so many things
Posted: Fri Feb 13, 2004 12:49 am
by acheslow
Scott, I am also getting the 'insufficient data in read buffer' error with 1.63, but only on one of my X10 devices. Here is the log data:
Code: Select all
Feb 13 2004 12:40:36AM CM11a Debug --> Read Pending... WriteData. 2 bytes
Feb 13 2004 12:40:36AM CM11a Debug Writing [2] bytes [04 56]
Feb 13 2004 12:40:36AM CM11a Debug Read [1] bytes [5a]
Feb 13 2004 12:40:46AM CM11a Debug CSerialPort::ReadData() is requesting 1 bytes and there are only 0 bytes [] in the [Solicited] read buffer. Waited 10 seconds
Feb 13 2004 12:40:46AM CM11a Error Error reading COM port. Error = Insufficient data in read buffer
This is on Win2k Pro. I've tried changing my com port settings from 9600 to 4800 baud, and from no flow control to hardware flow control but it had no effect. I tried deleting and recreating the device with no effect either.
Any ideas?
Thanks,
Alan
Posted: Fri Feb 13, 2004 9:31 am
by ScottBot
Alan,
Do you see this every time with this device?
It appears as though I'm not handling the unsolicited notification from the CM11a that it has some data for me (that's the 5a). I'm always having problems with the 5a, especially when it is received unexpectedly. There's nothing in the spec about how to handle it when it is received in the middle of another transaction, but apparently I'm not doing it right.
I'm releasing the 2.0 beta on Monday and my system isn't really setup to build 1.6 modules at this time. If you're interested in installing the beta and working through some tests, I'll send you some experimental plugins to see if we can crush this thing once and for all.