transfere file from windows mobile device to PC using sockets and vise versa
-
Sunday, November 13, 2011 2:05 PM
Hi
I am working on developing thread that copy file from PC to mobile device using sockets and vise versa.
This will be done using WiFi connection
I got a problem and discover that the file always reach corrupted when its size is more than specific value and the other device always fail to receive some of the file bytes
Also I don't get any exception and the copy operation look as it is done successfully
I notice that the problem occurred because the bad synchronization between the PC and the device and hence I distribute the file to small parts consists of 2 bytes and send it in a for loop to the device
This done successfully but when I tried to reverse the operation and to send a file from the device to the PC using the same technique, I have failed to transmit it and got no way to transmit any file more than 350kB with no loses in the bytes
any suggestion to solve this problem, or even is there any DLL file that I could use to solve this problem?
I am using C# and dotnet framework 3.5
Thanks in advance
All Replies
-
Tuesday, November 15, 2011 5:54 AMMaybe the memory use up. Every process in WM only has 2MB memory.
NEU_ShieldEdge -
Tuesday, November 15, 2011 10:39 AM
Hi Luke
well actually I don't think it is the memory, because I can copy from WM device to PC successfully without any problem (tested up to 20MB file size and I am not gonna send a file larger than this anyway) using the technique that I talked about it in the thread
but the actual problem happens when the copy process being from the PC to the WM device
Also when I tried to send the file from the WM device to the PC, I red the whole file with size 20MB first to the memory and then send it away to the PC, and I got no memory problems
-
Saturday, November 19, 2011 10:07 AM
Any Suggestions please?
I searched many times for the solution and hope to know what to do badly
-
Tuesday, April 17, 2012 2:25 PM
well, I know it is a long time since I posted this thread, I just return to post how I solved this problem
I discover that there is no loses happens when I send small pieces consists of 100 byte per time and just for one time, so I distribute the whole file to small parts, each part consists of 100 byte, and then at the 1st I send the file size to the mobile device, then I sent 100 byte per time and waited for ACK from mobile device, thats because I implemented the mobile device to send ACK char byte to the server when the received bytes equal 100 after the transmission done other wise it send NACK char and then I should send the same part again
It is like I partially implemented the TCP-IP protocol again , but it solved the problem well
- Marked As Answer by BestMoon Tuesday, April 17, 2012 2:25 PM

