Options for communication with the device

D

David

Hi,

I am looking at commincation options. Here are my thoughts so far, your
comments would be appreciated.

What I need to do is to be able to export from a desktop app and also allow
the desktop app to drag (import) from the pocket device. What I would also
like to do from the pocket device is to 'push' the data to the desktop app.
(I could also have the pocket device pull the data)

The data is typically XML files.

1. wifi: I would assume that I would need to have a server of some sort on
the pocket device. The desktop app would probably need to poll the network
for pocket devices in order to hook up.

2. Bluetooth: I have no ideas as to how I would implement this. Any
pointers?

3. USB: (not activesynch). Any ideas?

4. Activesynch: How would I hook into activesynch to synchronise my device?

Any other methods?

The way I am currently doing it is to explore the device from the desktop
and drag/drop the required XML file. This is a poor method of doing it. I
want to be able to have buttons on the device/desktop application that will
do all of the handling.

Any sample code / webpages with any of the above options would be very much
appreciated.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
B

Bjørn Brox

David skrev:
Hi,

I am looking at commincation options. Here are my thoughts so far, your
comments would be appreciated.

What I need to do is to be able to export from a desktop app and also allow
the desktop app to drag (import) from the pocket device. What I would also
like to do from the pocket device is to 'push' the data to the desktop app.
(I could also have the pocket device pull the data)

The data is typically XML files.

1. wifi: I would assume that I would need to have a server of some sort on
the pocket device. The desktop app would probably need to poll the network
for pocket devices in order to hook up.

2. Bluetooth: I have no ideas as to how I would implement this. Any
pointers?

3. USB: (not activesynch). Any ideas?

4. Activesynch: How would I hook into activesynch to synchronise my device?
RTFM
Any other methods?

You should not care about HOW the unit communicate, - the unit itself
takes care of which communication channel it is currently using.

You can use the built-in "Direct Push" technology, or you can set up a
webservice the unit can communicate with.
 
D

David

Thanks Bjorn...

I have the manual for the phone right next to me, but it only tells you how
to use activesynch, not how to program for it.

Any other pointers to the required reading would be appreciated.

(I am a seasoned developer but very new to writing for windows mobile)
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
P

Paul G. Tobey [eMVP]

Since you're posting to the Compact Framework group, we can assume that you
know how to use the .NET Framework on the desktop. Most of the
communication stuff is the same in the Compact Framework. There are a few
things that might not be supported in CF and there are certainly things that
are in CF that are not on the desktop (phone stuff, etc.)

It's not clear to me what user profile you're looking at there. Why would
you want to force the user to drag XML files around and what does "drag"
mean in this context?

You could certainly use standard network APIs, whether FTP, HTTP or just
some proprietary protocol you create yourself using sockets, to transfer the
data. You can decide whether the server is on the PC or on the device and
how to determine the IP address of each end of the communications channel.

You can do Bluetooth programming using sockets, also. The main problem
there is figuring out what Bluetooth services the device and the PC export.
You can't add any services yourself, so, if the phone, for example, doesn't
support the service you want to use (serial port, maybe), you're just out of
luck. I would guess that all Pocket PC devices that have Bluetooth will
allow you to create a virtual serial connection, though.

There's no such thing as "USB" in this context. USB device functionality is
tightly bound to what the device plugged into the PC says it is. If the
device says, "Hey, I'm a modem", the PC has to treat it as a modem. It
can't use the USB cable as a general-purpose communication medium. Since
99% of the time, the Pocket PC device is going to be an ActiveSync device,
as far as USB is concerned, that's what you should expect. However, on top
of ActiveSync, you can write network programs to communicate with the PC
which is hosting the Pocket PC. On each end, they just act like they're
talking over a regular Ethernet network, but the data gets transferred via
ActiveSync.

Now to your ActiveSync question. I'm afraid that you've baffled me with
this. You simply want to synchronize file1.xml on the PC to file1.xml on
the Pocket PC? You don't have to do *anything* to do that (I would have
thought that you'd have already seen this just playing around with the
device and ActiveSync). ActiveSync will synchronize files in a special
folder automatically (read the ActiveSync help). No work at all for you.
If you don't necessarily want a particular file, in a particular location to
always move back and forth, you can always write a Remote API (RAPI),
program for the desktop to control file movement. OpenNETCF has a wrapper
for RAPI so you can do this in managed code on the desktop.

Paul T.
 
D

David

Ah, Thanks Paul for the deep explanation.

