Question

We are developing some device and we need to find good solution for one of needed functionality.

Thing is that we need communicate WinCE 6.0 (ARM) and Windows on PC. Easiest way is of course COM port but in our case it is impossible (all serial ports are used on WinCE and we don't want to add one more). Second option is LAN but for us it is not the best option for few reasons.

So there is third option we could use. USB to USB communication but how to do that ? Of course WinCE is USB Device and PC is USB Host so all hardware basics are meet.

We could use Active sync but there are few problems with it: - WinCE 6.0 is not working with WMDC (drivers on device just crash after connecting device with PC) and I didn't find any solution for it so in this case we need to use WinXP on PC side (old ActiveSync) - we need to filter communication with active sync to only our application, no other non authorized software should be allowed (what I know this is imposible to obtain).

So propably best way to do what we need is to communicate throug USB like standard COM (serial communication). The question is, how it could be made, are we need to write driver on WinCE and also a Driver on Windows (PC), or there are better solution? Maybe some driver for WinCE 6.0 that would emulate Virtual COM on PC side (and of course allow standard Read/Write to it on WinCE side) ? Could someone tell me if something like that exists ?

Was it helpful?

Solution

We probably found best solution for our problem. We use TCP/IP over ActiveSync (standard WinSock connection over USB). It is possible because ActiveSync provides an IP address for Host PC. It can be acquired trough something like that (on WinCE):

std::string lIPAddress = "ppp_peer";
struct hostent * lH = gethostbyname(lIPAddress.c_str());

DEBUGMSG(ZONE_ERROR, (TEXT("Addr: %S\r\n"), lH->h_addr_list[0])); // just a debug info
lServerAddress.sin_addr.S_un.S_addr = *(u_long *)lH->h_addr_list[0];

Of course this is not full example, it's just a sample :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top