Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Reading data from the Serial Port

by talexb (Chancellor)
on Aug 01, 2002 at 00:19 UTC ( [id://186644] : note . print w/replies, xml ) Need Help??


in reply to Reading data from the Serial Port

  • What software are you using to read from the serial port?
  • How do you know that Perl is losing data after 14 characters? Is it possible that Perl is catching up after 14 characters and the loop fails after getting an 'empty buffer' from the read subroutine?
  • How fast is the data entering the serial port? Is there any flow control (XON/XOFF or CTS/RTS) that might be interfering?
  • What other experiments have you conducted?

--t. alex

"Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
--Michael Flanders and Donald Swann

Replies are listed 'Best First'.
Re: Reading data from the Serial Port
by Anonymous Monk on Aug 01, 2002 at 00:43 UTC
    The device (Waveware paging data receiver) doesnt have flow control. I connect to the receiver at 9600 8 N 1. I am using the perl program that i posted to read the serial port, i have checked what i am receiving with hyperterm. Also, i am the one generating the pages (POCSAG format being sent at 512bps) from a paging client so i can be sure of what should appear on the serial port. Thanks, Jason
      When I did data communications programming as my job, my favourite tool was the HP 4951A protocol analyzer -- it would tell you anything about everything that was going on over a serial communications channel.

      You probably don't have one of those .. you might be able to get a break-out box which at least would tell you if there is some flow control stuff going on. Alternatively, look for breakout box software on Google -- I'd pass you some links but either Google is slow or my connection is tired right now. Highly recommended.

      Based on what little information is available, I expect it's going to be some type of flow control problem -- is there any way you can set up the serial port or the software talking to the port to enable, disable or automate the flow control?

      --t. alex

      "Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
      --Michael Flanders and Donald Swann