View Full Version : Com Port Problems with PLM2412U
ziflin
Nov 21, 2009, 09:00 PM
I'm wondering if anyone else has run into this problem. I am using a new (1 month old) PLM2412U Insteon controller with the latest drivers from their website under Windows 7. After a few (2-5) days of use with HCA, the "USB Serial Port (COM3)" stops responding, HCA identifies it as a "Power Outage" but there was none (the computer is on a UPS and the last power outage the UPS software reports was days before).
If I close down HCA and restart it, it complains about not being able to Open the COM port. And the C# program that I have to send a simple insteon packet fails to open the port as well.
There is nothing that I have found to "fix" the problem other than rebooting the machine. The PLM itself does not appear to be locked up as I do not have to reboot it to get HCA working again, just my PC.
I have contacted SmartHome twice, with no response yet for the last few occurrences. I have also contacted the maker of the USB-to-Serial part in the PLM that provides the driver. From what I can tell, it seem to be a driver problem as rebooting just the PC fixes the problem.
At any rate, this makes the PLM useless... If anyone has any ideas on what to try, or ways to verify what part or driver is causing the problems, please let me know.
Thanks!
KHarms
Nov 22, 2009, 10:11 AM
This is a driver problem that we are investigating. I can say that with some certainty because a user contacted us with this problem and we sent them a 2412U PowerLinc from our lab that was working fine on Vista and XP. They sent us their 2412U PowerLinc that was failing for them. When we installed their PowerLinc it worked find on our test system and ours failed on theirs. The only variable was the driver.
The latest drivers are here:
http://www.ftdichip.com/Drivers/VCP.htm
Also here is the driver that I use which is a bit earlier but they work 100% for me on XP and 32 bit Vista.
www.HCATech.com/download/plm/2412udrivers.zip (http://www.HCATech.com/download/plm/2412udrivers.zip)
However this doesn’t appear to solve things for some users. For some it does and for some it doesn’t. We are still investigating looking for a workaround of this issue.
mjl
Nov 22, 2009, 04:37 PM
I am noticing the exact same behavior on 64 bit Vista Ultimate. I've just transferred my setup to an XP Professional 32 bit system to see if I have the same problems - I am curious which operating system (including 32 or 64 bit) others are using who are having the same problem. I tried the drivers from Smarthome's web site, and also two different versions of the drivers from the FTDI web site and all driver versions behaved similarly. Last night I completed configuring HCA on a 32 bit Windows XP system with the 2.04.06 serial drivers. So far it is still running, but it usually takes at least a day for it to fail so we'll see.
ziflin
Nov 22, 2009, 06:35 PM
For me, this is under Windows 7 RC1 32bit. I will be upgrading to Windows 7 final soon, but it sounds like this won't make a difference if people are having problems with other OSes as well.
I have contacted FTDI 3 times, and while they are quick to respond, they seem less than willing to believe it is a problem with their driver. I replied to them again last night when it locked up to let them know that it happened again and that "Scan for Hardware Changes" did not work.. Not that I expected it to. And there is no way to "Uninstall" and "Reinstall" the driver without a reboot - which fixes it normally anyway.
I am glad to know that others are having the same problem though. It has been driving me crazy lately and has delayed my purchase of HCA. My trial period is about to expire, but I'm still having trouble purchasing it before I get this problem resolved. My server machine is a MSI Wind that has neither a serial port nor a PCI slot, or I would have just returned the USB version for a serial one.
I started a thread at SmartHome (http://www.smarthome.com/forum/topic.asp?TOPIC_ID=6058) a few weeks ago and will reply to that again and let people know that others here have had issues.
Thanks and if anyone finds a solution, please let me know! :P
mjl
Nov 22, 2009, 10:04 PM
One odd thing is that I had it running fine On 64 bit Vista from Oct 19 through Oct 30 or so, and then around October 30 the "Power Failure" lock up's began. The only thing which I can find which happenend around that time is a bunch of windows updates which installed at midnight on October 29. Sometimes HCA would generate the power failure error and HCA would recover by me removing and reinserting the USB cable - sometimes I get the exact same symptoms as you and even if I kill the HCA process, it remains memory resident with the driver locked so there is no way to access the driver without a reboot. This makes me think it is a driver or 2412U problem and not HCA, but I haven't checked to see if any other software is having trouble with the 2412U. I will also let you know if the same problem occurs on the 32 bit XP box. My Vista box is an HP M9040N (Asus MB with Intel Q6600 and 8 GB RAM). That is my main workstation and I run a lot of things on it so the configuration conrol is somewhat lacking. I've now created an XP Pro box for TV viewing and running my home automation (and nothing else). It's running an Asus MB with an Intel Pentium 4 and 2 GB RAM. I know there were other folks using the 2412U with Windows 7 RC1 and no issues, so I'm thinking there is something that changed around Octboer 30 or just prior, but I can't figure out what changed.
KHarms
Nov 23, 2009, 01:47 PM
Anyone who is experiencing thgis issue please email Tech Support. Thanks.
KHarms
Nov 23, 2009, 07:15 PM
Just to keep everyone in the loop, this was sent on to SmartHome developer support.
We are also making changes to HCA in an attempt to handle the error. We are not sure this is possible.
We are seeing reports from a number of users working with the PowerLinc Modem 2412U. It appears to be an issue with the device driver that creates the virtual serial port.
I hope that someone reading this has a good understating of event driven I/O in Windows as this will get complex.
Our software opens the virtual serial port created by the device driver in Overlapped Mode (FILE_FLAG_OVERLAPPED passed to CreateFile).
The basic write operations we do is this (some error checking removed for brevity)
OVERLAPPED osWrite = {0};
osWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!WriteFile(port, pData, cbData, &cbSent, &osWrite))
{
if ((lastError = GetLastError()) != ERROR_IO_PENDING) {
// Some error
writeOk = FALSE;
}
else {
//
// Write is pending
//
waitResult = WaitForSingleObject(osWrite.hEvent, writeTimeout);
if (waitResult == WAIT_OBJECT_0)
{
if (GetOverlappedResult(port, &osWrite, &cbSent, FALSE))
writeOk = TRUE;
else {
// Some error
lastError = GetLastError();
}
}
}
}
The problem is that after the PowerLinc Modem has been open and working for an indeterminate time period - it can fail in a few minutes or take hours - the GetOverLappedResult function shown above returns an error 31. Windows defines error 31 as ERROR_GEN_FAILURE ("A device attached to the system is not functioning"). After this the PowerLinc Modem is dead to us. Subsequent reads or writes result in errors.
Please note this is the same implementation we use for support of all interfaces and have worked fine all during development.
We have done a number of things to try and diagnose this problem.
We took a PowerLinc Modem from a test machine where it was working without problem and gave it to a user experiencing this problem. They still experienced the problem. Also we took their PowerLinc Modem and attached it to our test machine and it worked fine. So it appears not to be the hardware.
We also tried using the latest drivers available from the FTDI web site but are still experiencing the problem on some user's machines.
Curiously enough when we took the same driver we use on test machines - not the latest - and had the user use that driver it still fails.
ziflin
Nov 23, 2009, 08:22 PM
Thanks, I've emailed HCA Tech support to see if there's anything they would like me to try. The only overlapped IO that I've done is for normal async file IO. There's a few things that I could suggest looking at regarding the code snippet, but it's been a while since I did the file IO, so I'm just guessing.
It's my understanding that the OVERLAPPED struct that's on the stack in that example should be allocated instead -- its lifetime should live past this function if it's possible that the function can exit. I'm just basing that on the WaitForSingleObject() that uses a timeout and could possibly return with the Write still pending.
I don't think that WriteFile() ever returns true for overlapped io (and I don't have my code here to double check), but you might check to see if it ever does if you're not already.
There were apparently some changes with threads and overlapped IO in Vista. I haven't read the specifics, but it has to do with associating the device with an IO completion port and then issuing an overlapped request to it. I don't think that's the case here from looking at the code though.
---
Since my HCA trial is about to run out, if you can tell me what the Insteon query HCA issues to the PLM to check its status (to determine if the power is out) and roughly how often it does the test, I can update my C# program to issue the commands to see if I can get it to lock up with a very simple test case.
The problem happens apparently in the middle of the day when no timers are scheduled to run, so this is the only IO that I could see causing the problem. If it is from issuing an IO request...
KHarms
Nov 24, 2009, 08:19 AM
I probably should have said that the implementation of this has been used by HCA since V1. So it over 10 years this is the first time we have had problems.
mjl
Nov 27, 2009, 11:37 PM
I did a little reading and I concur with ziflin - this probably has something to do with the recent changes as to how Windows handles overlapped I/O in Vista and Windows 7. I don't have any great ideas regarding how to determine whether it's a problem with the driver, HCA, or somewhere in between - I assume the HCA developers are using fully up-to-date development environment? I know I've seen similar error reports for other software such as VMWare. I have not updated my VMWare on my Vista box to version 7.0 yet (currently VMWare Workstation 6.5.3), but I don't think that should affect HCA.
KHarms
Nov 28, 2009, 10:29 AM
The problem with this theory is that all the HCA lowest level I/O for all device types (except the CM15) is handled the same way using overlapped I/O. This problem is only occurring with the 2412U.
kjbbasic
Dec 04, 2009, 09:20 AM
I'll just add my experience so far with the 2412U..in the FWIW category.
I have a 2412U interface (firmware 8.5) and a 2412UH (firmware 7.2)
I was running both off an XP Pro 32 bit system with no issues for several months. The 2412U was for HCA 9, the 2412UH for HL2 (which I fired up occasionally)...HCA is the main program I use.
I've just moved HCA and the 2412U over to a laptop running windows 7 64 bit 24X7...the 2412U is connected to the laptop via a CyberPower hub. FTDI driver is the latest 2.06.00
So far after a week+ of use I've had no problems with either the 2412U or the UPB controller connected to the machine/HCA. The connected W800RF32 gave me a little trouble at first (now uses a USBGear serial to USB cable) but all's been solid for 3 days now ( I added the hub plus swapped the W800RF32 cable 3 days ago).
I know this is a short time, I'll keep you posted if my experience with this setup differs from my XP days...I'm just leaving this system running 24X7...running HCA primarily.
Ken
KHarms
Nov 04, 2010, 10:50 AM
As SmartHome themselves have said, some computers work well with the PowerLinc - that is, keep it connected to the USB Bus - and others don't.
Makes one crazy...
vBulletin® v3.8.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.