Solved

Locking in a port setting for USB

Posted on 2006-07-21
7
566 Views
Last Modified: 2012-08-14
Is there a way to lock in the port settings so that a specific USB port will always be set to com x, and also can the port settings be locked in to some value other than the Windows default ?

The issue is that the default com number is com 4 but this can be changed through Device Manager-Ports-(converter device)-Properties-Port settings-Advanced and setting to com 1. But the problem arises when the device is unplugged and reattached. When the driver reloads, the com port reverts back to the default of com 4 (on my pc, at least).Since the laptop does not have the 9 pin port, the signal must be converted to USB, and a RS-232 to USB adapter is employed.  
0
Comment
Question by:rosenblumm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 17161911
NO, you do not set USB devices to any specific COM port, that is erroneous thinking.  COM 1-4 are used normally by the system and COM 5-8 are for other COM adapters.  NONE of these ports relate to USB.  A universal serial device bus is a PLUG_N_PLAY but that is specifically engineered to be autodetected by windows OSs.  It is NOT designed for fixed IRQs and port numbers, if you try to do this, you will totally freeze the USB bus.

The way USB works is that each DEVICE on the bus has an ID that is identified and dynamically assigned to a "resource" in the system ID chain, as well as the windows configurable interrupts and ports on the USB controller bus, it is totally separate from fixed COM ports.

If the identification of USB devices ever gets fouled up, you go into disk management, and assign that device on the USB bus to a unique DRIVE LETTER -- which can help separate USB devices, but you never assign it fixed resources, it doesnt work that way.
0
 

Author Comment

by:rosenblumm
ID: 17168598
I understand that, I need a way to work around that.  This modification is being done for machines that we are building that will always be exactly the same.  
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 17173040
" Is there a way to lock in the port settings so that a specific USB port will always be set to com x"

No, USB is supposed to be configurable, it is designed to adapt to the system.  Sounds like you need to force the user to use COM1 for this application, since you want a true serial port, not a USB, correct?  
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rosenblumm
ID: 17176418
We can't force the user to do anything.  The systems that are being built are the foundation for automated equipment that the customers will have installed.  It could be configured once to work ok, but if there was a cycle of power for whatever reason, our customers might be screwed.
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 17178828
I dont think so.  If you are using straight USB, it will automatically adapt to find the device on whatever port and IRQ is assigned to it (usually 10 up).  However, if you are converting a USB device to run on a serial card, then yes, there could be a reboot problem.  However, if the adapter is between the device and the USB cable, and is just a pin converter, I dont see a problem.  Try a few failures to see.  You cannot lock in a USB port on a windows system -- go into device manager and check all USB devices and controllers, and you will see there is NO WAY to pick manual settings to lock it in.  That is not the USB system.  You could write your own device driver, but windows will freeze when it cannot dynamically change the USB port assignments, and the user can still remove that device driver if it is giving problems.
0
 

Author Comment

by:rosenblumm
ID: 17179011
It's a USB to Serial connection.  What do you think of this solution?

"Our devices use the FTDI USB interface chip, and they're programmed with a "USB Serial Number".  This allows the assigned COM port to follow the particular cable.  It can be plugged into any USB port on the same host and still be assigned the same COM port.  For your application, you only need to be sure that "cable 1" is used with "device 1" and "cable 2" is used with "device 2" when you ship it to a customer.

The same is true for our 2-port devices as well.  Serial 1 (or the top port of the ES-U-1002) is assigned the lower COM port number.  Serial 2 (or the bottom port) is the higher COM port.

Finally, the device driver also allows modifying the COM port number through the advanced settings.  Once changed, the newly assigned COM port number will follow the cable as before."
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 17292741
In fact, you CAN pin a USB serial number to a com port, starting at COM7, I think.  And as long as you have a hardcoded number to work with, then yes, you could do this -- but their strategy is not in line with the plug and play idea of USB ports -- however, I do sympathize with their effort or attempt to TRY to fix a USB device to a particular COM port.  It is a great idea, until a problem develops.

Suppose the user loses the BIOS settings, and his windows XP settings get corrupted and he has to do a repair install --- then the USB device list is lost.  Also, suppose he has to remove the USB driver because it is "stuck" because of one of these fixed assignments that they suggest, per your quote -- then the USB table is lost.  And if the user has to do a repair install, or update the USB drivers, it is also lost.

In the end, I would simply TRY what they suggest -- it might work fine for a long time for most users -- but if not, be prepared to help them on tech support with the problems.  This is EASY to do, all you have to do is simulate a failure on your own system -- upgrade the USB drivers, remove them, do a repair install -- do ALL those kinds of things -- including adding oodles of USB devices until the bus is choked -- if you TEST what will happen, you KNOW what will happen, at least on XP.

And good luck !!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question