We want our PPC devices to be able to connect with some of our equipment out
in the field to upload or download a file and read equipment status.

Currently, we have Serial connections on the equipment, but we might be able
to go BlueTooth in the future.

How should I go about creating this? Should I look into Sockets, or is there
something else?

I need some help getting started.

Thanks!

Re: Communications Technique by ctacke/>

ctacke/>
Thu Feb 22 15:54:06 CST 2007

Bluetooth generally uses a serial protocol, not sockets, so just use the
same serial commands.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Joe" <Joe@discussions.microsoft.com> wrote in message
news:A4AD4440-3F3A-43F5-B926-AF36378017CA@microsoft.com...
> We want our PPC devices to be able to connect with some of our equipment
> out
> in the field to upload or download a file and read equipment status.
>
> Currently, we have Serial connections on the equipment, but we might be
> able
> to go BlueTooth in the future.
>
> How should I go about creating this? Should I look into Sockets, or is
> there
> something else?
>
> I need some help getting started.
>
> Thanks!



Re: Communications Technique by Joe

Joe
Thu Feb 22 16:33:52 CST 2007

Ok.

I used Peter Foot's "idiot proof" site to learn that my Siemens device uses
Wildcomm's bluetooth.

Is there an example somewhere on how to open a serial port? Is it the same
for bluetooth?

One of the posts somewhere on here said something about using CreateFile
with the COM port (COM7 was his bluetooth). If I use CreateFile with a COM
port, would it matter if I were sending data out the serial port or the
bluetooth radio? If it were the bluetooth radio, would I be able to send and
receive the same using Microsoft's version of bluetooth?

It would be nice if I could simply specify what my port was (Serial,
Wildcomm/Broadcom, or Microsoft), open the port, do my read or write, then
close the port when I'm done. Is that a world of make-believe?

Re: Communications Technique by ctacke/>

ctacke/>
Thu Feb 22 18:14:45 CST 2007

Both Widcomm and MS expose a virtual serial port, so you just open the port
as if it were any other serial port and use it. The only exception is that
often BT (for whatever reason) sometimes send and receive on different
ports.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Joe" <Joe@discussions.microsoft.com> wrote in message
news:D380BEE3-513A-4F75-A35D-3484CA5878F9@microsoft.com...
> Ok.
>
> I used Peter Foot's "idiot proof" site to learn that my Siemens device
> uses
> Wildcomm's bluetooth.
>
> Is there an example somewhere on how to open a serial port? Is it the same
> for bluetooth?
>
> One of the posts somewhere on here said something about using CreateFile
> with the COM port (COM7 was his bluetooth). If I use CreateFile with a COM
> port, would it matter if I were sending data out the serial port or the
> bluetooth radio? If it were the bluetooth radio, would I be able to send
> and
> receive the same using Microsoft's version of bluetooth?
>
> It would be nice if I could simply specify what my port was (Serial,
> Wildcomm/Broadcom, or Microsoft), open the port, do my read or write, then
> close the port when I'm done. Is that a world of make-believe?



Re: Communications Technique by Peter

Peter
Fri Feb 23 02:35:25 CST 2007

Unfortunately its not that simple because the way the ports are configured
varies between Bluetooth stacks and devices. Prior to WM5.0 the Microsoft
stack exposed ports, one for connected to remote devices and the other for
connections initiated remotely. WM5.0 introduces an extra page to the
Bluetooth settings dialog to map COM ports to devices, depending on the
windows mobile device you may have 1 or more ports available for connecting
to remote devices. With the Microsoft stack COM port emulation is for legacy
support only, you have a lot more flexibility using the Sockets API.
In contrast Widcomm is based solely around com ports (no sockets support).

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"Joe" <Joe@discussions.microsoft.com> wrote in message
news:D380BEE3-513A-4F75-A35D-3484CA5878F9@microsoft.com...
> Ok.
>
> I used Peter Foot's "idiot proof" site to learn that my Siemens device
> uses
> Wildcomm's bluetooth.
>
> Is there an example somewhere on how to open a serial port? Is it the same
> for bluetooth?
>
> One of the posts somewhere on here said something about using CreateFile
> with the COM port (COM7 was his bluetooth). If I use CreateFile with a COM
> port, would it matter if I were sending data out the serial port or the
> bluetooth radio? If it were the bluetooth radio, would I be able to send
> and
> receive the same using Microsoft's version of bluetooth?
>
> It would be nice if I could simply specify what my port was (Serial,
> Wildcomm/Broadcom, or Microsoft), open the port, do my read or write, then
> close the port when I'm done. Is that a world of make-believe?