Yes, your assumption is correct that I do know desktop .net. (I write
ASP.NET mainly).

I am very new to writing for mobile devices and didn't know how activesynch
works. I will look deeper into it. What I want to do is to be able to have
practically a hands free transfer (i.e. I don't wish to have to support
activesynch issues). Basically, I need to have on the desktop app a button
to press that will export the xml file to the pocketpc. The way I am
currently doing it is to drag and drop my file in windows explorer onto my
pocket device.

In my early understanding of activesynch (and seeing activesynch running on
my desktop), the synchronisation is a two way process, which may cause my
files to be overwritten (or does it?)


From a server point of view, if I have a server on both the desktop and the
pocket device (so that I control the direction), I assume that I can just
connect via the network name of the desktop and the network name of the
pocket pc, wether connected via USB, WIFI or whatever??? (I will leave
bluetooth out of the equation until I have more experience and can support
any potential issues.)

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
 
P

Paul G. Tobey [eMVP]

So, you figure that having to run a server on one or both sides of the
connection is going to be better than just using ActiveSync as a conduit for
files? I'd have to disagree with you there. ActiveSync itself, with
respect to synchronizing calendar, contacts, notes, etc. is kind of iffy,
but just using it as a means to move files around is pretty reliable.

The Pocket PC does not have a network name, probably, so connecting to a
server on that end is always a problem. If the PC has a network name which
the Pocket PC can resolve, it could always be the server and the Pocket
PC(s) could connect whenever it's convenient for them.

Again, we have a problem. You don't connect to the Pocket PC via USB. You
can use ActiveSync as a network conduit and that *might* be using USB as the
transport medium, but you can't just randomly plug the device into a USB
port on any PC and expect to send it data. You have to have ActiveSync on
that PC and your code will be network code, just like for WiFi or any other
network medium.

Paul T.


David said:
Ah, Thanks Paul for the deep explanation.

Yes, your assumption is correct that I do know desktop .net. (I write
ASP.NET mainly).

I am very new to writing for mobile devices and didn't know how
activesynch works. I will look deeper into it. What I want to do is to be
able to have practically a hands free transfer (i.e. I don't wish to have
to support activesynch issues). Basically, I need to have on the desktop
app a button to press that will export the xml file to the pocketpc. The
way I am currently doing it is to drag and drop my file in windows
explorer onto my pocket device.

In my early understanding of activesynch (and seeing activesynch running
on my desktop), the synchronisation is a two way process, which may cause
my files to be overwritten (or does it?)


From a server point of view, if I have a server on both the desktop and
the pocket device (so that I control the direction), I assume that I can
just connect via the network name of the desktop and the network name of
the pocket pc, wether connected via USB, WIFI or whatever??? (I will leave
bluetooth out of the equation until I have more experience and can support
any potential issues.)

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
 
D

David

Ah, OK.

Yes, I expect the activesynch software to be installed on the PC. I didn't
know that I could do that with activesynch. I will research more about how
it works.

Are there any hooks I can hook into with activesynch, for example, from the
desktop, tell AS that I want to send a file to a certain location within the
pocketpc?

On a regular windows network, I could just do something like xcopy
c:\myfile.xml \\server\share\folder\myfile.xml. Naturally (for me at least),
I can't do that with AS, yet that is the sort of thing that I would like to
do programmaticaly.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
So, you figure that having to run a server on one or both sides of the
connection is going to be better than just using ActiveSync as a conduit
for files? I'd have to disagree with you there. ActiveSync itself, with
respect to synchronizing calendar, contacts, notes, etc. is kind of iffy,
but just using it as a means to move files around is pretty reliable.

The Pocket PC does not have a network name, probably, so connecting to a
server on that end is always a problem. If the PC has a network name
which the Pocket PC can resolve, it could always be the server and the
Pocket PC(s) could connect whenever it's convenient for them.

Again, we have a problem. You don't connect to the Pocket PC via USB.
You can use ActiveSync as a network conduit and that *might* be using USB
as the transport medium, but you can't just randomly plug the device into
a USB port on any PC and expect to send it data. You have to have
ActiveSync on that PC and your code will be network code, just like for
WiFi or any other network medium.

Paul T.


David said:
Ah, Thanks Paul for the deep explanation.

Yes, your assumption is correct that I do know desktop .net. (I write
ASP.NET mainly).

