Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How to determine which COM port represent a USB connection?


  • Please log in to reply
7 replies to this topic

#1 Muhammed Refaat

Muhammed Refaat

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:04:07 PM

Posted 18 June 2013 - 08:11 AM

I have a device connected to the USB and i want to know the COM port reserved for that device as i know that each device connected to the PC have a COM port number associated, but i can't find that as when i search the device manager i only find that info:

 

aa.png

 

and when i search the USB Root Hub of the device i only get this :

 

zzzzzzzz.png



BC AdBot (Login to Remove)

 


#2 chrisd87

chrisd87

  • Members
  • 811 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NC
  • Local time:09:07 AM

Posted 18 June 2013 - 08:54 AM

USB connections do not have com port numbers assigned to them unless its a usb-serial adapter which then it will assign a virtual com port #. Instead they have an address assigned to them. A simple way that I would do it would be if your running windows 7 is to go to devices and printer by clicking start-then click devices and printers. Find the device that you want to lookup. Right click and go to properties. Once at the properties, go to Hardware tab then click properties again. Once there up top you should see General, Driver, and Details. Click on the Details tab and drop the list down till you see Address. That number is the USB number that it's plugged into.

 

Capture-4.jpg


"Like car accidents, most hardware problems are due to driver ɹoɹɹǝ."

 


#3 Muhammed Refaat

Muhammed Refaat
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:04:07 PM

Posted 18 June 2013 - 09:07 AM

in my case i'm developing a java program that aquires the COM address from me, So, i need any way in order to define a COM port when using USB connection.


Edited by Muhammed Refaat, 18 June 2013 - 09:12 AM.


#4 Muhammed Refaat

Muhammed Refaat
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:04:07 PM

Posted 18 June 2013 - 09:09 AM

USB connections do not have com port numbers assigned to them unless its a usb-serial adapter which then it will assign a virtual com port #. Instead they have an address assigned to them. A simple way that I would do it would be if your running windows 7 is to go to devices and printer by clicking start-then click devices and printers. Find the device that you want to lookup. Right click and go to properties. Once at the properties, go to Hardware tab then click properties again. Once there up top you should see General, Driver, and Details. Click on the Details tab and drop the list down till you see Address. That number is the USB number that it's plugged into.

 

Capture-4.jpg

 

 

well, thanks a lot for your great information :thumbup2: , but i'm developing a java program that aquires the COM address from me, do you know any idea how can i provide this parameter for him in case of using a USB connection ?



#5 chrisd87

chrisd87

  • Members
  • 811 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NC
  • Local time:09:07 AM

Posted 18 June 2013 - 10:57 AM

Are you wanting the Java program to be able to show available ports on the computer? If not, what exactly are you wanting the program to be able to do?


"Like car accidents, most hardware problems are due to driver ɹoɹɹǝ."

 


#6 Muhammed Refaat

Muhammed Refaat
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:04:07 PM

Posted 18 June 2013 - 11:28 AM

Are you wanting the Java program to be able to show available ports on the computer? If not, what exactly are you wanting the program to be able to do?

no, i just want to know the port my own in order to use it in the program, but the problem is the library i use in my code (called SMSLib) aquires the serial port number that the device connected to.



#7 chrisd87

chrisd87

  • Members
  • 811 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NC
  • Local time:09:07 AM

Posted 18 June 2013 - 11:32 AM

You could try this.

DeviceManager dm = DeviceManager.getInstance();
  dm.createInstance();
  dm.scanDevices();
  dm.dump();

Also have you tried the Library Jusbpmp?


Edited by chrisd87, 18 June 2013 - 11:35 AM.

"Like car accidents, most hardware problems are due to driver ɹoɹɹǝ."

 


#8 Muhammed Refaat

Muhammed Refaat
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:04:07 PM

Posted 19 June 2013 - 02:56 AM

no, that's the first time i hear about that library, i'll try it and see what gonna happen, thx a lot :)






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users