I have PDA's that I use at customer sites for data collection. These are PocketPC2003SE devices. (Symbol MC50). In the field, these devices connect through an Ethernet Cradle to a Linux Server via HTTP. Data is uploaded and downloaded to/from the linux server. There is no Windows based workstation at the site, meaning there is no MS Active Sync program.
I need to load a new version of my application to the PDA's in field. I have manually created a CAB by building my own .inf file and running cabwiz.exe on my development system and the CAB builds without errors. The CAB is designed to move all of the support DLL's and application CAB's into place in the PDA static file store (/Application.) This is Symbol's recommendation for persistent storage so when you Cold Boot the device the application can automatically re-install itself.
I know the CAB is built correctly because if I use Active Sync to download it to the PDA and then Tap on the CAB file. Everything is installed correctly.
But, if I copy the CAB to the linux server and create a web page for downloading. On the PDA using Pocket IE, I can navigate to a download page and download the CAB. PIE will autorun the application once it has downloaded and I get the following message: "The file "....CAB" is not a valid Windows CE setup file.
I have been working on this for a while. I have searched and tweaked code per recommendations found on EE, Google and MSDN, but I can't get it to work.
Either the CAB is getting corrupt on Download from the web page or Active Sync does some kind of additional conversion on the CAB when it is downloaded to the PDA. (The CAB is not compressed, PocketPC2003SE does not support compressed CABs).
What am I missing?
FYI The PHP program to download the CAB looks like:
<?php
$ffilename = "Base.CAB";
$fsize = filesize($ffilename);
$fp=fopen($ffilename,"r");
header("Content-Type: application/x-download"); # must use unknown format or IE will try to display
header("Content-Type: application/force-download
");
header("Content-Dispositio
n: attachment; filename=\"Base.CAB\"");
$header_str = "Content-Length: ".$fsize;
header($header_str);
header("Content-Transfer-E
ncoding: quoted-printable\n");
fpassthru($fp); # transfer the file
fclose($fp);
header("Connection: close");
exit;
?>
I have tried many different values for content-type.