Hi,
This may be a trivial question, but I could not find a straightforward
answer. I am using the OpenNETCF.IO.Serial library for serial
communication. All I need to do is listen for any incoming data.
However, when I send data to the device's serial port a dialog box pops
up that says "Desktop @19200 Status" and no data ever makes it to my
application. What is this dialog box? Does it have something to do
with AciveSync? I don't use ActiveSync to debug so I could remove it
from the CE image if necessary.

Thanks for your help.


Here is a code snippet (mostly from the OpenNETCF example):

public CScale()
{
portSettings = new HandshakeNone();
portSettings.BasicSettings.BaudRate = BaudRates.CBR_9600;
portSettings.BasicSettings.Parity = Parity.none;
portSettings.BasicSettings.StopBits = StopBits.one;
port = new Port("COM1:",portSettings);
port.RThreshold = 1; //event for every byte
// define an event handler
port.DataReceived +=new Port.CommEvent(port_DataReceived);
}

private void port_DataReceived()
{
// since RThreshold = 1, we get an event for every character
byte[] inputData = new byte[1];
// read the character
inputData = port.Input;
// display as text
System.Text.Encoding enc = System.Text.Encoding.ASCII;
data = enc.GetString(inputData, 0, inputData.Length);
}

Re: Trivial serial communication problem? by Paul

Paul
Tue Aug 23 10:33:14 CDT 2005

Tell us about the device on which you are running this stuff.

Paul T.

"bbomer" <bbomer@belcan.com> wrote in message
news:1124807981.049233.299850@g47g2000cwa.googlegroups.com...
> Hi,
> This may be a trivial question, but I could not find a straightforward
> answer. I am using the OpenNETCF.IO.Serial library for serial
> communication. All I need to do is listen for any incoming data.
> However, when I send data to the device's serial port a dialog box pops
> up that says "Desktop @19200 Status" and no data ever makes it to my
> application. What is this dialog box? Does it have something to do
> with AciveSync? I don't use ActiveSync to debug so I could remove it
> from the CE image if necessary.
>
> Thanks for your help.
>
>
> Here is a code snippet (mostly from the OpenNETCF example):
>
> public CScale()
> {
> portSettings = new HandshakeNone();
> portSettings.BasicSettings.BaudRate = BaudRates.CBR_9600;
> portSettings.BasicSettings.Parity = Parity.none;
> portSettings.BasicSettings.StopBits = StopBits.one;
> port = new Port("COM1:",portSettings);
> port.RThreshold = 1; //event for every byte
> // define an event handler
> port.DataReceived +=new Port.CommEvent(port_DataReceived);
> }
>
> private void port_DataReceived()
> {
> // since RThreshold = 1, we get an event for every character
> byte[] inputData = new byte[1];
> // read the character
> inputData = port.Input;
> // display as text
> System.Text.Encoding enc = System.Text.Encoding.ASCII;
> data = enc.GetString(inputData, 0, inputData.Length);
> }
>



Re: Trivial serial communication problem? by Chris

Chris
Tue Aug 23 10:36:35 CDT 2005

You probably have a desktop connection already set up for the port (is this
a non-PPC device?) and it's invoking it.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"bbomer" <bbomer@belcan.com> wrote in message
news:1124807981.049233.299850@g47g2000cwa.googlegroups.com...
> Hi,
> This may be a trivial question, but I could not find a straightforward
> answer. I am using the OpenNETCF.IO.Serial library for serial
> communication. All I need to do is listen for any incoming data.
> However, when I send data to the device's serial port a dialog box pops
> up that says "Desktop @19200 Status" and no data ever makes it to my
> application. What is this dialog box? Does it have something to do
> with AciveSync? I don't use ActiveSync to debug so I could remove it
> from the CE image if necessary.
>
> Thanks for your help.
>
>
> Here is a code snippet (mostly from the OpenNETCF example):
>
> public CScale()
> {
> portSettings = new HandshakeNone();
> portSettings.BasicSettings.BaudRate = BaudRates.CBR_9600;
> portSettings.BasicSettings.Parity = Parity.none;
> portSettings.BasicSettings.StopBits = StopBits.one;
> port = new Port("COM1:",portSettings);
> port.RThreshold = 1; //event for every byte
> // define an event handler
> port.DataReceived +=new Port.CommEvent(port_DataReceived);
> }
>
> private void port_DataReceived()
> {
> // since RThreshold = 1, we get an event for every character
> byte[] inputData = new byte[1];
> // read the character
> inputData = port.Input;
> // display as text
> System.Text.Encoding enc = System.Text.Encoding.ASCII;
> data = enc.GetString(inputData, 0, inputData.Length);
> }
>



Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 10:49:29 CDT 2005

I am running this on a Kontron MOPSlcd7 (PIII 700Mhz, 256 RAM,
etc...basically a desktop computer in a PC/104 form factor). It is a
non-PPC device running a standard Windows CE image that I built using
PB. I have other code that sends using the OpenNETCF.IO.Serial class
with no problems. The dialog box that pops up always says "Connecting
to host" then disappears after a while. I'm not sure what is trying to
connect since I built the CE image myself; the only thing I can think
of is ActiveSync. Note: it happens on all serial ports.


Re: Trivial serial communication problem? by Paul

Paul
Tue Aug 23 10:54:31 CDT 2005

Then you have an entry in a .dat file somewhere that's telling the system,
"When a serial cable is plugged in on this port, start ActiveSync" or "start
dialing dial-up networking". Remove that entry and you won't get the system
trying to establish a connection automatically. I'm not sure if removing AS
from the image entirely will remove that entry or not, but you could do
that, too, if you want to. Alternatively, you can probably just cancel the
connection attempt and then run your program.

Paul T.

