- Scan for available COM/Serial-Ports
- Posted by Florian on March 4th, 2008
Hello
i am looking for a method to check for available / existing COM/Serial-
Ports from a batch file.
Basically i just need to know which Ports are available.
any ideas if that is possible in a .bat file ?
any hint / keyword is appreciated
Thanks in advance
florian
- Posted by foxidrive on March 4th, 2008
On Tue, 4 Mar 2008 05:39:57 -0800 (PST), Florian <fidel@vido.info> wrote:
For which OS?
- Posted by Ted Davis on March 4th, 2008
On Tue, 04 Mar 2008 05:39:57 -0800, Florian wrote:
The short answer is "no". You already know that logical ports COM1
through COM4 exist - there is no way to know, without looking at the
physical arraingement, whether they physically exist, and if they exist,
whether they have a physical connector on the back panel. A port can be
tested, if it is known to have something connected to it that can respond.
--
T.E.D. (tdavis@mst.edu)
- Posted by Franc Zabkar on March 4th, 2008
On Tue, 4 Mar 2008 05:39:57 -0800 (PST), Florian <fidel@vido.info> put
finger to keyboard and composed:
You may be able to use Debug in your batch.
debug
-d 40:0 7
0040:0000 F8 03 F8 02 E8 02 00 00
^^^^ ^^^^ ^^^^ ^^^^
COM1 COM2 COM3 COM4
This shows those COM ports which are known to DOS. I don't know if it
shows the COM ports on PCI cards, though.
Otherwise the Mode command may tell you something.
C:\WIN98SE>mode com4
Illegal device name
- COM4
C:\WIN98SE>mode com1
Status for device COM1:
-----------------------
Retry=NONE
C:\WIN98SE>mode com2
Status for device COM2:
-----------------------
Retry=NONE
C:\WIN98SE>mode com3
Status for device COM3:
-----------------------
Retry=NONE
- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
- Posted by Richard Bonner on March 5th, 2008
Florian (fidel@vido.info) wrote:
*** For DOS, I use "Check Modem" or a program from Compaq called
"Locate". E-mail if you can't locate them.
You might also try "Modem Doctor", but I have little experience with
it. One or more links to it can be found at:
http://www.chebucto.ca/~ak621/DOS/Websites.html
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
- Posted by Florian on March 6th, 2008
Hello,
unfortunaly i cant define the OS, as it should work on those MS OS'es:
* Win98, Win2000, Win2003, WinXp and WinVista
I have solved the task right now by another technical solution.
I have written a small C++/QT app which is able to scan for all ports.
Thanks for all replies.
Best regards
florian
- Posted by Timo Salmi on March 6th, 2008
Florian wrote:
That plural is quite a valid definition, since it clarifies the
circumstances where the solution is searched for.
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:ts@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Useful batch files and tricks ftp://garbo.uwasa.fi/pc/link/tsbat.zip