invinJerry

Hi.

I wanted to send a txt or dat file or plain text from device (Windows CE 5.0) to a Desktop machine (Windows XP), or I wanted to read/copy a file (file sharing, if possible) from the device to the desktop (to develop an application running in Desktop PC and access the files in Windows CE). I am able to transfer files using Microsoft ActiveSync. But I need the file transfer using Wireless LAN, which is available with the machine. At present I am able to browse internet and i am also able to ping the machines both ways. But when I try to run something like \\172.22.3.77 or \\insipc093, to browse local (my) PC shared folder, it fails.

Also in a sample Smart Device Application (MFC) developed with Visual Studio 2005 and Platform SDK (STANDARD SDK 5) I used WNetAddConnection3 which fails with error code 53, which is not a normal error number for failure for this function.

Can anyone help me What I must be checking/doing to get these things right

NETRESOURCE nrConnectToServer;

nrConnectToServer.dwScope = RESOURCE_GLOBALNET;

nrConnectToServer.dwType = RESOURCETYPE_ANY;

nrConnectToServer.dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;

nrConnectToServer.dwUsage = RESOURCEUSAGE_CONNECTABLE;

nrConnectToServer.lpLocalName = NULL;

TCHAR* tszRemoteName = new TCHAR[128];

nrConnectToServer.lpRemoteName = tszRemoteName;

wsprintf(tszRemoteName, _T(\\\\insipc093\\CEShare)); //_T(\\\\172.22.3.77\\CEShare));

TCHAR* tszComment = new TCHAR[128];

nrConnectToServer.lpComment = tszComment;

tszComment[0] = _T('\0');

nrConnectToServer.lpProvider = NULL;

DWORD dwResult = WNetAddConnection3(this->m_hWnd, &nrConnectToServer, NULL, NULL, CONNECT_UPDATE_PROFILE);

It returns 53 as error code to dwResult.

Note: On consulting with my hardware team, he said that in the device there is some protocol missing from the TCP/IP, which is for network browsing/file sharing. Is there any specific protocol for the same can you help me out about that also

Thank you.




Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

ScubaSteve20001

As far as I know you cannot connect to one of your Windows shares via your Windows CE device. However there are other ways for you to do what you want to do. If you are going exclusively over activesync you can use RAPI, look in to opennetcf.org's implementation so that you don't have to roll your own. Then of course their are sockets. If you use sockets you will have to create a client and a server for your device and your desktop and then just connect and transfer files that way.




Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

ChrisDurbin

FTP the data. We do it here. If you need more info I will try to get with you tomorrow. I am leaving the office shortly for the rest of the day.






Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

Ilya Tumanov

It is in fact possible to connect Pocket PC (AKA WM6 Pro/Classic) device but not SmartPhone (AKA WM 6 Standard) to a file share on desktop. Since you're using Windows CE (are you sure it's not Windows Mobile ) that support might or might not be available in particular OS image as pretty much everything is optional on CE. Please contact device OEM to find out of network client is available. If not you would have to use something else, e.g. HTTP/FTP.






Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

invinJerry

Hi,

Thanks for youre reply Steve, Chris and Ilya.

Steve,
I can only go for the connection over Wireless LAN. So i think i cannot use ActiveSync. Now I will give a try using Sockets.

Chris,
I need data/file to be transfed between two applications running simultaneously in a Desktop and a Windows CE based device. Whee desktop process the file created by the device as an output of a process. I think i cant use FTP here.

Ilya,
I ll check with the OEM and see what is possible with the device and what is not.

Thank you. i will turn to you after my trial.






Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

ChrisDurbin

invinJerry

What we are doing here is sending our data to a "Temp" file on the server. We have a trigger on that file that waits and looks for any data to be transmitted, verifies we have received the entire transmission (via FPT) on the server, reformats the data, and returns a file to the client (Pocket PC via ftp) acknowledging receipt of a valid transmission. When a transmission is sent, the pocketPC looks for an acknowledgment file every time it connects until it gets one. Then the trigger program sends the reformated data on to the production files used on the server.

It is a fairly involved process by which our users in the market take orders offline on the PPC's (disconnected database), connect to the internet, and transmit them to the server. I do not know what your application requirements are, so I thought a brief description would help.






Re: Smart Devices General Send text data/file accross Windows CE device and Desktop PC.

invinJerry

My requirement is,

I have locan network (LAN), where we have a server (desktop) and number of devices with Windows CE platform. and i wanted to send file from client to server.

I have implemented this with sockets and it works fine. here from client i ll read the file and format it into some structur and send it over to the server, where it will create a file with the same contents.

Originally i want the server to read the file directly from the device without waiting for the device's permission etc.

Like reading a flie from a network share folder, which gives full right to user.

Anyway thanks for the tremendous help you all gave me.

Thank you..