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. Serial Port Communication

Serial Port Communication

Scheduled Pinned Locked Moved C#
questionhardware
4 Posts 3 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.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi All, I have an appliation that communicates with a hardware device attahced with the system. So far, the device had been attached using USB so the application was determining the PORT using Port Name. Now, the newer device have 9-pin serial port. How can I now determine the Port number? I don't want to iterate through all the ports and send any command and analyse the response to determine the required Port. Any suggestion or hint would be greatly helpful...

    Regards, -SIFAR.

    T G 2 Replies Last reply
    0
    • S Sifar 0

      Hi All, I have an appliation that communicates with a hardware device attahced with the system. So far, the device had been attached using USB so the application was determining the PORT using Port Name. Now, the newer device have 9-pin serial port. How can I now determine the Port number? I don't want to iterate through all the ports and send any command and analyse the response to determine the required Port. Any suggestion or hint would be greatly helpful...

      Regards, -SIFAR.

      T Offline
      T Offline
      TAFIN
      wrote on last edited by
      #2

      use class "serialport".

      SerialPort serialport1 = new SerialPort();

      use this class and using this obj u can read port no.... ok. TANIM TAFIN:thumbsup:

      S 1 Reply Last reply
      0
      • T TAFIN

        use class "serialport".

        SerialPort serialport1 = new SerialPort();

        use this class and using this obj u can read port no.... ok. TANIM TAFIN:thumbsup:

        S Offline
        S Offline
        Sifar 0
        wrote on last edited by
        #3

        Thanks TAFIN. I am aware about that class. My problem is how to determine the exact Port Number to which the device is attached without iterating through all the ports.

        Regards, -SIFAR.

        1 Reply Last reply
        0
        • S Sifar 0

          Hi All, I have an appliation that communicates with a hardware device attahced with the system. So far, the device had been attached using USB so the application was determining the PORT using Port Name. Now, the newer device have 9-pin serial port. How can I now determine the Port number? I don't want to iterate through all the ports and send any command and analyse the response to determine the required Port. Any suggestion or hint would be greatly helpful...

          Regards, -SIFAR.

          G Offline
          G Offline
          Gideon Engelberth
          wrote on last edited by
          #4

          There really is no way to determine that without iterating. Unless you make the user pick the port manually.

          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