More on Zaurus sound

I’ve been running Openzaurus 3.5.4 for some
time now. It’s really good for reading books — they improved
the fonts a lot. I haven’t had time to check out sound, but
because of having previously
worked on it, someone who did wrote me his results.

From: Lee Phillips

Subject: Sound on Zaurus 5500

Date: Fri, 21 Apr 2006 15:03:30 -0400

Hi,

Thanks partly to your website and some others that you linked to,
I managed to get sound recording and playback working on my Z with
OZ 3.5.4.

Mainly through ignorant but systematic trial and error I came up
with these procedures:

Record (through left headphone) with

cat /dev/dsp1 > s.raw

Playing this back with cat s.raw > /dev/dsp gives slowed down sound, as
you know.

But if you install sox on the Z (no problems using ipkg from the command
line; as you’ve probably discovered the GUI package manager is useless) you
can convert to another raw sound file with

sox -V -b -s -r 8000 -c 2 s.raw -b -s -c 1 so.raw speed 1.333 avg -r

and this sounds normal when catted through /dev/dsp1.

But we want a portable sound file. Sox won’t encode to mp3 on the 5500,
but it will make an au (Sun format) file, which is pretty widely useable
(Quicktime plays it on my Mac):

sox -V -b -s -r 8000 -c 2 s.raw -c 1 -v 4 so.au speed 2.6666 avg -r

You might find values for speed and volume (-v 4) that work better,
again this is trial and error and sounds ok for speech.


Laura Conrad



Last modified: Tue Apr 25 11:32:28 EDT 2006

Converting PDF files

The only thing I actually use the Zaurus for in real life is as an
ebook reader. It’s a really good screen that works well in a
wide variety of lighting conditions, so I put everything I can
onto the SD card and read it on the Zaurus.

A lot of the reading matter that’s available electronically is in
the form of PDF files. There are pdf viewers available for the
Zaurus, but none of them seem really suitable for ebook reading.

So I’ve been converting them to html via
pdftohtml. The problem is that this is a fairly naïve
conversion that uses <br> for both the end of a line and the end
of a paragraph. So I’m experimenting with simple scripts that
will remove the <br>’s that are just the end of a line, and
translate the ones that are between paragraphs into <p>’s.

The best thing would be if pdftohtml would put two <br>’s
for the ones that are paragraphs, the way we do when we’re
typing, but it doesn’t. But it does seem to put those at the end
of a line, whereas the ones in the middle of a line are just
line breaks.

So the approach I’m trying now is to change any <br> that’s
at the end of a line to a <p>, and then delete all the
<br>’s. I just did that in emacs last night, but if it
works well, I’ll write a script.


Laura Conrad



Last modified: Fri Feb 17 09:59:30 EST 2006

[pdas] More OpenZaurus testing ahead

A link to the OOO
Newsletter
was posted today on the Openzaurus mail list. It has a
couple of hopeful developments:

  • They are about to release OpenZaurus 3.5.4. I abandoned
    testing 3.5.3 on the grounds that I couldn’t read the default terminal
    font on the screen, none of the font changing commands I knew about
    seemed to work, and I couldn’t make my normal USB connection work so
    that I could do terminal work from my desktop machine.
  • In the improvements section between 3.5.3 and 3.5.4, they report
    an implementation of True Type fonts for Opie, so it’s likely that the
    font-handling got some testing in this release.
  • Not in the newsletter, but the newsletter’s author, Mickey Lauer,
    reported a few weeks ago on the mailing list that he had ordered the
    microphone/earphone attachment for his Zaurus, so it’s possible that
    audio will have better testing on this release, too.

So when 3.5.4 comes out, I will test it, but if you read the
newsletter, you can see that the developers are working really hard on
problems that don’t seem at all related to my usability issues, so I
won’t be surprised if it is again not a step forward from 3.5.2.

[pdas] Back to TheKompany ROM

Having tested OpenZaurus 3.5.3 and found that for my purposes it
has gone backwards from OZ 3.5.2, I decided to go back to TheKompany
and let OpenZaurus mature without me for a while.

The backup program is quite good, so there’s very little work
involved in going back, if I decide to try something different and
don’t like the new thing. And there’s more software built for that
generation ROM than there is for the OZ ones. I believe that someone
can run the software with the compatibility libraries, but I haven’t
been able to.

[pdas] OpenZaurus 3.5.3

Flashed fine.

Attempted to set default font to larger size and was unable to run
the console. So it’s back at a 7 point font that’s completely
illegible for anyone over 40.

Attempted to run route commands that worked with 3.5.2 and get
device not found error. Will look at website to see if I did
something before that.

No, doing what the website says in the order I’m sure I did it last
time is not establishing USB connectivity. Ping is hanging and ssh is
saying:

ssh: connect to host zink port 22: No route to host

