Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 51353
  • Last Modified:

Serial Port Communication

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
MastaBlasta
Asked:
MastaBlasta
  • 6
  • 6
  • 3
  • +3
1 Solution
 
gregoryyoungCommented:
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
 
MastaBlastaAuthor Commented:
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
 
MastaBlastaAuthor Commented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
gregoryyoungCommented:
add a reference to the opennetcf dll that you want
0
 
MastaBlastaAuthor Commented:
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
 
gregoryyoungCommented:
providing that activesync isnt already running on the port otherwise you will get port open errors on both sides.
0
 
MastaBlastaAuthor Commented:
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
 
MastaBlastaAuthor Commented:
I am increasing points too as I have really bombarded you with questions. :-)
0
 
gregoryyoungCommented:
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
 
LumicaCommented:
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
 
gregoryyoungCommented:
thats 2.0 of the framework ... they have not yet said if it will be supported in the compact framework.
0
 
MastaBlastaAuthor Commented:
Thanks for your help gregory.
0
 
arindamguptaCommented:
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
 
poojasureshkumarCommented:
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
 
poojasureshkumarCommented:
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
 
gregoryyoungCommented:
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
 
poojasureshkumarCommented:
Thanks GregoryYoung..Let me try this code..
Once again Thanks for the help....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 6
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now