June 30, 2024, 08:52:11 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Serial Port programming

Started by JimH, March 10, 2009, 02:23:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JimH

I need to capture the output of our telephone system and save it. The data blazes across the wire at 9600 bps and needs to be dumped to a text file for later processing. (Yes, I know that 9600 bps doesn't seem too "blazing" these days, but for those of us who remember how marvelous it was when 1200 bps modems arrived for our BBS systems back in the 80's...)  ;)

Searching through the topics here, I don't see much about reading from the serial ports. There is one topic that refers to port.dll, but the links in that topic appear to be dead.

Is anybody else grabbing data from the serial ports on the PC? How are you doing that?

   <*> Jim

Ionic Wind Support Team

Mine doesn't even have serial ports ;)

Look at the example program commread.eba that comes with Emergence.  That is the preferred way of doing it since your not allowed to directly read/write from a serial port.

Paul.
Ionic Wind Support Team

Rock Ridge Farm (Larry)

One thing to remember is to write stop/start control into your code.
Even at 96k you can cause a buffer overflow or loss of data.
I did something like this a long time ago in 'C'.
It was logging all the traffic from the port and I was dropping data till I
added the stop/start control. (IOCTL).

JimH

Ah, source code! Thank you, Paul!!

I was sure there was an example somewhere, but my brain-dead Vista search insisted that it couldn't find the .eba sample files on my system. It took a little manual digging to find them.

Quote from: Paul Turley on March 10, 2009, 02:36:51 PM
Mine doesn't even have serial ports ;)

Yeah, sadly, almost all of the new computers don't have serial ports these days. I had to dig around to find an old box with one on the motherboard.

Quote from: Rock Ridge Farm (Larry) on March 10, 2009, 03:05:54 PM
One thing to remember is to write stop/start control into your code.
Even at 96k you can cause a buffer overflow or loss of data.

Thanks for the reminder, Larry. It has been a while since I had to deal with stuff like that. Years ago, there was an amazingly versatile communications library called PDQComm for QB45 and Basic 7 that I used to write a bunch of drivers for platform truck scales. TSR programs for DOS - those were the days!

   <*> Jim

LarryMc

Jim,
I used that same library w/QB45 to interface into a security card reader system.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

JimH

Quote from: Larry McCaughn on March 10, 2009, 05:11:20 PM
I used that same library w/QB45 to interface into a security card reader system.

I'm straying a bit off-topic here, but back then Crescent Software was a major force in BASIC programming tools. I think I convinced my boss to buy just about all of them, from QuickPak Pro and XRef to PDQ and PDQcomm. Those along with AJS Publishing's db/Lib routines to work with dBase files were my box of everyday magic tricks. They were all incredibly useful tools.

   <*> Jim