LFtp: ftp client for my palm !       Version française


Laurent THALER
lthaler@free.fr
http://lthaler.free.fr

This page is http://lthaler.free.fr/lftp.htm
 

New ! sources availables here

What is LFtp ?


LFtp is a client ftp program for Palm Computing Platforms, that means not only true palms but also TRGPro and CLIe ( read further...)
LFtp is based on NetSample, which is furnished in the Palm SDK, I removed a lot of useless (for me) features and added a lot of nice ones.

LFtp is mainly a command line interpreter which can launch only one utility: ftp. Beeing in ftp mode, one can upload and download palm databases (.pdb and .prc) to a ftp server.

Then I added some features:
- usefull simple commands: del, mkd, rmd
- add always .prc to the name of databases, so they can be dowloaded with ProxiWeb
- publish doc files as html: pub
- send and receive files directly  from/to TRGPro compact flash: putcf, getcf
- send and receive files directly  from/to CLIe memory stick: putms, getms
- automatic login sequence and scripted commands
- publish memos files as html: pubm
- name files as they should be, with .prc or .pdb, now you can use LGet to download
- dir files from palm memory: ldir
- dir files from vfs (sd, mmc, cf, ms): ldirfs
- receive files directly to  vfs (sd, mmc, cf, ms): getfs
- get text files (.html, .php, .asp, ...) as uncompressed doc files: getdoc
- store scripted commands in a memo: execmemo
- download text files into a memo: getmemo
 

Disclaimer


LFtp is free. There is no licence or something else. Just use it if you need. Satisfaction e-mails are greatly appreciated !
LFtp is furnished "as is". Without any warranty or support. I am not responsible of anything what can happen. It has been tested on several devices and works quickly but is not perfect, there are some known issues, but nothing more than a good old reset has been reported so far.

LFtp is a tool, not an application. What's the difference ? An application works well in all circumstances, a tool just do the job. LFtp is a tool for uploading and downloading files "on the road", and this works, don't expect anything else. For example, if you try to download something with the 'get' command, LFtp will first delete an existing database on your palm, without warning, in other words, no seat belts :-)
 
 

How to use LFtp ?


Once started, LFtp open a connection (if not already) and you will see this:

You are here in command line mode, you can use it as your favorite ftp utility.
Just a few comments on available commands:

help: display help

pwd: print current directory on server
cd<dir>: change current directory on server
mkd<dir>: make a directory on server
rmd<dir>: remove a directory on server
del<file>: delete a file on server
dir: list content of current directory

ldir [<cmd>]: list local directory (i.e. palm database names from ram only), if <cmd> is set, prefix the listing with <cmd>, (ok, the only usefull usage is: ldir put) ldir can be also used before beeing connected to the server

put <file>: upload file to ftp server, always add .prc to the name of file, works only with palm format databases, case sensitive (put LFtp will store LFtp.prc on server)
get <file>: download file from server, works only with palm format databases, case sensitive (get myprog.prc will store myprog on palm)

pub <file>: publish uncompressed doc files only as text files (pub myfile.htm will store the contents of myfile.htm on server, assuming that the file name is myfile.htm in your favorite editor
pubm <file>: publish memos as text files, use title as file name
getdoc <file>: download text file from server and create an uncompressed doc file, case sensitive (get myprog.prc will store myprog on palm)
execmemo <memoname>: execute all commands stored in the memo, no more limitedby the text size in the preferences to store hundreds of commands, if one memo is not enougth chain a other one
getmemo <file>: download text file from server and create a memo, case sensitive (get mymemo.txt will create mymemo.txt, existing mymemo.txt will be destroyed)

TRGPro only
putcf [<path\>]<file>: upload file to ftp server from TRGPro compact flash, works with any file, path always starts from cf root, always store on current dir on server (putcf 001.jpg will store 001.jpg on server)
getcf <file>: download file from server and write it on TRFPro compact flash, works with any file, always get file from current dir on server, always store file on cf root (getcf 001.jpg  will store 001.jpg on cf)

CLIe only
putms [<path\>]<file>: upload file to ftp server from CLIe memory stick, works with any file, path always starts from ms root, always store on current dir on server, must specify exact full path (putms /DCIM/100MSDCF/DSC00001.JPG will store DSC00001.JPG on server)

All devices with vfs (SD, MMC, CF, MS)
ldirfs [<path\>]<file>: list files on external file system
putfs [<path\>]<file>: upload file to ftp server from external support, works with any file, path always starts from  root, always store on current dir on server, must specify exact full path (putfs /DCIM/100MSDCF/DSC00001.JPG will store DSC00001.JPG on server, use ldirfs to get exact syntax)
 

NOTE: for cf and ms path separator can be either / or \
 

That's all ? not ! It becames quickly a bit tedious even helped with shortcuts, so look at the menus, and open the preferences form with Menu/Misc/Preferences or shortcut command 0, you'll see this:

If "use prefs" is checked then automated login will be used.
If "use prefs" and "use scripted commands" are checked then all commands stored will be executed after automated login.

One can start the full process by using shortcut command 1.

During transfer, LFtp displays dots, for get & put, each dot is a record or a ressource,  for getcf & putcf, each dot is 4K.
 

Known issues features ;-)