I am very new to writing for mobile devices and didn't know how
activesynch works. I will look deeper into it. What I want to do is to be
able to have practically a hands free transfer (i.e. I don't wish to have
to support activesynch issues). Basically, I need to have on the desktop
app a button to press that will export the xml file to the pocketpc. The
way I am currently doing it is to drag and drop my file in windows
explorer onto my pocket device.

In my early understanding of activesynch (and seeing activesynch running
on my desktop), the synchronisation is a two way process, which may cause
my files to be overwritten (or does it?)


From a server point of view, if I have a server on both the desktop and
the pocket device (so that I control the direction), I assume that I can
just connect via the network name of the desktop and the network name of
the pocket pc, wether connected via USB, WIFI or whatever??? (I will
leave bluetooth out of the equation until I have more experience and can
support any potential issues.)

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:%[email protected]...
Since you're posting to the Compact Framework group, we can assume that
you know how to use the .NET Framework on the desktop. Most of the
communication stuff is the same in the Compact Framework. There are a
few things that might not be supported in CF and there are certainly
things that are in CF that are not on the desktop (phone stuff, etc.)

It's not clear to me what user profile you're looking at there. Why
would you want to force the user to drag XML files around and what does
"drag" mean in this context?

You could certainly use standard network APIs, whether FTP, HTTP or just
some proprietary protocol you create yourself using sockets, to transfer
the data. You can decide whether the server is on the PC or on the
device and how to determine the IP address of each end of the
communications channel.

You can do Bluetooth programming using sockets, also. The main problem
there is figuring out what Bluetooth services the device and the PC
export. You can't add any services yourself, so, if the phone, for
example, doesn't support the service you want to use (serial port,
maybe), you're just out of luck. I would guess that all Pocket PC
devices that have Bluetooth will allow you to create a virtual serial
connection, though.

There's no such thing as "USB" in this context. USB device
functionality is tightly bound to what the device plugged into the PC
says it is. If the device says, "Hey, I'm a modem", the PC has to treat
it as a modem. It can't use the USB cable as a general-purpose
communication medium. Since 99% of the time, the Pocket PC device is
going to be an ActiveSync device, as far as USB is concerned, that's
what you should expect. However, on top of ActiveSync, you can write
network programs to communicate with the PC which is hosting the Pocket
PC. On each end, they just act like they're talking over a regular
Ethernet network, but the data gets transferred via ActiveSync.

Now to your ActiveSync question. I'm afraid that you've baffled me with
this. You simply want to synchronize file1.xml on the PC to file1.xml
on the Pocket PC? You don't have to do *anything* to do that (I would
have thought that you'd have already seen this just playing around with
the device and ActiveSync). ActiveSync will synchronize files in a
special folder automatically (read the ActiveSync help). No work at all
for you. If you don't necessarily want a particular file, in a
particular location to always move back and forth, you can always write
a Remote API (RAPI), program for the desktop to control file movement.
OpenNETCF has a wrapper for RAPI so you can do this in managed code on
the desktop.

Paul T.

Thanks Bjorn...

I have the manual for the phone right next to me, but it only tells you
how to use activesynch, not how to program for it.

Any other pointers to the required reading would be appreciated.

(I am a seasoned developer but very new to writing for windows mobile)
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
David skrev:
Hi,

I am looking at commincation options. Here are my thoughts so far,
your comments would be appreciated.

What I need to do is to be able to export from a desktop app and also
allow the desktop app to drag (import) from the pocket device. What I
would also like to do from the pocket device is to 'push' the data to
the desktop app. (I could also have the pocket device pull the data)

The data is typically XML files.

1. wifi: I would assume that I would need to have a server of some
sort on the pocket device. The desktop app would probably need to
poll the network for pocket devices in order to hook up.

2. Bluetooth: I have no ideas as to how I would implement this. Any
pointers?

3. USB: (not activesynch). Any ideas?

4. Activesynch: How would I hook into activesynch to synchronise my
device?

RTFM
Any other methods?

You should not care about HOW the unit communicate, - the unit itself
takes care of which communication channel it is currently using.

You can use the built-in "Direct Push" technology, or you can set up a
webservice the unit can communicate with.

The way I am currently doing it is to explore the device from the
desktop and drag/drop the required XML file. This is a poor method of
doing it. I want to be able to have buttons on the device/desktop
application that will do all of the handling.

Any sample code / webpages with any of the above options would be
very much appreciated.
 
P

Paul G. Tobey [eMVP]

Not "hooks", but yes, RAPI, as I mentioned can be used to do many things.

