ottaky@ottaky.com
 
HTML OK
CSS OK
 
Zaurus
Qtopia
 
ottaky.com supports..
ORG
no2id

Sharp Zaurus SL-5500

Author: sjb (Steve Brown) - ottaky@ottaky.com
Date: 22nd November 2002
See also: Sharp's website
http://developer.sharpsec.com/
Tuxmobil

I've recently installed OpenZaurus 3.0 on my Z, details of which can be found here. The information below is for the Sharp ROM and remains here for historical reasons ;-)

CPU StrongArm SA-1100 206MHz
RAM 16MB ROM, 64MB RAM
Storage Slots for CF Type II and MM/SD cards
Graphics 240 x 320 x 16 bit
Display 3.5" reflective TFT
Ports IrDA port
Proprietary port for cradle
3.5mm stereo headphone socket
DC in socket
 
OS Embedix 2.4, Jeode Java, Qtopia
click for larger image

Terminal / Konsole

Since most of what follows requires some kind of terminal, we'd best start with that. The default setup on my Zaurus didn't include a terminal. Apparently there's a terminal app on the CD that came with the machine, but I didn't look. It appears you have two choices..

http://www.killefiz.de/zaurus/showdetail.php?app=385 Konsole
http://www.killefiz.de/zaurus/showdetail.php?app=172 Terminal

Personally, I prefer the first option, the embedded Konsole. If you've ever uesd KDE and are familiar with the Konsole there, you'll recognise the Zaurus version instantly. The Konsole supports multiple tabs, while the terminal doesn't and also gives you the option to use a terminal bell and disable wrapping of long lines.

rc.local

If you look in /etc/rc.d you'll see a file called rc.local and you might logically expect that to get executed at the end of the boot sequence. Well, it doesn't get executed at the end of the boot sequence. If you'd like it to be ..

cd /etc/rc.d/rc5.d
ln -s ../rc.local S49local

.. will make sure that it is. I've put a hostname command and an instruction to unload the USB modules in mine, but you can put pretty much anything you find useful in there.

Mounting Windows shares

It appears that the clever people at Lineo managed to build SMB support into their kernel, and the not so clever people at Sharp forgot to include an SMB client with the Zaurus. The good news is that you can download an SMB client from

http://www.killefiz.de/zaurus/showdetail.php?app=220

Then all you have to do is get it to work. Let's assume you have a server called "my_server", that it has an IP address of 192.168.254.226, it is sharing a directory called "Software", and you have a user account called "UserName". The first thing to do is edit your /etc/hosts file and add an entry like this:

192.168.254.226    my_server

Then you need to create a mountpoint ..

mkdir /mnt/my_server

and then you should be able to mount the server like so ..

smbmount //my_server/Software /mnt/my_server -o username=UserName

If all goes well you should be prompted for a password, enter that and hit return. If, OTOH, you see a message complaing about "libncurses.so.5", you will need to install the ncurses pacakge ..

http://www.killefiz.de/zaurus/showdetail.php?app=452

and try the smbmount command again.

Mounting NFS exports

Simplicity itself. Make sure you have a mount point, and that the Zaurus is listed in /etc/exports on the machine with the NFS export, and then ..

mount -t nfs satellite:/media/dvd /mnt/satellite

the above mounts the DVD drive in my Satellite onto my Zaurus. All this over my wireless LAN. Neat, huh?

Bash

I can't remember for sure now, but I think the Zaurus was using something other than bash as a shell when I bought it. To change the shell to bash, edit /etc/passwd, find the entry for root, and change the last entry on the line to read "/bin/bash".

To get a decent shell prompt, I added the following to both my .profile and .bashrc files in /home/root ..

PS1=$'\\u@\\h:\\w> '
PS2=$'> '
PS4=$'+ '

which will generate a prompt including with a username, hostname and working directory ..

root@zaurus:/etc>

IIRC, .profile is used for telnet sessions, and .bashrc is used for terminal sessions.

FTP

The Zaurus runs an FTP server on port 4242. So, you need to override the default FTP client port with "ftp zaurus 4242".

Hostname

The default hostname for the Zaurus, "localhost", is a bit dull and can actually cause problems with some Windows apps, so it's not a bad idea to change it to something more useful ..

hostname zaurus

changes the hostname to "zaurus".

Terminal mode

