problem with setupcomm

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saee
    New Member
    • Feb 2009
    • 24

    #1

    problem with setupcomm

    hi group,
    i'm reading 100 bytes at a time from com1. this is a continuous loop.
    every time entering the loop it will connect to port (makefile, setupcomm) n terminate conection while leaving the loop.
    sometimes i can read the data n sometime it gives error setup com failed. getlast error returns error code 995.
    setupcomm fails regularly. once in 2-3 reads.data is coming at 115200bps.
    whts the reason. if setupcomm doesn't fails getcommstate fails.
    please help.
    thank you.
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    what is reason to connect and disconnect in a loop?

    Better cnnect to the port, read the data in a loop and at the end of the loop disconnect from it.

    Raghu

    Comment

    • saee
      New Member
      • Feb 2009
      • 24

      #3
      i will try that n let you know. thanks..
      :)

      Comment

      Working...