ActiveSync is *not* responsible for \\<cedevicename>\<sharename>\<filename>
not working. There is not SMB server on the device. Even *that* is not the
fault of the underlying operating system, Windows CE. An SMB server *does*
exist for Windows CE 5.0 on which Pocket PC for Windows Mobile 5 and 6 is
based. The Windows Mobile guys just decided not to put it in the devices.
As far as copying files between c:\ and the mobile device, that's what I'm
saying: RAPI *can* do that. Hence, "If you don't necessarily want a
particular file, in a particular location to always move back and forth, you
can always write a Remote API (RAPI), program for the desktop to control
file movement."

Paul T.

David said:
Ah, OK.

Yes, I expect the activesynch software to be installed on the PC. I didn't
know that I could do that with activesynch. I will research more about how
it works.

Are there any hooks I can hook into with activesynch, for example, from
the desktop, tell AS that I want to send a file to a certain location
within the pocketpc?

On a regular windows network, I could just do something like xcopy
c:\myfile.xml \\server\share\folder\myfile.xml. Naturally (for me at
least), I can't do that with AS, yet that is the sort of thing that I
would like to do programmaticaly.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
So, you figure that having to run a server on one or both sides of the
connection is going to be better than just using ActiveSync as a conduit
for files? I'd have to disagree with you there. ActiveSync itself, with
respect to synchronizing calendar, contacts, notes, etc. is kind of iffy,
but just using it as a means to move files around is pretty reliable.

The Pocket PC does not have a network name, probably, so connecting to a
server on that end is always a problem. If the PC has a network name
which the Pocket PC can resolve, it could always be the server and the
Pocket PC(s) could connect whenever it's convenient for them.

Again, we have a problem. You don't connect to the Pocket PC via USB.
You can use ActiveSync as a network conduit and that *might* be using USB
as the transport medium, but you can't just randomly plug the device into
a USB port on any PC and expect to send it data. You have to have
ActiveSync on that PC and your code will be network code, just like for
WiFi or any other network medium.

Paul T.


David said:
Ah, Thanks Paul for the deep explanation.

Yes, your assumption is correct that I do know desktop .net. (I write
ASP.NET mainly).

I am very new to writing for mobile devices and didn't know how
activesynch works. I will look deeper into it. What I want to do is to
be able to have practically a hands free transfer (i.e. I don't wish to
have to support activesynch issues). Basically, I need to have on the
desktop app a button to press that will export the xml file to the
pocketpc. The way I am currently doing it is to drag and drop my file in
windows explorer onto my pocket device.

In my early understanding of activesynch (and seeing activesynch running
on my desktop), the synchronisation is a two way process, which may
cause my files to be overwritten (or does it?)


From a server point of view, if I have a server on both the desktop and
the pocket device (so that I control the direction), I assume that I can
just connect via the network name of the desktop and the network name of
the pocket pc, wether connected via USB, WIFI or whatever??? (I will
leave bluetooth out of the equation until I have more experience and can
support any potential issues.)

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message
Since you're posting to the Compact Framework group, we can assume that
you know how to use the .NET Framework on the desktop. Most of the
communication stuff is the same in the Compact Framework. There are a
few things that might not be supported in CF and there are certainly
things that are in CF that are not on the desktop (phone stuff, etc.)

It's not clear to me what user profile you're looking at there. Why
would you want to force the user to drag XML files around and what does
"drag" mean in this context?

You could certainly use standard network APIs, whether FTP, HTTP or
just some proprietary protocol you create yourself using sockets, to
transfer the data. You can decide whether the server is on the PC or
on the device and how to determine the IP address of each end of the
communications channel.

You can do Bluetooth programming using sockets, also. The main problem
there is figuring out what Bluetooth services the device and the PC
export. You can't add any services yourself, so, if the phone, for
example, doesn't support the service you want to use (serial port,
maybe), you're just out of luck. I would guess that all Pocket PC
devices that have Bluetooth will allow you to create a virtual serial
connection, though.

There's no such thing as "USB" in this context. USB device
functionality is tightly bound to what the device plugged into the PC
says it is. If the device says, "Hey, I'm a modem", the PC has to
treat it as a modem. It can't use the USB cable as a general-purpose
communication medium. Since 99% of the time, the Pocket PC device is
going to be an ActiveSync device, as far as USB is concerned, that's
what you should expect. However, on top of ActiveSync, you can write
network programs to communicate with the PC which is hosting the Pocket
PC. On each end, they just act like they're talking over a regular
Ethernet network, but the data gets transferred via ActiveSync.

