Downloading to your Linux-CE kernel without using Desktop Windows.
As many owners of Win CE machines also have a machine running the desktop version of Windows (95/98/2000/NT) downloading can be achieved by using the Windows CE Services software supplied with your Win CE machine.
Unfortunately if you do not have desktop Windows, or don't want to install the software, then it is quite a bit more tricky.
In order to transfer the kernel I have opted to download a FTP server to the WinCE machine and then use this so that data can be pushed from the desktop to the WinCE machine.
The techniques described below could also be used to transfer any software (FTP Client for pulling the data across or even the whole kernel complete with boot loader and config file).
WinCE Configuration
For all connections the WinCE machine needs to be configured.
1.
Turnoff WinCE's automatic connection by sellecting 'Start/ Settings/ Communications', under the 'PC Connection' tab clear (or deselect) 'Enable Direct Connections...'. Press 'OK' to confirm this setting.
2.
Now you need to enter the settings for your Linux connection. Enter 'Start/ Programs/ Communication/Connections' and select 'Make New Connection', give it a name ('Linux' for example) and select 'Direct Connection', click 'Next'.
3.
Select 'Serial Cable on COM1' and select 'Configure'.
4.
Enter the Baud rate and other serial settings that you wish to use, press 'OK' to confirm.
5.
Select 'TCP/IP Settings' and set/clear 'Slip' depending on whether you are using PPP or SLIP, press OK to confirm the settings.
6.
Press 'Finish' to create the 'Connection', these settings may be changed later through 'Properties' in the 'Connection' menu.
7.
You will probably need to increase the size of the WinCE Radisk. The is done via a slider in 'Start/ Settings/ System' under the 'Memory' tab.
When the time comes to enable the link the 'Linux' connection should be double-clicked, or accessed through 'Start/ Programs/ Communications/ Linux'.
Linux configuration.
For a cable connectin the system is relatively easy, connection can be made with PPP or SLIP - The connection may be made with IRDA but that is more complicated and therefore is not covered here ;-)
PPP
For PPP you will need PPP to be compiled into you desktop's kernel and have PPPD installed and have 'root' access. Create the following files, I have called them 'everex' as that is the brand of P-PC I have - you may substiute another name should you wish:
/etc/ppp/peers/everex:
/dev/ttyS0 115200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/everex.chat'
noauth
local
192.168.55.101:192.168.55.100
/etc/ppp/everex.chat
TIMEOUT 3600
"CLIENT" "CLIENT\c"
"" "SERVER\c"
The connection then can be made by typing 'pppd call everex' and running the 'Start/Connections/Linux' script on your palm top. Several lines of debug information will scroll by, this should contain the line 'ppp up'. If you are having problems check the cabling and selected serial port, lower the BAUD rate may also help. The connection can be terminated by pressing 'Ctrl-C'. My WinCE machine stops the link after 10 minutes of inactivity.
SLIP
In order to connect with SLIP the desktop's kernel should have been compiled with the SLIP and CSLIP options and DIP should be installed. Create the following file, in a suitable location - I've used root's home directory:
/root/everex.dip
main:
print Starting connection.....
# set up linux box's IP
get $local 192.168.55.101
# set up WinCE IP and netmask
get $remote 192.168.55.100
netmask 255.255.255.255
# Set the desired serial port and speed.
port ttyS0
speed 115200
parity N
databits 8
stopbits 1
flush
# negoiate link
print waiting for CE device
wait CLIENT 20
if $errlvl != 0 goto trouble
print logging on
send CLIENTSERVER
# Say hello and fire up!
print CONNECTED $locip ---> $rmtip
mode CSLIP
exit
trouble:
print CONNECT FAILED to $remote
quit
To connection may be started by typing 'dip everex.dip' and running the 'Start/Connections/Linux' script on your palm top. Once the connection is made then the command line prompt will reappear. The connection may be tested with 'ping 192.168.55.100' and closed with 'ifconfig sl0 down'.
Downloading the FTP Server.
As I stated earlier I am downloading a FTP Server so that I can then connect to the WinCE machine and 'push' other programs onto it. You can use this method to download anything - programs, pictures, games, etc. The FTP Server I have selected is 'ftpsvr.exe' which is freeware.
There are two techniques Web or Email. Some H-PC come with the 'Pocket Explorer' HTML browser, however the P-PC that I have does not and I am therefore forced to use the Email technique.
Web
Start up 'Pocket Explorer' and enter the URL of you desktop machine, which should have a Web Server running and a page serving the software you wish to download. If you want to use an off-site web server then the IP-forwarding will need to be configure correctly - This is too complicated to explain here.
Select the 'software' and 'Save-as' whatever. You now have downloaded it.... congratulations.
Email
Unfortunately this method is more complicated than Web, but the only option for some people. Firstly you will need a POP3 server running on you desktop machine. I would suggest 'pop3d' which is GPL'ed and available from a download site near you. Email the 'FTP Server executable' as an attachement to an accessable account.
On the WinCE machine start 'Inbox' and specify the 'Service', this is done with the 'Compose/Options' (obvious heh?). Select the 'Services' tab and hit 'Add'. Select 'Internet mail' and enter a name ('Linux' for example).
Enter '192.168.55.101' as the POP3 host and a suitable 'User ID'/'Password'. There is no need to configure the SMTP options as we are only going to recieve mail. Click 'Next' twice to get to 'Upon Connection'.
Select 'Complete messages' and 'File attachments' otherwise they will not be downloaded. Click 'Finish' and then 'OK' to confirm settings.
To actually download the data/email start the link with 'Start/ Programs/ Communications/ Linux' and start the Linux side as described in the previous section. In 'Inbox' select 'Service/ Connect', after a bit of negoiation the email will start to download.
Once the email is downloaded, open the email and select 'File/ Attachments/ Other Attachments'. Double click the 'ftpsver' to run it.
You will now be able to FTP to you WinCE machine to transfer kernel and the boot loader. As there is no easy way to start an arbitrary program with WinCE, download to the '/Windows/ Start Menu' directory. You can then start 'CyaCE' directly from the Start Menu.... Now the fun can really start!!!
References
I'm Simon Wood and this mini-howto was last updated on July 2nd 2000.
The link stuff was taken from www.linuxcare.com and the FTP server can be found at http://www.oohito.com/wince/mips_o_j.htm.
|