Solved

Serial Port Communication

Posted on 2004-07-31
18
51,339 Views
Last Modified: 2012-06-22
G'day Everyone,

I want to write a Smart Device Application in C# which extracts the data from an external device connected to the iPaq through the serial port. How can I go about doing this? Any examples? Does Visual Studio .NET 2003 have any support for this? Thanks.
0
Comment
Question by:MastaBlasta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 3
  • +3
18 Comments
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 200 total points
ID: 11685038
http://opennetcf.org/CategoryView.aspx?category=Home contains IO.Serial which will allow you to handle the serial port ... also it includes copious examples and alot of other usefull libraries. It is the extension to the compact framework everyone should have.
0
 

Author Comment

by:MastaBlasta
ID: 11685256
Thanks. I have downloaded the Smart Device Framework zip file. Where do I extract/install the framework libraries so that whenever I start an application in VS, I can get System.IO.Serial?
0
 

Author Comment

by:MastaBlasta
ID: 11685350
Got it. Thanks. Another question: I already have a pre-existing Smart Device application and I would be making changes to that in order to get the serial port communications working. Now to access openetcf libs I have to choose an OpenNetCF application. How can I alter my existing Smart Device code and also use the OpenNetCF libs like(using OpenNetCF.IO.Serial) at the same time? Sorry it may seem like a dumb question. :)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11685525
add a reference to the opennetcf dll that you want
0
 

Author Comment

by:MastaBlasta
ID: 11693146
Thank you once again gregory. One more question. If I have a cable with a serial connection on one end(which goes into the external device) and a sync cable connection on the other(which goes into the iPAQ), can I capture data by just using IO.Serial, i.e by using OpenNETCF lib? The cable that I have described is this: http://www.expansys.com/product.asp?code=I3600USBSERY
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11695126
providing that activesync isnt already running on the port otherwise you will get port open errors on both sides.
0
 

Author Comment

by:MastaBlasta
ID: 11696450
Sorry for hecking you gregory :-), but I just need to clear one little confusion of mine. I will attach an external device with my iPAQ, through a serial connection and the other end of that cable will plug into the iPAQ(sync connection). So now can I extract the data coming in from the device using *just* the IO.Serial lib or do I need to extract it from the sync connection, using some sync library?

Also, the ActiveSync needs to be turned off, is that correct?
0
 

Author Comment

by:MastaBlasta
ID: 11696457
I am increasing points too as I have really bombarded you with questions. :-)
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11697111
yes if activesync is running on the same port ... otherwise you can use just the serial.io library and treat it as a serial port...

the reasonit needs to be off is that serial ports generally dont like more than one app trying to use them.
0
 

Expert Comment

by:Lumica
ID: 11702152
Just a side note: it seems there will be support for serial communication in visual studio 2005.

Some more info at about the announcement:
http://blogs.msdn.com/junfeng/archive/2004/08/01/203813.aspx

and a few comments about the class itself:
http://weblogs.asp.net/pwilson/archive/2003/10/28/34218.aspx
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11705212
thats 2.0 of the framework ... they have not yet said if it will be supported in the compact framework.
0
 

Author Comment

by:MastaBlasta
ID: 11722858
Thanks for your help gregory.
0
 

Expert Comment

by:arindamgupta
ID: 13390038
Hi,

I need to query COMM port or serial port in .Net Compact Framework.
Can anyone please help me?

I need to connect a device via COMM / Serial Port to a PDA, and query the device from an application written on VB.Net...   on the PDA ??

Please help ....

Arindam Gupta
*****
0
 

Expert Comment

by:poojasureshkumar
ID: 14733525
Hi,
I need to connect device via TCP /IP and read the data on it's serial port. Is it possible in C#,win form. Pleas help me .

Thanks in Advance,
Suresh
*****
0
 

Expert Comment

by:poojasureshkumar
ID: 14733534
Hi,
I need to connect device via TCP /IP and read the data on it's serial port. Is it possible in C#,win form. Pleas help me .

Thanks in Advance,
Suresh
****
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 14734123
yes it is .. use the same library as listed here and the Tcp Classes in the framework.

Also I have editted your posts to remove phone numbers.
0
 

Expert Comment

by:poojasureshkumar
ID: 14734825
Thanks GregoryYoung..Let me try this code..
Once again Thanks for the help....
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question