Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Serial Port Communication

Posted on 2004-07-31
18
Medium Priority
?
51,342 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 600 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

704 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