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 5504
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: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
| |