I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / MSN Companion
CompactFlash capacity problem

New MessageCompactFlash capacity problem (modified 0 times) TheGoose
Profile
I'm using my hacked IA-1 as a "picture frame". I've written a small perl script to resize any new photos (less than 1 day old) from my photo directory (on my big linux box) using ImageMagick down to a size suitable for the IA-1 (800x600). If anyone's interested, here's the code:

#!/usr/bin/perl -w
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; #$running_under_some_shell

use strict;
use File::Find ();

# Set the variable $File::Find::dont_use_nlink if you're using AFS,
# since AFS cheats.

# for the convenience of &wanted calls, including -eval statements:
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find::prune;

sub wanted;

# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, '/big/photos/fotki.com/');
exit;

sub wanted {
return if $name !~ /^.*\.jpg\z/s;
my ($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($name);
return if int(-M _) >= 1;

(my $newname = $name) =~ s!(.*/(.*))\.jpg!/big/photos/compaq_ia-1/$2_th.jpg!;
system("convert -compress JPEG -sample 800x600 -quality 50 $name $newname");
utime((stat($name))[8,9], $newname);
1;
}


I then copy the jpg's to a CompactFlash card, which I mount on the IA-1. The following simple script rotate's through the images:


#!/bin/sh

while [ 1 ]; do
for i in *_th.jpg; do
xli -onroot -fullscreen $i > /dev/null 2>&1
sleep 15
done
done


However, here's my problem: When the CF card is formatted as FAT, I can only get about 10 MB of files onto it (I've tried both a 32MB & 128MB CF cards). After formatting (using W2K), the OS shows the proper amount of free "disk" space, it's simply that the copy fails partway through. Even after the copy fails, the OS shows 10MB used and ~20 MB or ~110 MB free!!! This occurs whether I use drag and drop or xcopy.

If instead I format the CF card as FAT32, both cards properly copy all the files I've got (over 200, taking up 15 MB). However, when I try to boot the IA-1 with the FAT32 card in place, the boot locks up after the initial ".........................".

I thought FAT16 could go well over 10MB, am I missing something here?

- Robert

P.S. I've also tried two different CF readers, and 3 different PC's!!

08-08-2003 11:04:31

New MessageRE:CompactFlash capacity problem (modified 0 times) TheGoose
Profile
I'll answer my own question!

It turns out that FAT has a limit of the number of files in the root directory (the number varies when using "long" file names). If I instead create a folder, and put the jpg's in it, I have no problem. Surprise, surprise, this is what all the digital camera's seem to do.

Now all I need to do is have the IA-1 mount the CF flash at boot, and start my slideshow script automatically.

08-13-2003 09:09:54

New MessageRE:CompactFlash capacity problem (modified 0 times) TheGoose
Profile
For anyone that's interested, here's the Microsoft KnowledgeBase article on this "feature":

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q120/1/38.asp&NoWebContent=1&NoWebContent=1

08-13-2003 09:58:18

New MessageRE:CompactFlash capacity problem (modified 0 times) geo_fr
Profile
hey TheGoose, which PERL version did you install on the IA ?
Did you use the Midori distro ?
Which size for the PERL ?

and .... could you write down the url for this PERL version ?

Thanks


--== Geo ==--
09-05-2003 15:52:33

New MessageRE:CompactFlash capacity problem (modified 0 times) rlyacht
Profile
I think he said he did it on his big linux box, not on the ia1.
09-05-2003 17:59:14

New MessageRE:CompactFlash capacity problem (modified 0 times) TheGoose
Profile
Exactly... I keep a scaled copy of my photo's on the full powered linux box. I then only copy to a Compactflash the few hundred photo's I really like!
09-09-2003 15:27:15

New MessageRE:CompactFlash capacity problem (modified 0 times) geo_fr
Profile
and ...
is there any solution to create a random list ?
I know that the /dev/random device don't works on the midori, but, how to create
this list into a big linux box. After it's so simple to use this list with the IA, throw a samba sharing directory

I try to use the find command, but the xli is use at each occurency discover by find , in the normal order ...
Which combinaison could be use to randomize the result of the find result ?

Thanks


--== Geo ==--
09-25-2003 03:19:44

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3