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. 8 5497
I don't believe there is any direct framework support for
this, so you are stuck using a third-party library (check
for serial classes on a site like codeguru.com) or
interfacing directly using Windows API calls (Createfile,
Readfile, Writefile, etc).
Darcy -----Original Message----- 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. .
Thanks for a quick reply. I still hope framework has
support for it because I realy need it. Anyone else that
are sure framework support it or not. -----Original Message----- I don't believe there is any direct framework support
forthis, so you are stuck using a third-party library
(checkfor serial classes on a site like codeguru.com) or interfacing directly using Windows API calls
(Createfile,Readfile, Writefile, etc).
Darcy
-----Original Message----- 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. . .
Here is a link to an MSDN Mag article that discusses some
techniques to access the serial port. Unfortunately it
seems to confirm the lack of direct support in the
framework. http://msdn.microsoft.com/msdnmag/is...0/NETSerialCom
m/
A search in Google will also yield a lot of commercially
available classes if you are developing this for a
business need.
HTH,
Darcy -----Original Message----- Thanks for a quick reply. I still hope framework has support for it because I realy need it. Anyone else that are sure framework support it or not.
-----Original Message----- I don't believe there is any direct framework support forthis, so you are stuck using a third-party library (checkfor serial classes on a site like codeguru.com) or interfacing directly using Windows API calls (Createfile,Readfile, Writefile, etc).
Darcy
-----Original Message----- 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. . . .
There's a sample class that works with COM interop to achive the serial port
functionality on gotdotnet.com [1]
--
Patrik Löwendahl
cshrp.net - " Elegant code by witty programmers "
cornerstone.se - " IT Training for professionals "
Mind line wraps
[1] http://www.gotdotnet.com/Community/U...f-0045b0c79ec7
<an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl... Here is a link to an MSDN Mag article that discusses some techniques to access the serial port. Unfortunately it seems to confirm the lack of direct support in the framework. http://msdn.microsoft.com/msdnmag/is...0/NETSerialCom m/
A search in Google will also yield a lot of commercially available classes if you are developing this for a business need.
HTH, Darcy
-----Original Message----- Thanks for a quick reply. I still hope framework has support for it because I realy need it. Anyone else that are sure framework support it or not.
-----Original Message----- I don't believe there is any direct framework support forthis, so you are stuck using a third-party library (checkfor serial classes on a site like codeguru.com) or interfacing directly using Windows API calls (Createfile,Readfile, Writefile, etc).
Darcy
-----Original Message----- 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. .
. .
Hello Daniel,
Thanks for posting in the group.
Darcy and Patrik are right. There is no direct framework class to develop
serial port application. We need to use PInvoke to call Win32 APIs to
achieve it. Some developers even wrapper all the related APIs in a .NET
class library, just as what Patrik posted. You could refer to it for code
samples.
By the way, if you don't want to expose your real email address in the
group to avoid spam virus email, you could register a no spam alias at: http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn.
Does that answer your question?
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Yet another gaping hole the size of the DeathStar in .NET.
Play the Spot The Gap doorstep challenge!!!
"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:Y0**************@cpmsftngxa06.phx.gbl... Hello Daniel,
Thanks for posting in the group.
Darcy and Patrik are right. There is no direct framework class to develop serial port application. We need to use PInvoke to call Win32 APIs to achieve it. Some developers even wrapper all the related APIs in a .NET class library, just as what Patrik posted. You could refer to it for code samples.
By the way, if you don't want to expose your real email address in the group to avoid spam virus email, you could register a no spam alias at: http://support.microsoft.com/default...sdn/nospam.asp &SD=msdn.
Does that answer your question?
Best regards, Yanhong Huang Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no
rights.
Thanks a lot. I have now a couple of suggestions that I
will start to test.
/Daniel -----Original Message----- Hello Daniel,
Thanks for posting in the group.
Darcy and Patrik are right. There is no direct framework
class to developserial port application. We need to use PInvoke to call
Win32 APIs toachieve it. Some developers even wrapper all the related
APIs in a .NETclass library, just as what Patrik posted. You could
refer to it for codesamples.
By the way, if you don't want to expose your real email
address in thegroup to avoid spam virus email, you could register a no
spam alias at:http://support.microsoft.com/default.aspx?
scid=/servicedesks/msdn/nospam.asp&SD=msdn.
Does that answer your question?
Best regards, Yanhong Huang Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and
confers no rights. .
:)
You are welcome. Also thanks to Darcy and Patrik for their contribution in
the thread.
Thanks for participating the community.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: collinm |
last post by:
hi
i send a command to a led display, the led display is suppose to return
me some character
i write a string on a serial port
void ledDisplayExist()
{
char msg={'\0', '\0', '\0', '\0',...
|
by: rowan |
last post by:
I'm writing a driver in Python for an old fashioned piece of serial
equipment. Currently I'm using the USPP serial module. From what I can
see all the serial modules seem to set the timeout when...
|
by: ghjk |
last post by:
I want to read sms from GSM modem using C# in serial communication. I wrote the code. But i want to do it automatically. I put my code here and please tell me how can i do it automatically.
...
|
by: ghjk |
last post by:
I'm write code to read data from GSM modem. but it couldn't read modem response. Could you please help me? I'll post my code.
using System;
using System.Collections.Generic;
using...
|
by: rfarley |
last post by:
Hi,
I am using the pyserial module and am trying to read the serial port from an accelerometer (LIS302DL).
It has an option in which you write "*debug\r\n" and then you read the data (three...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |