Hi,
I wrote a app to capture data from a serial port connected to a PBX.
(win32 Lazarus 1.0.12 with latest svn synapse/synaser)
I am running into a issue where the only way my app can get the data is if
I split the serial port and
have procomm plus or hyperterminal do the initial handshake.
The settings in hyperterminal/procomm are the same as my app which does
this:
ser.Config(9600,8,'N',1,true,false);
When I have my app running by itself on com1 I get a bunch of garbage when
it reads from the port.
(the pbx sends data every hour and is plain serial printer data, no VT100
or anything like that, it has some form feed chars in it but thats about it.
I ran a serial port monitoring software and the handshaking of procom is
different it has a opiton
called handflow:
Hyperterminal handshaking (see below for my synaser handshaking from the
monitor app)
COM is open
<20131120145700.192 SYS>
In/out queue size 8192/8192
<20131120145700.192 SYS>
Baud rate 9600
<20131120145700.192 SYS>
RTS on
<20131120145700.192 SYS>
DTR on
<20131120145700.192 SYS>
Data bits=8, Stop bits=1, Parity=None
<20131120145700.192 SYS>
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
<20131120145700.192 SYS>
Handflow: ControlHandShake=(DTR_CONTROL, ERROR_ABORT),
FlowReplace=(AUTO_TRANSMIT, AUTO_RECEIVE, TRANSMIT_TOGGLE, RTS_CONTROL,
XOFF_CONTINUE), XonLimit=80, XoffLimit=200
<20131120145700.192 SYS>
Set timeouts: ReadInterval=10, ReadTotalTimeoutMultiplier=0,
ReadTotalTimeoutConstant=0, WriteTotalTimeoutMultiplier=0,
WriteTotalTimeoutConstant=5000
Synaser Handshaking:
<20131120165620.508 SYS>
COM is open
<20131120165620.508 SYS>
In/out queue size 4096/0
<20131120165620.508 SYS>
Set timeouts: ReadInterval=65535, ReadTotalTimeoutMultiplier=0,
ReadTotalTimeoutConstant=0, WriteTotalTimeoutMultiplier=0,
WriteTotalTimeoutConstant=0
<20131120165620.508 SYS>
RTS on
<20131120165620.508 SYS>
DTR on
<20131120165620.508 SYS>
Purge the serial port: RXABORT, RXCLEAR, TXABORT, TXCLEAR
When I have the com1 split into two virtual ports and I have hyperterminal
connect first which does the handflow thing my app gets good data, but If I
run my app by itself I get stuff that looks like this:
o"F J) b c C DH B A !O Fh DD B (@BC h h ,Fl FF
!` "JdeD N De L( FFFF F @#(B BC (P F @ Ho
`P"<$
F a B (BBC ( #
F F
F
<EAL` lB CB
"ODF F F
OEF D F F u, # h P F F F{
It should look like this:
ACD 000 20/11/2013 17:00
REPT 1
ACD AVG CALLS AVG AVG AVG AVG AVG DN AVG #-XFER
AVG-TIME-POSN
DN AGTS ANSWD ASA DCP HDCP PCP WORK WAIT CALLS TIME IDN ACD
BUSY MANNED
2178625 1 0 **** **** **** **** **** **** 2 361 0 0
786 3508
-----------------------------------------------------------------------------------
1 0 **** **** **** **** **** **** 2 361 0 0
786 3508
REPT 2
ACD CALLS RECALL ANSWERED ABANDONED TOF TOF OVER INTER
DN ACCPTED TO LONGEST NO. AVG.WT TSF IN OUT FLOW FLOW
SOURCE WT. TIME BUSY
2178625 0 0 0 0 **** 0 0 0 0 0
------------------------------------------------------------------------------
1 0 0 0 0 **** 0 0 0 0 0
CALLS CALLS ANSWERED ABANDONED ROUTE
DFLT
CDN ACCPTED NO. ASA LONG WT NO. AVG.WT TSF BY DISC BUSY
DN
IVR CCR
------------------------------------------------------------------------------
0 0 0 **** 0 0 **** 0 0 0 0 0
0
REPT 4
POS CALLS TOTAL TOTAL TOTAL TOTAL DN INC DN OUT #-XFER MANNED
ID ANSWD DCP HDCP PCP WAIT INC TIME OUT TIME IDN ACD TIME
ACD DN 2178625
2868 0 0 0 64 2722 2 722 0 0 0 0 3508
01
---------------------------------------------------------------------------
1 0 0 0 1 45 2 12 0 0 0 0 58
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public