Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / Platform Builder / October 2008

Tip: Looking for answers? Try searching our database.

Socket Communication over Active Sync

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jack - 30 Sep 2008 12:25 GMT
Hi

I try to communicate from the Desktop to a Windows CE Device by using
Sockets over Active Sync.
When i have a Socket-Server on the Windows Desktop (listening on a IP
address of a Network card, lets say 192.168.0.111), I can connect a
Socket-Client running on the Windows CE device to this Server.

But when I try to do the same vice versa It doesn't work. Is this
possible at all?
Ranjit - 30 Sep 2008 14:45 GMT
yeah I think It should work ...Can U give some more inputs ...then I can able
to tell some thing.

Ranjit
e-consystems.com

> Hi
>
[quoted text clipped - 6 lines]
> But when I try to do the same vice versa It doesn't work. Is this
> possible at all?
Jack - 30 Sep 2008 15:46 GMT
I created a TCP/IP socket - server on the device that listens at a
certain port, and a Client on the Desktop that tries to connect to the
IP address that is assigned when the device is connected to the PC by
USB (got the IP by using the IPCONFIG cmd call on the CE device).

I can't even ping the windows CE device from the desktop.
Chris Tacke, eMVP - 30 Sep 2008 16:54 GMT
Ping shouldn't work.  ActiveSync doesn't pass though ICMP - it's not a full
network connection.

Signature

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

>I created a TCP/IP socket - server on the device that listens at a
> certain port, and a Client on the Desktop that tries to connect to the
> IP address that is assigned when the device is connected to the PC by
> USB (got the IP by using the IPCONFIG cmd call on the CE device).
>
> I can't even ping the windows CE device from the desktop.
Paul G. Tobey [eMVP] - 30 Sep 2008 17:47 GMT
You made really sure that you're being as open to accepting connections as
possible?  You didn't bind, for example, the socket to a particular IP on
the device, did you?  You were careful to put things that need to be in
network byte order in the right order?  htons() on the port number, for
example?  What error did the PC side get?

Paul T.

>I created a TCP/IP socket - server on the device that listens at a
> certain port, and a Client on the Desktop that tries to connect to the
> IP address that is assigned when the device is connected to the PC by
> USB (got the IP by using the IPCONFIG cmd call on the CE device).
>
> I can't even ping the windows CE device from the desktop.
Jack - 02 Oct 2008 09:48 GMT
Thanks for the help.