You can shut down Qtopia and get a terminal by going to settings / shutdown and then clicking on "Terminate Qtopia". After a little while you'll see a message asking you to "Wait" and a timer counting down. If you press "/" at this point you'll be given a list of options, and "a" will drop you to a terminal.

Syncing

The Zaurus comes with a USB connected cradle which is more trouble that it's worth. The Qtopia desktop was very flaky under Windows, and getting the USB connection to work under Linux is not terribly straight forward. Since my Zaurus is part of my WLAN, I simply donwloaded the latest Qtopia desktop for Linux and, under preferences, told it to sync over the network. Job done. You can download the desktop from ..

ftp://ftp.trolltech.com/qtopia/source/qtopia-desktop-1.6.0beta2-1.i386.rpm

Since I'm not using the USB connection I used

/etc/rc.d/init.d/usb stop

to unload the unused USB modules and save a few KB.

Storage cards

I have a couple of Compact Flash memory cards (32MB and 64MB), and a "High Speed" Multimedia Card (64MB). Rather than use the existing FAT16 format, I've reformatted them as ext2 so that they can support symlinks and access rights etc. If you want to do this yourself, I would suggest you do the following: insert the card, and then use the "mount" command to determine which device the card is using, then umonut that device, reformat, and then remount the card. On my Zaurus, the CF card was on /dev/hda1 and the MM card on /dev/mmcda1, so I used the commands ..

mkfs.ext2 -v /dev/hda1
mkfs.ext2 -v /dev/mmda1

The formatting process will take a few seconds depending on the size of the card, so don't panic if the commands don't return straight away. When the format is complete you'll find a 'lost+found' in the root directory of the card, you can simply delete that.

NB:
Refromatting a memory card will erase all of the data on it, so make sure you've copied anything you want to keep off of the card before you format it.

The CF cards are automatically mounted on /mnt/cf and the MM / SD cards on /mnt/card

Wireless

I have a Netgear MA701 802.11b CF card. It worked right out of the box after I'd used the Internet Connection thingy to set it up with my ESSID and WEP keys. The Zaurus makes an excellent tool for WLAN discovery.

Instant Power

My Zaurus came with a voucher to claim an Instant Power charging kit. It comes with a power cable and three power options:

  • A USB adapter
  • Car cigarette lighter adapter
  • Zinc air fuel cell

Full details can be found here.

Development

You can cross-compile applications for the Zaurus using the instructions here.

telnet, SSH and FTP

I use my Zaurus on public WLANs. For security reasons I've disabled telnet, and FTP and I use SSH. It's also a good idea to give the root account a password using the 'passwd' command.

To enable your Z's telnet server, edit /etc/inted.conf and add the following line ..

telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd

Bear in mind that everything you type and see in a telnet session is sent in the clear. This shouldn't be a problem if you're using the USB cable, but it's definitely a recipe for disaster over ethernet or on a wireless LAN.

As an alternative to telnet, you can use SSH. Download OpenSSH install it on the Z and then generate a key file:

ssh-keygen -b 1024 -f/usr/local/etc/ssh_host_key -N ''

(NB: two single quotes on the end there) add the following to /etc/inetd.conf:

ssh stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/sshd -i

and restart inetd with:

/etc/rc.d/init.d/inet restart

To disable the Z's FTP server, add this to /etc/inetd.conf

4242 stream tcp nowait root /bin/false false

and then restart Qtopia.

NB:
Disabling FTP will prevent you from syncing your Zaurus with your desktop machine, so don't forget to re-enable it before attempting to sync.

Important:
The Qtopia Desktop software connects to port 4243 on the Zaurus. The daemon listening to port 4243 seems to require no proper authentication:

ottaky@satellite:~> telnet zaurus 4243;
Trying 192.168.0.6...;
Connected to zaurus.;
Escape character is '^]'.;
220 Qt Palmtop QCop bridge ready!;
USER root;
331 User name ok, need password;
PASS completelymadeupstring;
230 User logged in, proceed;
CALL QPE/System sendCardInfo();
200 Command okay

.. and I get several pages of information describing all the files on my storage cards. And yes, you can transfer files backwards and forwards, delete files, create files (via FTP on port 4242) etc. Needless to say this is a very bad thing. There doesn't appear to be any way of forcing the daemon to require a genuine password. So, be aware, if your Z is on a LAN or WLAN, it could very well be vulnerable to hi-jacking by just about anybody who can use telnet. If this is a concern to you, and it should be, consider switching to OpenZaurus, which has much tighter security.