Re: Communications Technique by Joe

Joe
Fri Feb 23 08:19:17 CST 2007

Peter, thanks for that web page. I appreciate easy to grasp concepts like that.

So Microsoft can use the COM port (though the Sockets API would be richer)
as well as Widcomm ...and a straight serial device.

Ok, so for the least amount of code and greatest flexability, I'll just open
an available COM port, negotiate a connection speed, and be on my way.

If that's wrong, please let me know.

Re: Communications Technique by Peter

Peter
Fri Feb 23 08:44:21 CST 2007

Yes, the only issue you'll have is identifying the right COM port to use on
the specific device (the user may have to manually setup the COM port
mapping for the remote device first and then choose this COM port in your
app).

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"Joe" <Joe@discussions.microsoft.com> wrote in message
news:C0B76724-15A8-4D96-91EA-A4DFCF334628@microsoft.com...
> Peter, thanks for that web page. I appreciate easy to grasp concepts like
> that.
>
> So Microsoft can use the COM port (though the Sockets API would be richer)
> as well as Widcomm ...and a straight serial device.
>
> Ok, so for the least amount of code and greatest flexability, I'll just
> open
> an available COM port, negotiate a connection speed, and be on my way.
>
> If that's wrong, please let me know.


Re: Communications Technique by Dick

Dick
Fri Feb 23 11:29:56 CST 2007

Hi,

IMO, if you are using serial connections today, then the "easy and reliable"
method for implementing the comms in the future is to stick with serial.
Bluetooth is just a wireless serial connection. Any network communication
over BT requires the addition of a network stack (and has been done), but
this isn't needed for your application.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



Re: Communications Technique by Dick

Dick
Fri Feb 23 11:34:03 CST 2007

Hi,

Yes. You have to identify the port(s) in use -- one "outgoing" and one
"incomming." Then use these two ports to send and receive data (incomming
to send data, and outgoing to receive data).

While Peter says this is legacy support, IMO it is more than that. This is
the lowest level access to the BT communications, and would be -- by far --
the easiest to use for your application.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.



RE: Communications Technique by Joe

Joe
Fri Feb 23 15:01:13 CST 2007

Ok, I've found an example in the Sample folder (i.e. "C:\Program
Files\Windows CE Tools\wce420\POCKET PC 2003\Samples\Win32").

The example is Tty, and it seems to be running a Hyperterminal looking app
between my PPC and my PC.

I'm trying to find out the basics that I'm going to need to connect, read
some values, then send or receive a file.

During my investigation, I've come across GetCommState, GetCommTimeouts, and
GetCommModemStatus, which are WINAPI functions defined in winbase.h. These
are are not in the PPC Help, but do appear online in MSDN. Is there a way to
get my PPC's Help updated to include Communications?

Also, Chris: How did you make your display name come up <ctacke/>? I tried
playing around with my display name (like <jpool/>), but I was promptly told
that I was using illegal characters. :) I'd just like a way to distinguish
*this* Joe from the others.

Re: Communications Technique by ctacke/>

ctacke/>
Fri Feb 23 15:22:02 CST 2007

These are really common, so I just checked my eVC 4.0 help and they are
definitely there.

As for the display name, I just typed it into my news reader (Outlook
Express).


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


"Joe" <Joe@discussions.microsoft.com> wrote in message
news:73BFC3B4-6D58-455C-BCAC-8CA33D7DEC6F@microsoft.com...
> Ok, I've found an example in the Sample folder (i.e. "C:\Program
> Files\Windows CE Tools\wce420\POCKET PC 2003\Samples\Win32").
>
> The example is Tty, and it seems to be running a Hyperterminal looking app
> between my PPC and my PC.
>
> I'm trying to find out the basics that I'm going to need to connect, read
> some values, then send or receive a file.
>
> During my investigation, I've come across GetCommState, GetCommTimeouts,
> and
> GetCommModemStatus, which are WINAPI functions defined in winbase.h. These
> are are not in the PPC Help, but do appear online in MSDN. Is there a way
> to
> get my PPC's Help updated to include Communications?
>
> Also, Chris: How did you make your display name come up <ctacke/>? I tried
> playing around with my display name (like <jpool/>), but I was promptly
> told
> that I was using illegal characters. :) I'd just like a way to distinguish
> *this* Joe from the others.



Re: Communications Technique by jp2code

jp2code
Fri Feb 23 15:52:23 CST 2007

Ah! Outlook Express. Yes, I often overlook that one. Got it, now. Thanks!

So, these are in your eVC4? My "About" says I have 4.00.1610.0. Is there
something I missed?