Re: RS232 Anyone???
From: DraguVaso (pietercoucke_at_hotmail.com)
Date: 09/08/04
- Next message: Cor Ligthert: "Re: Remove Event Handle dynamically in C#"
- Previous message: Guoqi Zheng: "Re: short week name and month name."
- In reply to: Terry Olsen: "Re: RS232 Anyone???"
- Next in thread: Terry Olsen: "Re: RS232 Anyone???"
- Reply: Terry Olsen: "Re: RS232 Anyone???"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Sep 2004 11:37:44 +0200
Hi Terry,
I'm planning to make anapplication that has to communicate with an SMS
Modem. I kind of drawned in the lots of bad RS232 code I foudn and tested.
I'm also tempted to do it in VS 2005 because I heard it was integrated
there. Does your code works fine? And did you use the VS 2005 Beta 1 or the
VS 2005 Express Edition? Is it possible to make a working Service with it
that uses RS232?
If you woudl be so kind to paste your code that would be very helpfulltoo
:-)
Thanks a lot in advance,
Pieter
"Terry Olsen" <tolsen64@hotmail.com> wrote in message
news:uiBBnC7kEHA.3608@TK2MSFTNGP09.phx.gbl...
> Nevermind....I just found out that VB 2005 supports the serial ports.
> Changed my code and all works fine now...
>
>
> "Terry Olsen" <tolsen64@hotmail.com> wrote in message
> news:%23CxG6e5kEHA.3912@TK2MSFTNGP12.phx.gbl...
> > I'm trying to use the RS232 class that was in the Platform SDK (i
think).
> > Has anyone else used this with events successfully? Here's what i've
got:
> > ======================
> > Public WithEvents bbsPort As Rs232 = New Rs232
> >
> > With bbsPort
> > .BaudRate = baud
> > .DataBit = dataBits
> > .Parity = parity
> > .Port = comPort
> > .StopBit = stopBits
> > Try
> > .Open()
> > Catch ex As Exception
> > StopServerToolStripMenuItem.PerformClick()
> > MsgBox(ex.Message, MsgBoxStyle.Critical)
> > End Try
> > End With
> >
> > 'The port opens okay because if I have another application using the
port
> > I get the exception message "Unable to open COM1"
> >
> > Public Sub ReadComPort(ByVal Source As Rs232, ByVal DataBuffer() As
Byte)
> > Handles bbsPort.DataReceived
> > MsgBox("DataReceived")
> > End Sub
> > =======================
> >
> > Two questions I have are: I know I can communicate because I can talk
to
> > the serial device with Hyperterminal. When I try it with my app, the
> > event is never fired. So I must be doing something wrong. Any help is
> > desperately needed & appreciated.
> >
> > Second question: There doesn't seem to be a way to set flow control.
Has
> > anyone added flow control capabilities to this class?
> >
> > Thanks.
> >
> >
>
>
- Next message: Cor Ligthert: "Re: Remove Event Handle dynamically in C#"
- Previous message: Guoqi Zheng: "Re: short week name and month name."
- In reply to: Terry Olsen: "Re: RS232 Anyone???"
- Next in thread: Terry Olsen: "Re: RS232 Anyone???"
- Reply: Terry Olsen: "Re: RS232 Anyone???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|