So I guess it’s busted, since I can’t read the console on the
zaurus and I can’t log in from the desktop. I’m trying to log a bug
on the console, but I’m having trouble reproducing the problem — now
it isn’t crashing, but it also isn’t changing the font. Update: it crashes if you change the font in the
default Settings => Appearance, but just ignores it if you do it in
the terminal settings.

I’ll see if the mailing list can help.

Update, May 12: No response from the mailing list.
I have to decide which distro to reflash from before I finish the
gothic romance novel (Mary Stewart’s “The Ivy Tree”) I’m reading and
want to get back to the Trollope Parliamentary novels. It looks like
going back to theKompany makes more sense than going back to OZ
3.5.2. TheKompany doesn’t work as well in landscape as OZ does, but
I don’t do that very often, and I think if I had Opera working
(theoretically possible on OZ but I never managed it) I would actually use
browsing. Also, being able to contribute the the OZ project pretty
much requires running the current version, so going back to 3.5.2
isn’t going to accomplish that.

Evaluation of OpenZaurus 3.5.2 attempt

I spent much of the week so far trying to use OpenZaurus 3.5.2 on my
Zaurus 5500. It is not a total failure, and I may well succeed on
some later version of the software, but unless I get better answers to
my application questions, I’m going to wipe it and go back to the TKC
rom.

My Zaurus history

PDA history

I’ve owned two pda’s, both palm-os based. I was sync’ing my calendar
and address book, but mainly using them for reading ebooks, which I
find a surprisingly good technology for how few people bother using
it. It removes your dependance on the font size selected by the
publisher and on the lighting conditions selected by the public
transportation system, doctors waiting rooms, and bars and
restaurants. It also make reading in bed much more comfortable, since
you aren’t holding up a heavy book, and you don’t have to turn
anything off when you decide to stop reading and go to sleep.

Last Spring, I decided to buy a Zaurus, for several reasons:

  • I was temporarily employed, and hence had a better cash flow
    situation than usual for the last few years.
  • The pilot-link sync via usb had gotten flaky on my linux box for
    some reason.
  • I knew that newer PDA’s than my Visor Prism had better screens for
    reading in sunlight, and I was attempting to do that while waiting for
    the bus to take me home from the job.
  • I thought it would be fun to have recording capability on a
    portable computer.

The Sharp ROM

Out-of-the-box, the Zaurus was completely unusable with either my
Debian Linux box or my old, unloved Windows 98 laptop. It doesn’t
come with the console program installed, and I was unable to set up a
link to the linux box without being able to use a console on the
Zaurus. The software on the CDROM just refused to install on the
laptop.

On the bright side, the one thing I did get working was the recording
software.

So I went to the store and bought a CF card, and eventually figured
out how to flash the newer Sharp ROM, and install various apps,
including the console.

I also upgraded the kernel on my desktop, which made it easier to get
usbnet working, and to connect the Zaurus to the linux box. (This
caused the flakiness of my root hard drive to become more critical,
and led to lots of other frustrating work, but that’s another story.)

I got writer’s block at this point and left
this entry for several weeks. Then I responded to a post on WOYP from
someone who knows nothing about linux and was pleasantly surprised to
find that everything she tried worked out of the box. This inspired
me to tell the rest of the story, and I’m including part of that post here.

When I
eventually acquired a CF WIFI card, I could surf the web at my favorite
bar (Cambridge Brewing Company, for locals or travelers to the Boston
Area).

However, the sound recorder no longer worked at all, and when I
acquired the pockettop IR keyboard, the sideways mode worked really
badly. I spent some time using theKompany ROM, and bought the tKcvox
sound recorder program, which works but uses some proprietary format
that won’t play on anything else, so it isn’t very much use to me.
(They have a program that converts it to something normal that runs
only on Windows and costs money, so I haven’t bought it.) TheKompany
ROM sideways is better than the Sharp, but still pretty clumsy.

So I’m currently running version 3.5.2 of OpenZaurus, with most of the
applications installed to the SD card (another purchase, so that I’d
have one and still be able to use the camera). The sideways mode is
much better, reading works quite well, and it mounts all my cards.
There isn’t a sound recording app that works, but I’ve managed to
record something from the command line and play it back at two
different wrong speeds, so I’m sure it’s a soluble problem. I’ll
probably reinstall everything when 3.5.3 comes out, and see if that
fixes the sound problem, and if not do some more twiddling to see if
I can make my command line solution work.

I think the Zaurus is a wonderful idea, and the hardware is really good.
It’s a pity that the commercial software is so bad, and that the Open
Source community doesn’t seem quite large enough to support the amount
of software and hardware that’s out there.

How to install Konqueror-embedded

Someone else asked how I actually got konqueror-embedded
installed. This is typed from memory, and it was actually a lot more
floundering and I may have something wrong this time, too, but here’s
what I wrote him:

