Hi all
I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial port. is there no other way to do this - it has to be simple or well explained because I'm still new to the .NET world and c#. I did stumble across an article on the MSDN site where I downloaded a file NetSerialComm.e xe - I think it was from one of the msdn magazines? But anyway I don't know what the heck is going on here! there are so many classes, I don't know which ones to instantiate or if I'm supposed to write my own classes derived from these?! I would just like something simple that would give me the capabilities of reading and writing to a comport. I know that for reading a port is alot harder than writing to one because you're not really in control, you basically have to do it on an Event basis - but I don't know how to construct me form/class to raise an event when data is coming through the port
Plainly put, that is why I resorted to the MSComm.ocx. But now when I set my Card reader up and I plug it in and I swipe my transponder card the OnComm event of the Active X control executes 3 times and I get 3 sections of the number thats on the card! - where as in Hyperterminal I get 1 long string. I have no Idea why the event would be raised 3 times? any suggestions?
I would like to break away from the MSComm control purely because I want a .NET component, but this product I want to make will be sold so I am screwed by open source liscence agreements!lo
Please can someone give me some help or point me in a direction where I can find this sort of stuff explained in plain english:
Thanks
Kevin 7 3061
TransPort from www.componentscience.net, it's a commercial serial
communications library. I saw them at a conference last year, and they had
a card reader set up for their demo. They use regex for data matching, so
you can set up a packet for the data coming from your card and it will come
in at once instead of spreading over a few events. When I was talking with
them, they seemed very knowledgeable and willing to help, so they can
probably offer some guidance (probably more if you buy their product<g>)
BTW, the reason why you're getting multiple events is that's how the data
is coming in and being fed by the port driver. It's usually in 8 byte
chunks (give or take depending on how fast the app can process data and how
fast the port drivers can handle the data).
--
Floyd Burger
"Kevin" <an*******@disc ussions.microso ft.com> wrote in message
news:88******** *************** ***********@mic rosoft.com... Hi all,
I am having a problem reading from a serial port, first of all I have now
resorted to using the MSComm ActiveX control on my Windows Forms to provide
me with the interface to my serial port. is there no other way to do this -
it has to be simple or well explained because I'm still new to the .NET
world and c#. I did stumble across an article on the MSDN site where I
downloaded a file NetSerialComm.e xe - I think it was from one of the msdn
magazines? But anyway I don't know what the heck is going on here! there are
so many classes, I don't know which ones to instantiate or if I'm supposed
to write my own classes derived from these?! I would just like something
simple that would give me the capabilities of reading and writing to a
comport. I know that for reading a port is alot harder than writing to one
because you're not really in control, you basically have to do it on an
Event basis - but I don't know how to construct me form/class to raise an
event when data is coming through the port. Plainly put, that is why I resorted to the MSComm.ocx. But now when I set
my Card reader up and I plug it in and I swipe my transponder card the
OnComm event of the Active X control executes 3 times and I get 3 sections
of the number thats on the card! - where as in Hyperterminal I get 1 long
string. I have no Idea why the event would be raised 3 times? any
suggestions? I would like to break away from the MSComm control purely because I want a
..NET component, but this product I want to make will be sold so I am screwed
by open source liscence agreements!lol Please can someone give me some help or point me in a direction where I
can find this sort of stuff explained in plain english:) Thanks Kevin
On Mon, 3 May 2004 23:43:08 -0600, "Floyd Burger" <fl***@adelphia .not>
wrote: TransPort from www.componentscience.net, it's a commercial serial communicatio ns library. I saw them at a conference last year, and they had a card reader set up for their demo. They use regex for data matching, so you can set up a packet for the data coming from your card and it will come in at once instead of spreading over a few events. When I was talking with them, they seemed very knowledgeable and willing to help, so they can probably offer some guidance (probably more if you buy their product<g>) BTW, the reason why you're getting multiple events is that's how the data is coming in and being fed by the port driver. It's usually in 8 byte chunks (give or take depending on how fast the app can process data and how fast the port drivers can handle the data).
I use the BaseComm class provided by GotDotNet. I heard a rumour that
this will be similar to the class that MS is supposed to be providing
in the future. Using the line term class is very similay to using
MSComm
To date, I've had it running in several industrial environments and I
have not yet had a drama.
The Real Andy wrote: I use the BaseComm class provided by GotDotNet. I heard a rumour that this will be similar to the class that MS is supposed to be providing in the future. Using the line term class is very similay to using MSComm
Searching on GotDotNet (and Google) didn't turn up any hits for that...
can you provide a link? Thanks. http://www.gotdotnet.com/community/u...=serial%20port
--
Floyd Burger
"Kevin P. Fleming" <kp*******@back tobasicsmgmt.co m> wrote in message
news:uj******** ******@TK2MSFTN GP11.phx.gbl... The Real Andy wrote:
I use the BaseComm class provided by GotDotNet. I heard a rumour that this will be similar to the class that MS is supposed to be providing in the future. Using the line term class is very similay to using MSComm
Searching on GotDotNet (and Google) didn't turn up any hits for that... can you provide a link? Thanks.
I've used the library from GotDotNet http://www.gotdotnet.com/Community/U...7-73e09c4d5890
for my applications.
With the exception of few bugs and some error handling the library seems to
work fine.
Alex Moskalyuk
_______________ _______________ ___ http://www.techinterviews.com
"Kevin" <an*******@disc ussions.microso ft.com> wrote in message
news:88******** *************** ***********@mic rosoft.com... Hi all,
I am having a problem reading from a serial port, first of all I have now
resorted to using the MSComm ActiveX control on my Windows Forms to provide
me with the interface to my serial port. is there no other way to do this -
it has to be simple or well explained because I'm still new to the .NET
world and c#. I did stumble across an article on the MSDN site where I
downloaded a file NetSerialComm.e xe - I think it was from one of the msdn
magazines? But anyway I don't know what the heck is going on here! there are
so many classes, I don't know which ones to instantiate or if I'm supposed
to write my own classes derived from these?! I would just like something
simple that would give me the capabilities of reading and writing to a
comport. I know that for reading a port is alot harder than writing to one
because you're not really in control, you basically have to do it on an
Event basis - but I don't know how to construct me form/class to raise an
event when data is coming through the port. Plainly put, that is why I resorted to the MSComm.ocx. But now when I set
my Card reader up and I plug it in and I swipe my transponder card the
OnComm event of the Active X control executes 3 times and I get 3 sections
of the number thats on the card! - where as in Hyperterminal I get 1 long
string. I have no Idea why the event would be raised 3 times? any
suggestions? I would like to break away from the MSComm control purely because I want a
..NET component, but this product I want to make will be sold so I am screwed
by open source liscence agreements!lol Please can someone give me some help or point me in a direction where I
can find this sort of stuff explained in plain english:) Thanks Kevin
Hi Alex
How do I actually use these classes in my application? I somehow think I need to create my own classes that derive from these, but what do I need to do, and which ones do I derive from!
Thanks for any help, and thanks to all you other guys for all your inpu
Kevi
----- Alex Moskalyuk wrote: ----
I've used the library from GotDotNe http://www.gotdotnet.com/Community/U...a7-73e09c4d589
for my applications
With the exception of few bugs and some error handling the library seems t
work fine
Alex Moskalyu
_______________ _______________ __ http://www.techinterviews.co
"Kevin" <an*******@disc ussions.microso ft.com> wrote in messag
news:88******** *************** ***********@mic rosoft.com.. Hi all I am having a problem reading from a serial port, first of all I have no
resorted to using the MSComm ActiveX control on my Windows Forms to provid
me with the interface to my serial port. is there no other way to do this
it has to be simple or well explained because I'm still new to the .NE
world and c#. I did stumble across an article on the MSDN site where
downloaded a file NetSerialComm.e xe - I think it was from one of the msd
magazines? But anyway I don't know what the heck is going on here! there ar
so many classes, I don't know which ones to instantiate or if I'm suppose
to write my own classes derived from these?! I would just like somethin
simple that would give me the capabilities of reading and writing to
comport. I know that for reading a port is alot harder than writing to on
because you're not really in control, you basically have to do it on a
Event basis - but I don't know how to construct me form/class to raise a
event when data is coming through the port Plainly put, that is why I resorted to the MSComm.ocx. But now when I se
my Card reader up and I plug it in and I swipe my transponder card th
OnComm event of the Active X control executes 3 times and I get 3 section
of the number thats on the card! - where as in Hyperterminal I get 1 lon
string. I have no Idea why the event would be raised 3 times? an
suggestions I would like to break away from the MSComm control purely because I want
..NET component, but this product I want to make will be sold so I am screwe
by open source liscence agreements!lo Please can someone give me some help or point me in a direction where
can find this sort of stuff explained in plain english: Thank Kevi
On Tue, 04 May 2004 08:37:08 -0700, "Kevin P. Fleming"
<kp*******@back tobasicsmgmt.co m> wrote: The Real Andy wrote:
I use the BaseComm class provided by GotDotNet. I heard a rumour that this will be similar to the class that MS is supposed to be providing in the future. Using the line term class is very similay to using MSComm
Searching on GotDotNet (and Google) didn't turn up any hits for that... can you provide a link? Thanks. http://msdn.microsoft.com/msdnmag/is...m/default.aspx
Have a good read through the examples, they are quite comprehensive.
The VB implementation uses the LineTerm class, which is probably the
easist. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Daniel Åberg |
last post by:
I can't find how I can, in c#, open a serial port and
read and write to it. Anyone that knows if there is any
namespace with methods or code example.
|
by: rusttree |
last post by:
Many moons ago, I took a class in embedded control at school. The
course focused on a micro-controller mounted on a small electric car
that was programmed using simple C code. The micro-controller chip had
several pins, some of which were for output and some were for input.
The crux of the project was to make the program set the ouput pins to
high or low to drive the servos and motors and read the input pins that
were attached to various...
|
by: Kevin |
last post by:
Hi All
I got some good responses from some of you guys regarding me serial port interfacing problem that I posted a little while back. However your help leaded me to this link belo
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=9dde5cf3-4842-4d4b-baa7-73e09c4d589
Now my questions is - forgive me because I am still new at c# - that how do I use these clases? I think I need to build my own classes that inherit from...
|
by: Tom |
last post by:
I am new to hardware programming.
I need to write a program for reading data from Card Reader which connects
to the PC windows 2000/XP OS through Interfacing The Serial / RS-232 Port /
USB / Bluetooth / Infrared.
May I ask does serial port equal to com port?
The program needs to read and write data of the smart card which places on
top of the card reader. The card reader has serveral models, they support
|
by: raza |
last post by:
i have to access the serial port for controlling hardware, i have found the php_ser.dll for serial communication. but this dll is for windows only. i need to do the same job on linux plateform.i need the dll for linux that can receive or transmit data on serial port .so help me
| |
by: dev |
last post by:
hi
i want to know about interfacing or accessing a serial port using
c-program please help me with an example thanks for whom who reply
me soon
|
by: karthi84 |
last post by:
hi friends,
my friend recently has imported a hp pc which has no serial port in it. he has an external modem which is to be interfaced to it. i heard about a serial to usb cable. can any one suggest me will it be useful. does it require any driver for interfacing a modem. as i have asked the cable is not shipped with any drivers.
can any one suggest me a better solution for this.
|
by: Ajay Nayak |
last post by:
I want to know how to access serial port data in a file using c & c++
with respect to window98 ,win2000 & win xp OS ?
Ajay
|
by: ashish.sadanandan |
last post by:
Hi,
I'm not sure whether this is the right newsgroup to post this question
in, if it isn't please accept my apologies (and I'd really appreciate
it if you could point me to the correct one).
I'm not very familiar with XML, XSLT etc. so this may sound totally
outrageous but here's what I have in mind:
The problem is creating a dynamic user interface that talks to some
hardware that my company makes. We want to get away from C++ because...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |