CM11A Error

Having problems? Maybe others have had the same problem too. Post HouseBot technical issues here.
martijnj
Member
Posts: 61
Joined: Mon Nov 03, 2003 2:50 pm
Location: NL

CM11A Error

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

Post 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:
  1. From the HouseBot main menu, select 'Settings/Tracing...'.
  2. Press the 'Advanced' button.
  3. Select the name of the cm11a interface in the list (it will be prefixed with an asterisk).
  4. Select the 'File' checkbox and enter a file name in the edit field below (file name only).
  5. Press OK to dismiss all dialogs.
  6. Try and use the interface again. This should generate data in the log file.
  7. Turn the tracing off by returning to the 'Advanced' tracing dialog and removing the check by the 'File' option.
  8. Send the trace file to me at '[email protected]'. The file can be found in the HouseBot\Logs directory.
Scott
ChrisR
Member
Posts: 10
Joined: Mon Aug 25, 2003 12:36 pm
Location: UK

CM11 error

Post 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
martijnj
Member
Posts: 61
Joined: Mon Nov 03, 2003 2:50 pm
Location: NL

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

Re: CM11 error

Post 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:
  1. Stop HouseBot
  2. Unzip the new CM11a.dll plugin and copy it into your \HouseBot\Plugins\Interfaces directory. You may want to backup the current DLL first.
  3. Restart HouseBot
Let me know if this helps.



Scott
ChrisR
Member
Posts: 10
Joined: Mon Aug 25, 2003 12:36 pm
Location: UK

Post by ChrisR »

Thanks Scott,



I'll test it this w/e and get back to you.



Chris
ChrisR
Member
Posts: 10
Joined: Mon Aug 25, 2003 12:36 pm
Location: UK

Post 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
e10kstarfire
Member
Posts: 11
Joined: Fri Jan 16, 2004 10:22 am

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

Post 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 :wink:).
Scott
e10kstarfire
Member
Posts: 11
Joined: Fri Jan 16, 2004 10:22 am

Post 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
e10kstarfire
Member
Posts: 11
Joined: Fri Jan 16, 2004 10:22 am

Post 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.....
e10kstarfire
Member
Posts: 11
Joined: Fri Jan 16, 2004 10:22 am

Post by e10kstarfire »

Well, its still working fine 8)



I will probably leave the tracing running anyway.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It's funny how tracing fixes so many things :wink:
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

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

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