Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to identify a device which is connected to com port

how to identify a device which is connected to com port

Scheduled Pinned Locked Moved C#
comtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    premkamalg
    wrote on last edited by
    #1

    Hi every body, Any specific procedure is there to identify a active com port. means if a connect a device to com port, how to identify device is connected to which port.

    Thanks

    L 1 Reply Last reply
    0
    • P premkamalg

      Hi every body, Any specific procedure is there to identify a active com port. means if a connect a device to com port, how to identify device is connected to which port.

      Thanks

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, your subject line and message body do not match: what is it you want to identify, the port to which something is attached, or that something itself? in any way, it will need some cooperation from the attached device. Here are the two basic ways to get information: 1. through the control lines Some devices, when powered and enabled, pull one or several control lines (see SerialPort properties CDHolding, CtsHolding, DsrHolding) 2. by actually communicating send commands to the device and look for the responses, if they fit your expectations chances are the expected device is on the port you are talking to. If you want to find the port, you probably need to loop over all available ports (see SerialPort.GetPortNames() :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Sorry for any delays in replying, I currently don't always get e-mail notifications.


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups