Port Com 1 occupied by a device

FLAVOS60 Posted messages 2 Registration date   Status Member Last intervention   -  
georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   -
Hello everyone,
The configuration of the industrial PC: Windows XP Pro SP3.
I am running a program that uses 4 serial ports (Com1, Com2, Com3, and Com4) to visualize devices using the RS485 protocol (via RS232 to RS485 converters), but that's not the point.
The COM ports 2, 3, and 4 work correctly, but not COM1.
To achieve proper communication, I have to disable COM1 (which seems to be occupied by something), restart the OS, re-enable COM1, and then start my software.
How can I ensure that no device can take place on COM1, other than my software? Is there a way to prevent ports COM 1 to 4 from being seized by a service, a device, or any driver that would prevent my software from having free access to this COM port?
Thank you in advance for your help.

5 answers

georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   2 914
 
Hello,

I hope I'm not saying anything foolish, but I will happily be corrected. Since the ports are fictional, why not open a COM 5, which would correspond to the device previously connected to COM 1.

That doesn't stop us from thinking about the destination of COM 1, used for modems and possibly corresponding to a different interrupt range than that of your device or to be configured in its driver.

Best regards
1
FLAVOS60 Posted messages 2 Registration date   Status Member Last intervention  
 
Thank you for your feedback.
In fact, I tried to move my 4 ports by incrementing +1 (Com 1 to 2, Com 2 to 3, etc.) to stop using com1, but I encounter a similar problem on port 5, which, after a restart, is occupied by a USB driver. I don't know if this is random, or if it was really possible to clearly assign 4 permanent ports for my software.
0
georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   2 914
 
There is surely a solution, but I'm not skilled enough to propose one. The fact that an unwanted USB device "defaults" to COM 5 is troubling.

I hope another contributor can untangle this problem, which likely involves rummaging through sys.ini or other configuration files dating back to DOS.

Another avenue to consider, if you could salvage another serial card from an old machine, that might allow for additional COM ports to be activated.

Also, try temporarily disabling the USB ports (in the device manager) to check if that releases the "missing" COM port after restarting.
0
georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   2 914
 
Hello,

As I am persistent (stubborn?), I continued to search. I found this:

------------------------- From memory in the 90s:

You had to configure the software by indicating which port the device is connected to (COM1, COM2), address and IRQ (3F8 and IRQ4 for COM1, 2F8 and IRQ3 for COM2 unless I’m mistaken, to avoid conflicts), the ports being on the motherboard at that time.

So in my opinion, no driver is needed, just a configuration, also check if the serial ports are enabled in the BIOS.

Some peripherals were also configurable by micro switch (speed, address, IRQ etc..., hoping that is not the case if hidden by shielding) --------------------------------------------

in https://forum.tomsguide.fr/threads/port-com1-rs232-besoin-dun-pilote.740776/

This means that you check the activation of COM1 in the BIOS, then the addresses and IRQ as defined in the referenced posts to detect any potential address conflicts. Adjust these parameters if necessary.

RESTART REQUIRED EVERY TIME

Furthermore, either the mouse or the keyboard may occupy the COM address (to be checked in properties/advanced of the device manager).

Temporarily replace them with their PS2 equivalents (in principle, if you have these ports, it should work without further ado, the parameters being integrated into the initial config, in system.ini if I’m not mistaken).

As a last resort, here’s a tip to disable USB ports:

TO BE USED ONLY IF YOUR KEYBOARD/MOUSE ARE NOT CONNECTED VIA USB (meaning they are on PS2 plugs).

MOREOVER, NOTE THE INITIAL CONFIGURATION OF THE REGISTRY OR BACK IT UP AS ADVISED TO RETURN TO IT IN CASE OF FAILURE.

https://korben.info/desactiver-les-ports-usb-de-son-pc.html

Looking forward to hearing from you.
0
georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   2 914
 
Une page d'information sur les E/S :

https://www.commentcamarche.net/contents/749-interruptions-materielles-irq-et-conflits
0
georges97 Posted messages 14560 Registration date   Status Contributor Last intervention   2 914
 
Furthermore, I am sending you two pages in English, the first regarding the high probability of non-functioning "legacy programs" in Visual Basic 6, and the second proposing a fix for COM1, as Windows loads a program and looks for a mouse if it detects data on COM1 at startup, rendering this port inaccessible for another device. Similarly, if you have an internal modem or one integrated into the motherboard.

It may be the case for you.

https://www.tomshardware.com/
https://www.taltech.com/support/entry/windows_2000_nt_serial_mice_and_missing_com_port
0