"bbomer" <bbomer@belcan.com> wrote in message
news:1124812169.206680.321850@g44g2000cwa.googlegroups.com...
>I am running this on a Kontron MOPSlcd7 (PIII 700Mhz, 256 RAM,
> etc...basically a desktop computer in a PC/104 form factor). It is a
> non-PPC device running a standard Windows CE image that I built using
> PB. I have other code that sends using the OpenNETCF.IO.Serial class
> with no problems. The dialog box that pops up always says "Connecting
> to host" then disappears after a while. I'm not sure what is trying to
> connect since I built the CE image myself; the only thing I can think
> of is ActiveSync. Note: it happens on all serial ports.
>



Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 11:37:18 CDT 2005

I only have one .dat file in the \Windows directory. It is named
"initobj.dat" and as far as I can tell, it contains no information on
serial connections. What would a reference to to serial communication
look like in a .dat file? Is there somewhere else that a .dat file
would normally be located? I have not created any intentionally
besides what PB would normally build.

Thanks for your help,
Brad


Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 11:41:03 CDT 2005

It occurs on all Com ports. So how would I know if a connection were
already set up? I think this may be the case, but I don't know what
application is doing it. Do you know of any standard PB components
that would do this?

Thanks for your help,
Brad


Re: Trivial serial communication problem? by Chris

Chris
Tue Aug 23 11:53:26 CDT 2005

Sounds like Dial-Up Networking is hijacking the port. What's in your
Control Panel -> Network and Dial Up Connections? Anything that uses the
COM ports? If so, modify your platform/project reg file to remove it.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"bbomer" <bbomer@belcan.com> wrote in message
news:1124815263.827134.311460@g47g2000cwa.googlegroups.com...
> It occurs on all Com ports. So how would I know if a connection were
> already set up? I think this may be the case, but I don't know what
> application is doing it. Do you know of any standard PB components
> that would do this?
>
> Thanks for your help,
> Brad
>



Re: Trivial serial communication problem? by Paul

Paul
Tue Aug 23 11:53:43 CDT 2005

Whoops. Sorry, it's a .db file. Datasync.db sets up an entry to start
repllog (ActiveSync), when the serial cable is attached. This file is
combined with other .db files that various parts of the system might have
during the build process in Platform Builder to create the final database
that is part of nk.bin.

Paul T.

"bbomer" <bbomer@belcan.com> wrote in message
news:1124815038.644020.291020@g47g2000cwa.googlegroups.com...
>I only have one .dat file in the \Windows directory. It is named
> "initobj.dat" and as far as I can tell, it contains no information on
> serial connections. What would a reference to to serial communication
> look like in a .dat file? Is there somewhere else that a .dat file
> would normally be located? I have not created any intentionally
> besides what PB would normally build.
>
> Thanks for your help,
> Brad
>



Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 13:11:13 CDT 2005

Ok, I have a little more information. I tried connecting serially
using HyperTerminal and I got this message: "CLIENT" repeating every
few seconds. It seems to eventually time out and the connection dialog
box disappears.


Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 13:21:46 CDT 2005

The only thing listed in Network and Dial Up Connections is the
Ethernet adapter.


Re: Trivial serial communication problem? by Paul

Paul
Tue Aug 23 13:34:00 CDT 2005

The Desktop @ 19200 thing is in the registry, but it's not fully-defined or
something (you can't, for example, use it to actually establish a
connection). If the problem is that it's popping up, you've got a set of
entries that are telling the OS, when that cable is plugged in, do this and
'this' is probably 'run ActiveSync'.

I gave you the information about where that comes from in the other part of
the thread. If you want it to go away, you'll have to arrange to replace
datasync.db in the flat release directory before the image make is
initiated.

Paul T.

"bbomer" <bbomer@belcan.com> wrote in message
news:1124821306.000691.198330@g49g2000cwa.googlegroups.com...
> The only thing listed in Network and Dial Up Connections is the
> Ethernet adapter.
>



Re: Trivial serial communication problem? by Chris

Chris
Tue Aug 23 13:35:36 CDT 2005

That's ActiveSync trying to connect. Did you take Bruce's advice and look
at the "PC Connection" in the Control panel?

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"bbomer" <bbomer@belcan.com> wrote in message
news:1124820673.871500.124960@g49g2000cwa.googlegroups.com...
> Ok, I have a little more information. I tried connecting serially
> using HyperTerminal and I got this message: "CLIENT" repeating every
> few seconds. It seems to eventually time out and the connection dialog
> box disappears.
>



Re: Trivial serial communication problem? by Chris

Chris
Tue Aug 23 13:59:08 CDT 2005

I think I'm confused. Is the box popping up when the cable is attached, or
only when you open the port and try to send data?

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:eDgm3EBqFHA.1024@TK2MSFTNGP09.phx.gbl...
> The Desktop @ 19200 thing is in the registry, but it's not fully-defined
> or something (you can't, for example, use it to actually establish a
> connection). If the problem is that it's popping up, you've got a set of
> entries that are telling the OS, when that cable is plugged in, do this
> and 'this' is probably 'run ActiveSync'.
>
> I gave you the information about where that comes from in the other part
> of the thread. If you want it to go away, you'll have to arrange to
> replace datasync.db in the flat release directory before the image make is
> initiated.
>
> Paul T.
>
> "bbomer" <bbomer@belcan.com> wrote in message
> news:1124821306.000691.198330@g49g2000cwa.googlegroups.com...
>> The only thing listed in Network and Dial Up Connections is the
>> Ethernet adapter.
>>
>
>



Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 14:17:10 CDT 2005

Only when I try to send data.


Re: Trivial serial communication problem? by bbomer

bbomer
Tue Aug 23 14:18:26 CDT 2005

Yes, that makes the dialog box go away, but does data still does not
make it to my application.