Now to your ActiveSync question. I'm afraid that you've baffled me
with this. You simply want to synchronize file1.xml on the PC to
file1.xml on the Pocket PC? You don't have to do *anything* to do that
(I would have thought that you'd have already seen this just playing
around with the device and ActiveSync). ActiveSync will synchronize
files in a special folder automatically (read the ActiveSync help). No
work at all for you. If you don't necessarily want a particular file,
in a particular location to always move back and forth, you can always
write a Remote API (RAPI), program for the desktop to control file
movement. OpenNETCF has a wrapper for RAPI so you can do this in
managed code on the desktop.

Paul T.

Thanks Bjorn...

I have the manual for the phone right next to me, but it only tells
you how to use activesynch, not how to program for it.

Any other pointers to the required reading would be appreciated.

(I am a seasoned developer but very new to writing for windows mobile)
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
David skrev:
Hi,

I am looking at commincation options. Here are my thoughts so far,
your comments would be appreciated.

What I need to do is to be able to export from a desktop app and
also allow the desktop app to drag (import) from the pocket device.
What I would also like to do from the pocket device is to 'push' the
data to the desktop app. (I could also have the pocket device pull
the data)

The data is typically XML files.

1. wifi: I would assume that I would need to have a server of some
sort on the pocket device. The desktop app would probably need to
poll the network for pocket devices in order to hook up.

2. Bluetooth: I have no ideas as to how I would implement this. Any
pointers?

3. USB: (not activesynch). Any ideas?

4. Activesynch: How would I hook into activesynch to synchronise my
device?

RTFM
Any other methods?

You should not care about HOW the unit communicate, - the unit itself
takes care of which communication channel it is currently using.

You can use the built-in "Direct Push" technology, or you can set up
a webservice the unit can communicate with.

The way I am currently doing it is to explore the device from the
desktop and drag/drop the required XML file. This is a poor method
of doing it. I want to be able to have buttons on the device/desktop
application that will do all of the handling.

Any sample code / webpages with any of the above options would be
very much appreciated.
 
D

David

Thank you for taking the time to help me. I am now starting to understand
how it works.

I will research the RAPI.

As far as WIFI goes then, I will put that part of the project off (it is a
nice to have and will go into a future version, based on a webservice).
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%[email protected]...
Not "hooks", but yes, RAPI, as I mentioned can be used to do many things.

ActiveSync is *not* responsible for
\\<cedevicename>\<sharename>\<filename> not working. There is not SMB
server on the device. Even *that* is not the fault of the underlying
operating system, Windows CE. An SMB server *does* exist for Windows CE
5.0 on which Pocket PC for Windows Mobile 5 and 6 is based. The Windows
Mobile guys just decided not to put it in the devices. As far as copying
files between c:\ and the mobile device, that's what I'm saying: RAPI
*can* do that. Hence, "If you don't necessarily want a particular file,
in a particular location to always move back and forth, you can always
write a Remote API (RAPI), program for the desktop to control file
movement."

Paul T.

David said:
Ah, OK.

Yes, I expect the activesynch software to be installed on the PC. I
didn't know that I could do that with activesynch. I will research more
about how it works.

Are there any hooks I can hook into with activesynch, for example, from
the desktop, tell AS that I want to send a file to a certain location
within the pocketpc?

On a regular windows network, I could just do something like xcopy
c:\myfile.xml \\server\share\folder\myfile.xml. Naturally (for me at
least), I can't do that with AS, yet that is the sort of thing that I
would like to do programmaticaly.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:%[email protected]...
So, you figure that having to run a server on one or both sides of the
connection is going to be better than just using ActiveSync as a conduit
for files? I'd have to disagree with you there. ActiveSync itself,
with respect to synchronizing calendar, contacts, notes, etc. is kind of
iffy, but just using it as a means to move files around is pretty
reliable.

The Pocket PC does not have a network name, probably, so connecting to a
server on that end is always a problem. If the PC has a network name
which the Pocket PC can resolve, it could always be the server and the
Pocket PC(s) could connect whenever it's convenient for them.

Again, we have a problem. You don't connect to the Pocket PC via USB.
You can use ActiveSync as a network conduit and that *might* be using
USB as the transport medium, but you can't just randomly plug the device
into a USB port on any PC and expect to send it data. You have to have
ActiveSync on that PC and your code will be network code, just like for
WiFi or any other network medium.

Paul T.


Ah, Thanks Paul for the deep explanation.

