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 / C++ / MFC
  4. Serial Comms Problem

Serial Comms Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++
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.
  • L Offline
    L Offline
    louis 0
    wrote on last edited by
    #1

    Hi there, I am examining some VC++ code that attempts to read asynchronous serial data via third party serial interface cards, namely (Moxa<4-port> and Aurora<8-port>). When I set the baudrate to 19200 and above, then the data packets read are all fine and consistent. But when I set the baudrate to 9600 and below then the problems start. The length and the content of the packets read are not always the same. A packet consists of 44 bytes, with 8 bits, one start and stop bit only, no parity. I have inserted the HasOverlappedIOCompleted() function before ReadFile() function, but to no avail. Any help/advise would be appreciated. Thanks Louis

    J 1 Reply Last reply
    0
    • L louis 0

      Hi there, I am examining some VC++ code that attempts to read asynchronous serial data via third party serial interface cards, namely (Moxa<4-port> and Aurora<8-port>). When I set the baudrate to 19200 and above, then the data packets read are all fine and consistent. But when I set the baudrate to 9600 and below then the problems start. The length and the content of the packets read are not always the same. A packet consists of 44 bytes, with 8 bits, one start and stop bit only, no parity. I have inserted the HasOverlappedIOCompleted() function before ReadFile() function, but to no avail. Any help/advise would be appreciated. Thanks Louis

      J Offline
      J Offline
      justin223
      wrote on last edited by
      #2

      Try to read only 1 byte in ReadFile

      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