HighTechTalks DotNet Forums  

using System.IO.Ports problem in Windows App

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss using System.IO.Ports problem in Windows App in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
HoustonK
 
Posts: n/a

Default using System.IO.Ports problem in Windows App - 12-28-2007 , 08:20 PM






Hi,

I have no problem to write and read through my COM1 in my app which created
in Console based application.

So far I tried which are successful in pc win app, pc console app and smart
device console app.

Once I used the Win app in smart device, there is a problem. So, there
isn't any error message when I initialized the com port as shown below:

private SerialPort _serialPort = new SerialPort("COM1", 38400, Parity.None,
8, StopBits.One);

But, I couldn't get the response from my serial device. Is there any
special tricks to initialize com port in CF 2.0 Win App? Or it didn't support.

Thank you.

-KK

Reply With Quote
  #2  
Old   
Ginny Caughey [MVP]
 
Posts: n/a

Default Re: using System.IO.Ports problem in Windows App - 12-29-2007 , 08:03 AM






Try using a colon after the port name.

--
Ginny Caughey
Device Application Development MVP


"HoustonK" <HoustonK (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have no problem to write and read through my COM1 in my app which
created
in Console based application.

So far I tried which are successful in pc win app, pc console app and
smart
device console app.

Once I used the Win app in smart device, there is a problem. So, there
isn't any error message when I initialized the com port as shown below:

private SerialPort _serialPort = new SerialPort("COM1", 38400,
Parity.None,
8, StopBits.One);

But, I couldn't get the response from my serial device. Is there any
special tricks to initialize com port in CF 2.0 Win App? Or it didn't
support.

Thank you.

-KK


Reply With Quote
  #3  
Old   
Rainer Borchmann
 
Posts: n/a

Default Re: using System.IO.Ports problem in Windows App - 12-29-2007 , 01:27 PM



"HoustonK" <HoustonK (AT) discussions (DOT) microsoft.com> schrieb

Quote:
Once I used the Win app in smart device, there is a problem. So, there
isn't any error message when I initialized the com port as shown below:
May be you need some other options like
DTS=ON ore DTR=ON

Rainer





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.