Yes, your assumption is correct that I do know desktop .net. (I write
ASP.NET mainly).

I am very new to writing for mobile devices and didn't know how
activesynch works. I will look deeper into it. What I want to do is to
be able to have practically a hands free transfer (i.e. I don't wish to
have to support activesynch issues). Basically, I need to have on the
desktop app a button to press that will export the xml file to the
pocketpc. The way I am currently doing it is to drag and drop my file
in windows explorer onto my pocket device.

In my early understanding of activesynch (and seeing activesynch
running on my desktop), the synchronisation is a two way process, which
may cause my files to be overwritten (or does it?)


From a server point of view, if I have a server on both the desktop and
the pocket device (so that I control the direction), I assume that I
can just connect via the network name of the desktop and the network
name of the pocket pc, wether connected via USB, WIFI or whatever??? (I
will leave bluetooth out of the equation until I have more experience
and can support any potential issues.)

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message
Since you're posting to the Compact Framework group, we can assume
that you know how to use the .NET Framework on the desktop. Most of
the communication stuff is the same in the Compact Framework. There
are a few things that might not be supported in CF and there are
certainly things that are in CF that are not on the desktop (phone
stuff, etc.)

It's not clear to me what user profile you're looking at there. Why
would you want to force the user to drag XML files around and what
does "drag" mean in this context?

You could certainly use standard network APIs, whether FTP, HTTP or
just some proprietary protocol you create yourself using sockets, to
transfer the data. You can decide whether the server is on the PC or
on the device and how to determine the IP address of each end of the
communications channel.

You can do Bluetooth programming using sockets, also. The main
problem there is figuring out what Bluetooth services the device and
the PC export. You can't add any services yourself, so, if the phone,
for example, doesn't support the service you want to use (serial port,
maybe), you're just out of luck. I would guess that all Pocket PC
devices that have Bluetooth will allow you to create a virtual serial
connection, though.

There's no such thing as "USB" in this context. USB device
functionality is tightly bound to what the device plugged into the PC
says it is. If the device says, "Hey, I'm a modem", the PC has to
treat it as a modem. It can't use the USB cable as a general-purpose
communication medium. Since 99% of the time, the Pocket PC device is
going to be an ActiveSync device, as far as USB is concerned, that's
what you should expect. However, on top of ActiveSync, you can write
network programs to communicate with the PC which is hosting the
Pocket PC. On each end, they just act like they're talking over a
regular Ethernet network, but the data gets transferred via
ActiveSync.

Now to your ActiveSync question. I'm afraid that you've baffled me
with this. You simply want to synchronize file1.xml on the PC to
file1.xml on the Pocket PC? You don't have to do *anything* to do
that (I would have thought that you'd have already seen this just
playing around with the device and ActiveSync). ActiveSync will
synchronize files in a special folder automatically (read the
ActiveSync help). No work at all for you. If you don't necessarily
want a particular file, in a particular location to always move back
and forth, you can always write a Remote API (RAPI), program for the
desktop to control file movement. OpenNETCF has a wrapper for RAPI so
you can do this in managed code on the desktop.

Paul T.

Thanks Bjorn...

I have the manual for the phone right next to me, but it only tells
you how to use activesynch, not how to program for it.

Any other pointers to the required reading would be appreciated.

(I am a seasoned developer but very new to writing for windows
mobile)
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
David skrev:
Hi,

I am looking at commincation options. Here are my thoughts so far,
your comments would be appreciated.

What I need to do is to be able to export from a desktop app and
also allow the desktop app to drag (import) from the pocket device.
What I would also like to do from the pocket device is to 'push'
the data to the desktop app. (I could also have the pocket device
pull the data)

The data is typically XML files.

1. wifi: I would assume that I would need to have a server of some
sort on the pocket device. The desktop app would probably need to
poll the network for pocket devices in order to hook up.

2. Bluetooth: I have no ideas as to how I would implement this. Any
pointers?

3. USB: (not activesynch). Any ideas?

4. Activesynch: How would I hook into activesynch to synchronise my
device?

RTFM
Any other methods?

You should not care about HOW the unit communicate, - the unit
itself takes care of which communication channel it is currently
using.

You can use the built-in "Direct Push" technology, or you can set up
a webservice the unit can communicate with.

The way I am currently doing it is to explore the device from the
desktop and drag/drop the required XML file. This is a poor method
of doing it. I want to be able to have buttons on the
device/desktop application that will do all of the handling.

Any sample code / webpages with any of the above options would be
very much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top