I do not bind to a particular IP Address (socketAddr.sin_addr.s_addr =
INADDR_ANY), but I listen to a certain Port (socketAddr.sin_port =
htons(1999).
The client on the PC just simply cannot connect to the server on the
device (Error = WSAETIMEDOUT).

When i do the same with RNDIS connection it works fine.
Paul G. Tobey [eMVP] - 02 Oct 2008 17:35 GMT
> I do not bind to a particular IP Address (socketAddr.sin_addr.s_addr =
> INADDR_ANY), but I listen to a certain Port (socketAddr.sin_port =
> htons(1999).
> The client on the PC just simply cannot connect to the server on the
> device (Error = WSAETIMEDOUT).

Give us the details of the device, OS, version, ActiveSync, etc., but,
generally, I see what you're seeing when using AS4.2 and serial
communications with my CE device.  The ActiveSync 'network' connection must
be either entirely preventing outgoing connections or at least preventing
connections to random TCP ports.

> When i do the same with RNDIS connection it works fine.

You lost me with this statement.  Ethernet connections work, of course...

Paul T.
Jack - 06 Oct 2008 07:07 GMT
I use AS version 4.5 together with a ARM Windows Embedded CE 6.0 (QFE
until April 08) BSP.

Due to some researched i think that the DTPT sevice which is running
on the Windows XP by default is responsible that it works in one
direction (Server on the PC, client on the Device) and the missing
DTPT services on the Windows CE device could be a reason why it is not
working vice versa.
Paul G. Tobey [eMVP] - 06 Oct 2008 18:12 GMT
So, you've got what you need?

Paul T.

>I use AS version 4.5 together with a ARM Windows Embedded CE 6.0 (QFE
> until April 08) BSP.
[quoted text clipped - 4 lines]
> DTPT services on the Windows CE device could be a reason why it is not
> working vice versa.
Jack - 06 Oct 2008 19:51 GMT
no, i do need the scenario where i can run a "server" on the windows
ce device (by using Active Sync)
Paul G. Tobey [eMVP] - 06 Oct 2008 20:11 GMT
You can't do it, based on our research.  If the network stack doesn't route
the packets because "ActiveSync" doesn't act like a real network adapter,
you can't somehow force it to work.  Take a look at the results of 'ipconfig
/all' on the PC when the device is connected with ActiveSync.  I think
you'll see nothing related to ActiveSync.  If that's the case, what's going
on in the other direction is that ActiveSync is getting something via serial
(custom format), and is deciding how to make that appear on the PC's
network.  That is, there's no network there to use in the other direction.
Think about how you could do this either using RAPI to tell the device to do
things or making the PC the server and the Windows CE device the client.

Again, you've told us *how* you're planning to fix the problem, *not* what
the actual problem is.  It's the equivalent of saying, "I have to replace
the pistons in my car.  How do I do that?", rather than saying, "I have an
unusual noise from the engine compartment when X, Y, Z, but not when A.
What should I do?"   You might get a perfectly reasonable answer to the
first question, but if the pistons aren't the problem, you've wasted
everyone's time and money.  The second question directs the discussion to
the *actual problem*, absent your own assumptions about the right thing to
do and will usually get a better response.

Paul T.

> no, i do need the scenario where i can run a "server" on the windows
> ce device (by using Active Sync)
Jack - 06 Oct 2008 21:53 GMT
alright, thanks for the patience.

here is the scenario:
i need to run a web service on the windows ce 6.0 device, as well as
the data synchronisation over Active Sync is a requirement. Since only
one USB service can run at the same time I need to decide on either
Active Sync or RNDIS profile (with wich the problem of the Server
could be solved, as you mentioned right, but not the Data Sync). This
device is headless so there is no chance of a user interaction to
select the needed mode.

Another post on this newsgroup of me, discuss the topic Active Sync
over RNDIS which would solve my problem. But as I see there is no way
to establish an Active Sync connection over RNDIS in Windows Embedded
CE 6.0.
Paul G. Tobey [eMVP] - 06 Oct 2008 22:06 GMT
What are you syncing to the device over ActiveSync?  Files?  You could write
your own sync stuff for something as simple as that and do everything
without the serial connection.  I can't imagine that you're syncing calendar
items, contacts, favorites, or notes, or are you?  It seems likely that
doing the sync yourself over the network is going to be more-reasonable than
trying to make ActiveSync be a real network connection, at least.

Paul T.

> alright, thanks for the patience.
>
[quoted text clipped - 11 lines]
> to establish an Active Sync connection over RNDIS in Windows Embedded
> CE 6.0.
Jack - 07 Oct 2008 09:13 GMT
Paul, thanks for the reply.

You are right, I do not need to sync calendar entries and stuff like
that.
Its pure data exchange only. Therefore I could write an own Exchange
client which is based on RNDIS.
Two reasons why i do not like to go for it:
1. The user is alredy used and familiar with Active Sync
2. There exist already some desktop Applications which use RAPI
Paul G. Tobey [eMVP] - 07 Oct 2008 16:12 GMT
Well, you're going to have to choose.  Web services on the device or
ActiveSync?

Paul T.

> Paul, thanks for the reply.
>
[quoted text clipped - 5 lines]
> 1. The user is alredy used and familiar with Active Sync
> 2. There exist already some desktop Applications which use RAPI
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.