- There is very limited support of  TRGPro cf, no detection of changing the cf, it seems that AutoCF has to be disengaged [I don't have a TRGPro myself to make full support, sponsors are welcome  :-)]
- There is very limited support of vfs, no detection of changing thesupport, [I don't have a CLIe, H330 or m50x myself to make full support, sponsors are welcome  :-)]
- Menus and clipboard operations doesn't works once in ftp mode, may gives "fatal error" :-(, fixed in 1.3
- clipboard paste doesn't work once in ftp mode... well, it works but has no effects due to character handling used to simulate command line operations, fixed in 1.4
- recursive ftp is not safe (opening a new session while already in session works, but sockets ressources are very limited on Palm), better to 'quit' before...
- "dir" command may hangs sometimes, simply wait for the 30s timeout... or reset the device, or ask the ftp guy to disconnect your connection... :-)
- LFtp crashes if trying to upload an empty (0 records) database fixed in 1.7.2
- trying to upload an inexistent database with LFtp will create an empty file on server, but you can use the del command
- removed clie/memory stick support,  because the clie emulator doesn't reflect exactly a true clie with ms, and I'm tired of signing licences and ndas to obtain roms
- the getfs command doesn't work, that's the problem with freewares, very low priority :-(
 
 

How to...

- to open a server with a non standard ftp port, just add the port number after a space (ex: ftp 1.2.3.4 888)
- using with POSE with the ftp server on the same machine: only 127.0.0.1 can be used if the host get his tcp/ip address from DHCP and is not connected to the lan (laptop with windows)
- using with MochaPPP, it can only works if the host has a valid tcp/ip address or host name can be resolved by DNS, don't expect to reach the host using 127.0.0.1
- spaces in file name ? try: put "file with spaces"
- upload multiple files with joker ? no, it's not safe, use "ldir put" to obtain a list of uploadables databases, remove unwanted ones, copy to scripted commands in preferences, etc...
- the combination of getmemo and execmemo allow to do very usefull things, like preparing on the server the list of files to download the next time
for example:
execmemo mymemo.txt
getmemo mymemo.txt
will execute all commands stored in the memo, then download a new version of the memo, don't forget to put a quit command at the end of the memo
Don't try to do something like 'execmemo mymemo.txt' with a 'getmemo mymemo.txt' inside, it will crashes, believe me :-)
 

It doesn't work...

It's possible ! Nothing is perfect. Remember that you have not payed anything :-)
Check first if  you are connected to the internet :-)
If you can't open the ftp server at address 127.0.0.1, it's not a failure, I doubt you have an ftp server on your palm...
Strange messages about socket connection error ? try to check 'no PASV' there is an unsollicited unhandled message between your ftp server and LFtp which is not understand, in other words, it's a bug...
It works with POSE, check 'redirect NetLib calls to host TCP/IP', in this case 127.0.0.1 works if there is an ftp server on the pc (maybe also on the mac, I don't know)
 
 

Download and history

LFtp 1.7.6: fixed problems with Serv-U and some other verbose ftp servers
LFtp 1.7.5: bug fixes (now it seems to work with the PalmOS 5.0 Simulator), added getmemo
LFtp 1.7.4: bug fix (memory leak detected with last POSE)
LFtp 1.7.3: bug fix (force quit ftp when launching preferences)
LFtp 1.7.2: execmemo, bug fix with empty databases, memory failure in preferences
LFtp 1.7.1: getdoc, ldirfs, getfs, builded with sdk 4.0
LFtp 1.7 beta 4: partial support of external cards ldirfs, putfs (not yet getfs), bug fix with pose 3.3
LFtp 1.6.1: bug fix, no more crash when entering a backspace at the beginning of the command line
LFtp 1.6: choice of transfert mode PASV or not
LFtp 1.52: restored the naming conventions, .prc and .pdb
LFtp 1.51: added ldirm, pubm, removed putms
LFtp 1.5 beta: added putms, fixed a bug with passive mode on a few ftp server, for cf and ms path separator can be either / or \
LFtp 1.41: added ldir command
LFtp 1.4 beta : clipboard paste fixed, use passive mode (so can be used with MochaPPP)
LFtp 1.3 : multiple preferences (Warning: this will reset current preferences), shorcuts for multiples servers
LFtp 1.2 (automated login and scripted commands)
LFtp 1.01, 1.02, 1.03 ... (added putcf & getcf)
LFtp 1.0

If you are "on the road" the latest version of LFtp is always available as .prc (uploaded by LFtp of course !) http://lthaler.free.fr/ftp

Need some special feature ? like automated transfer, custom datas transformations, support of built-in gsm in Symbol spt17xx ? contact me (not freeware) and I'll talk you about LFtpPro, which includes all functions of LFtp plus two very usefull things:
- there is a a checkbox 'auto' in the preferences, when this is checked, LFtpPro start to execute the script as soon as it is launched
- there is a new command 'launch' which allow to launch any application when the script is ended