Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e53g2000hsa.googlegroups.com!not-for-mail
From: ecnyx <ecnyx2@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Serial Port Issue - Buffer flush?
Date: Thu, 7 Aug 2008 16:17:16 -0700 (PDT)
Organization: http://groups.google.com
Lines: 40
Message-ID: <00d24387-b3e2-4d5e-934a-1f866ef1d929@e53g2000hsa.googlegroups.com>
NNTP-Posting-Host: 192.31.106.35
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1218151037 22338 127.0.0.1 (7 Aug 2008 23:17:17 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 7 Aug 2008 23:17:17 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e53g2000hsa.googlegroups.com; posting-host=192.31.106.35; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
Xref: news.mathworks.com comp.soft-sys.matlab:484385



Hi All,

I have been struggling with communicating through serial port for
several days. Bottom line is I am unable to recieve data from my
hardware. I am using PortMon to monitor the communication lines. I
know the hardware works because it runs with the software that came
with it. The following is a log of one of my commands:

......
IRP_MJ_WRITE                         	Length 11:  0A 04 00 00 00 00 00
00 00 04 00
IOCTL_SERIAL_SET_WAIT_MASK	Mask: TXEMPTY CTS DSR RLSD BRK ERR RING
IRP_MJ_FLUSH_BUFFERS
IOCTL_SERIAL_SET_WAIT_MASK	Mask: TXEMPTY CTS DSR RLSD BRK ERR RING
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_SET_WAIT_MASK	Mask: CTS DSR RLSD BRK ERR RING
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
IOCTL_SERIAL_GET_COMMSTATUS	InQueue: 0 OutQueue: 0
.......

Somehow, Matlab keeps flushing the buffer of the device. I use
fwrite.

My settings are:
Baud: 19200
Stopbit: 1
Parity: none
DataBits = 8
RTS = off
DTR = off

Can anyone shed light on this please?

Thanks!

Ellen