The C library is actually called libstdc++6, which I think isn’t what
Mickey said on the mailing list.

Also, if you’re installing to your sd card, you have to ipkg-link
everything you install. (And you can’t ipkg-link some of this stuff
if your sd card hasn’t been reformatted to be an ext2 filesystem.) If
this is greek to you, you either aren’t installing to your sd card or
you’d better figure it out before you start.

So you have to:

  • edit /etc/ipkg.conf to add a line like the others, but with devel
    instead of opie or base or whatever.

  • ipkg -d sd install libstdc++6 libpcre0
  • ipkg-link add libstdc++6
  • ipkg-link add libpcre0
  • ipkg -d sd install
  • ipkg -d sd install konqueror-embedded
  • ipkg-link add konqueror-embedded

New avenues for Zaurus sound

The good thing about having the blog up is that I’m actually
writing about what I’m working on, and people are finding it and
writing me questions, and then I write them back.

This is from an email to someone else who wants sound on
Familiar/Opie (in his case an old Ipaq).

The latest accomplishment described on February
12
was that
using
this page
I was able to record from the command line, and play back at
two different wrong speeds.

My guess is that what I’m getting with that is a raw audio file
format, and that with the right magic words, sox, running on my
desktop computer, would add headers and convert it to something more
convenient.

I’m also guessing that xmms-embedded is what changed the playback
speed from too slow to too fast, and that if I play around with
options to that, I may be able to get it to play back the raw file at
the right speed.

I have some other lines of attack that I will try when I get the time:

  • the linux-audio-user mailing list does not have any Zaurus or
    Familar experts on it, but it likely has lots of people who
    could figure out how to do the sox-type tricks if I can’t easily
    find what I need to know on the net.
  • OpenZaurus 3.5.3 is coming out next month, and may have some
    improvements, although from the responses to my queries on the
    list, it’s likely that nobody is working on sound recording.
    But the opie-recorder problem probably has nothing to do with
    sound, and might be an OS-related problem that might get fixed.
  • The tkcVox app worked
    ok when I was running the TKC ROM, so if I could figure out how
    to make the compatibility libraries work, I could probably use
    that. However, it’s pretty useless, because I couldn’t figure
    out how to convert its format to anything useful on any other
    machine. (They sell a windows-only converter program, but I
    haven’t booted my only windows box for several months, and don’t
    intend to start doing it more often.)

Making progress with the Zaurus

Yesterday I reflashed Openzaurus 3.5.2 with the 56-8 Zimage. I
decided not to pivot_root to the sd card, but to reformat it as ext3
so that I could install most stuff to there.

I have opie-reader with the FixedMonofonts.

Justreader seemed to break the terminal, so I removed it.

The irk and the terminal in sideways work fine.

I figured out the mystery of how to install konqueror-embedded.
The answer is that you install libstdc++6 from the devel feed,
libpcre0 from the updates feed, and then install konqueror-embedded
with the -force-depends option.

Wireless seems to work, although I don’t have an open channel at
home any more. opie-wellenreiter installed with no problem, and
wasn’t finding anything either.

Sound

Audio is still a problem. xmms-embedded seems to play mp3’s. (I
only tested one; apparently there are some that don’t work, but the
one I tried was ok). Opie-recorder still says it can’t write to a
file, and opie-vmemo doesn’t seem to do anything at all. I can’t find
the command line program that I couldn’t use last time because
Justreader had already busted the console.

I did find a site
about how to develop sound on the Zaurus, and all the command line
stuff there works in a fashion. The record command line seems to be
writing a raw sound file without a header about the sampling rate, so
the play command line plays the file at a different speed depending on
what xmms has been doing. The first time I played it, it was too slow
so it sounded like I was speaking some slavic language very pompously,
and then I played the mp3 on xmms and then I sounded like a munchkin.

Nothing I’ve tried on the desktop computer seems to be able ot
decode the raw file.

So I will look harder to find a command line app, or see if tkcvox
can run under the compatibility mode, or something.

Compatibility

I attempted to install oz-compat and run my opera .ipk under it, and
was unsuccessful. I’m not sure that’s the right .ipk though.

Installing OpenZaurus 3.5.2

To set up network translation:

On tuba:

route add -host 192.168.129.201 usb0;
iptables -t nat -F;
iptables -t nat -A POSTROUTING -j SNAT -o eth0 –to 192.168.1.100;
echo 1 > /proc/sys/net/ipv4/ip_forwardpp;

On zink:

route add -host 192.168.129.1 usbd0;
route delete -net 192.168.129.0/24 usbd0;
route add default gw 192.168.129.1;

(This is from the website I was using
http://www.ruault.com/Zaurus/ethernet-over-usb-howto.html — history doesn’t work on the
OZ shell.)

It looks like the zink side survives a reboot, but the tuba side does not.