A Question for All - RS232 Serial Port Communication

C

Thread Starter

Curt Wuollet

As you know by now, the RS232 serial port is becoming extinct, at least in laptops. I keep an old one with real serial ports around for use when needed. Trying hard not to be a Luddite, I am using a newer laptop with W7 on it. I have lots of doodads and whatsits to connect to various gear using the blessed and beknighted USB kludge, and, as often as not it can be made to work, sometimes with only a little more screwing around than with RS232. There is still some needed software that adamantly refuses to recognize COM78:, and I have device manager pinned to the taskbar.

With this background in mind, my question is:
Is there some reasonably convenient way to deal with this mess? Windows doesn't put it's toys away when it's done with them. It remembers every driver/comport combination it has ever seen and often assigns a new one for things it has surely seen before. And it's happy to tell me they are all functioning properly, even when they're not. I think it would be a fair deal to blow them all away and wait out the seconds to reload and make a new link. I've googled and got a few hot tips on how to remove these one at a time, but if you connect to an assortment each day, before you know it, you're back to 75 COM ports again. Am I missing something elegant or is this what we have to live with for the honor of using Windows? I guess "normal" users wouldn't have as much of an issue, but if you are continually connecting to various things, it gets to be a pita. So how do you deal with it?

Regards
cww
 
I have had success using USB to serial converters manufactured by FTDI.

When these are plugged into a PC they are assigned a port number, which could be an annoying value such as COM23. Using Device Manager you can find the number assigned to the USB Serial Port and force it to something nicer, say COM2.

The new port setting is retained as long as the same converter is plugged into the same USB port, in my experience.
 
I agree Chris, he can just change the port number. Although i have used many usb to rs232 converter brands over the years, I mostly just use Belkin these days. As far as i can remember, they all removed their driver/comm number after unplugged.

So I believe the issue of driver comm port settings remaining and accumulating is the poster's usb to rs232 converter driver issue. He should try another brand.
 
C

Curt Wuollet

That looks like a good item to have, I'll download Monday when I'm near the Windows machine.

But, I wanted to correct our friendly moderator and the impression given that this is an USB to serial problem. It's a USB problem. Many other things are mapped to com ports and leave residue. I suppose because I support several brands of PLCs and other gadgets it's more acute. But I haven't seen this behavior on Linux or RiscOS or anything else.

Obviously, the OS "knows" if the device is removed, why not clean things up? The "Device Manager" seems to be me.

Regards
cww
 
Curt

The issue here isn't a USB problem - it is how Windows TRIES to remember old devices to REASSIGN the same COM12 or whatever. Sometimes that works, other times it doesn't. Different chip vendors may or may not help, but i doubt even FTDI eliminates this age-old Windows issue.

There is a bit mask in the register which tracks com ports IN USE. Go to Digi's support site Knowledge Base & search for "phantom serial ports" I think the HKEy is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter.

All you need to do is edit the mask (replace 1's with 0's) and the numbers can be reused. Just be aware that the bit mask includes COM1 & real com ports, so leave those bits 1.

- Lynn
 
Actually - one other comment. If you try to be ultra consistent in where/how you plug your USB-serial in under Windows, this helps. For example, if you have a 4-port USB hub, and plug the same very generic USB-serial device in each of the ports one-by-one, you might end up with it being treated as 4 different 'devices' and assigned 4 different COM numbers by the 'arbitrator'.

This is why someone with a notebook computer who only uses 1 USB port repeatedly doesn't generally see this problem. The same piece of HW plugged into the same port is assigned the same COM number.
 
C

Curt Wuollet

Thanks Lynn,
I think I'll check out that freeware utility. I'm not too keen on doing registry edits on the floor with people tapping their feet. But, it's good to know where they keep those entries. And yes, amazingly enough, if my laptop is docked, COM1: generally works.

What really ticks me off is when you play the game and watch the device manager and the device that comes and goes when you plug and unplug it says its working normally, but the software won't use it and says something else is using the port that you just activated. etc., etc. Remove it, reboot, eventually you may get it to work, for no logical reason. Maybe, once a week I'll have to just cream all the bogus entries. I've got to think the hardware vendors get a lot of working stuff returned, because less enthusiastic users wouldn't have a clue.

Even old hands that were once used to manually assigning hardware addresses and interrupts have to scratch their heads at this "plug and play" solution to that problem.

Regards
cww
 
I've found that many times a poorly written application program will not release the Windows resources when they terminate (which is why Windows says it's still in use), and actually verified it on several packages that I have to use (Cutler-Hammer WinGPC for instance). Often I can free the resources by re-opening the app and immediately exiting.

Adding to my original post, USB Device View will also show the port number (it actually appears in the Drive Letter column) even for disconnected devices, similar to using Device Manager show_nonpresent_devices. Some of the serial devices I've seen are RFID readers, barcode scanners, and cellphones.

Another good resource is the FTDI website; there is a utility available there (http://www.ftdichip.com/Support/Utilities.htm) that uninstalls based on Vendor ID. If you do a lot of support among many sites, you will eventually get a feel for what to purge, or even keep a list.
 
C

Curt Wuollet

How would that solve the problem of phantom ports?

All the stuff works when the mapping is right and there isn't any conflict.

Regards
cww
 
I have used for years PL2303 USB to serial cable from prolific. Never had any issues. I have connected it to a lot of devices like vamp relays, micom relays, abb Avrs, ge fanuc micro plc's, Siemens micro plc's, Bently Nevada Vibration monitoring systems, HMI's from different manufacturer etc. never had any issues. Runs great on xp and win 7. But the driver must be installed which can be downloaded for free from the prolific website. You can check it out.
 
> I use a Dell Precision M4800 laptop with a "Legacy Port Adapter"

I have the same adapter with my Dell laptop. I found that it works with stuff that works with a USB-RS232 adapter but not with stuff that requires a "real" COM port (like our old PLC2s or the old PIC adapter that we thankfully don't really need any more).
 
Top