I am developing a WinCE application (.Net 3.5) which allow connection to terminal via TCPIP, Serial Port and USB.
TCPIP and Serial Port is done but USB is problematic. As the client need to see proof on USB can be done, we need to prove that we can send Hex command through ActiveSync.
I have google for some time and found that ActiveSync/WMDC will provide IP to allow connection with each other. The problem is i couldn't ping or connect via C# socket from PC to WinCE via ActiveSync/WMDC.
The only thing i know is that my WinCE IP when connecting to PC is:
IP Address : 192.168.55.101
Subnet Mask : 255.255.255.0
Default Gateway: 192.168.55.100
Primary DNS : 127.0.0.1
Below is my WinCE server code that i use to allow all connection from ActiveSync. I am reusing my TCPIP code to connect to ActiveSync.
_listener.Bind(new IPEndPoint(IPAddress.Any, _port));
_listener.Listen(100);
_listener.BeginAccept(ConnectionReady, null);
Is there anything that i have missed to allow connection with each other? Thanks in advance.
It seem that it is workable but not in a straight forward way.
Normally we will set the PC as Server while WinCE as Slave. In this case, it is in backwards. WinCE will be the host while PC will be the slave.
Below is my code that i have used to declare and start the connection:
And below is the class that i used to connect PC and WinCE via ActiveSync:
Hope this help.