Solved

Serial Port Communication

Posted on 2004-07-31
18
51,314 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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
 
LVL 4

Expert Comment

by:xPert_Umer
ID: 14739981
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now