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. serialport datareceived event

serialport datareceived event

Scheduled Pinned Locked Moved C#
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.
  • M Offline
    M Offline
    Member 10263519
    wrote on last edited by
    #1

    hi, in my appli i need to read data thuogh serialport in two different times. 1) when i write data to handheld system through serialport ,that sholud send a success signal 2)To read some other data from serialport. for the first one, i wrote the code for receiving success data, in esrialportdatareceived event. then for 2) where can i write the code of reading. if i write in that event everytime success data is showing as output.

    D 1 Reply Last reply
    0
    • M Member 10263519

      hi, in my appli i need to read data thuogh serialport in two different times. 1) when i write data to handheld system through serialport ,that sholud send a success signal 2)To read some other data from serialport. for the first one, i wrote the code for receiving success data, in esrialportdatareceived event. then for 2) where can i write the code of reading. if i write in that event everytime success data is showing as output.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You need some method to discriminate between the two pieces of data. If the device is sending the exact same string of data every time, you can check for that and have a reasonably good idea where it came from. If not, well, then you're going to have to come up with some kind of protocol, like "framing" data, that your external devices are going to need to use to identify themselves as the source. Or, put each device on it's own serial port.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      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