LCD screen for your dockstar (cheap! <$5)
November 17, 2010 07:53PM
3 or 4 years ago a number of small Digital Photo Frame Keychain products based on the Sintronix st2205u chipset were mass produced. The st2205u is based on the 6502 CPU (similar to the old Commodore64) and the firmware can be easily hacked using opensource tools (i.e. crasm in Debian repos). Once hacked they can be used as usb powered color backlit displays for tools like LCD4Linux.

The photoframes use an internal rechargeable lithium battery which as a lifespan of 2 or 3 years so the old stock has difficulty holding a charge and consequently they can be found on Ebay very cheaply.

Don't buy new ones off Amazon - the latest generation of frames appear as a CDRW device (/dev/sr0) to Linux and cant be hacked, the old ones appear as a corrupt flash drive (/dev/sdb).

Background Info:
Picframe Project - main hack site - doesnt seem to have changed much in the last couple of years
st2205tool - tools and libraries to hack and control your photo frame
LCD4Linux - external display daemon (you need the latest svn version - Debian repo doesn't support st2205)

Howto hack:

DISCLAIMER: Attempting to hacking your firmware may well brick your photo frame, especially if you follow my quick and dirty instructions - don't try it if you are risk adverse.

1. Download & compile software
# st2205tool
wget http://www.neophob.com/files/st2205tool-1.4.3.tar.gz
tar xvfz st2205tool-1.4.3.tar.gz
apt-get install libgd2-xpm-dev
cd st2205tool && make && make install
# LCD4Linux
wget http://ssl.bulix.org/projects/lcd4linux/raw-attachment/wiki/Download/lcd4linux-0.11.0-SVN.tar.bz2
tar xvfj lcd4linux-0.11.0-SVN.tar.bz2
cd lcd4linux-0.11.0-SVN
./configure && make
2. Plug in your picture frame into a USB port & select 'Upgrade' or 'Update' if prompted (some do, some dont)

3. Find your picture frame device (/dev/sdX) by looking at dmesg output
# lsusb
Bus 001 Device 029: ID 1403:0001 Sitronix Digital Photo Frame
...
# dmesg | tail -12
usb 1-1.3: new full speed USB device using orion-ehci and address 29
scsi24 : usb-storage 1-1.3:1.0
scsi 24:0:0:0: Direct-Access     SITRONIX MULTIMEDIA       0.09 PQ: 0 ANSI: 0 CCS
sd 24:0:0:0: Attached scsi generic sg1 type 0
sd 24:0:0:0: [sdb] 4096 512-byte logical blocks: (2.09 MB/2.00 MiB)
sd 24:0:0:0: [sdb] Write Protect is off
sd 24:0:0:0: [sdb] Mode Sense: 0b 00 00 08
sd 24:0:0:0: [sdb] Assuming drive cache: write through
sd 24:0:0:0: [sdb] Assuming drive cache: write through
 sdb: unknown partition table
sd 24:0:0:0: [sdb] Assuming drive cache: write through
sd 24:0:0:0: [sdb] Attached SCSI removable disk
4. Hack your device
cd st2205tool
./hackfw.sh /dev/sdX
If the hack script finds a known hack for your device and prompts if it should go ahead and perform the hack...

DON'T DO IT! YOU SHOULD BACKUP YOUR FIRMWARE FIRST
Hit CTRL+C and cp fwimage.bin original-fwimage.bin
Then re-run ./hackfw.sh /dev/sdX - this time say 'yes' and go ahead with the hack

# Note: If you want reflash your old firmware, you can with...
# ./phack -uf original-fwimage.bin /dev/sdX


If the script cant find a hack...

Dont panic - this happened to me - start by having a look for your device on the Picframe website. There may be additional instructions to get your device to work. For the Coby DP152 you need to make a one line code change to the st2205tool source and download a new hack config, then recompile and rehack.

If you cant find any info and you are sure you have a Sitronix based frame you can still follow the directions in st2205tool/hack/newhack.txt. You'll have to download and compile a 6502 disassembler and analyze the disassembly. Let me know if you end up going in this direction as I have a perl script that attempts to automate the analysis.

5) Configure LCD4Linux
cd ../lcd4linux-*
# Download example lcd4linux.conf (looks like this)
wget -O lcd4linux.conf http://www.shrani.si/f/1c/J7/ynfJw3W/text.htm # edit out HTML cruft
# change device in config to be /dev/sdX
6) Start LCD4Linux
./lcd4linux -F -v -f ../lcd4linux.conf

Enjoy your new dockstar display!

BTW looks like the original hack comes from the same guy that put a dockstar in his Mac SE

-PG



Edited 5 time(s). Last edit at 11/21/2010 07:31AM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 17, 2010 10:44PM
Here is the script and instructions to try and generate a hack for a st2205 device that is not currently supported by st2205tool...

To use:

1. Install crasm and svn
apt-get install crasm subversion subversion-tools
2. Compile da65 dissassembler
svn checkout svn://svn.cc65.org/cc65/trunk cc65
cd cc65 && make -f make/gcc.mak
3. put generate-hack.pl script in st2205tool directory and run it (edit path to da65 in script if necessary)
cd st2205tool/hack
for x in `ls -1d m_* | grep -v m_coby_dp151`; do mv $x xxx_$x; done # disable unecessary hacks
cd ..
./generate-hack.pl /dev/sdX hack/m_my_new_hack
It will dump device firmware, chop it up, do all the steps in hack/newhack.txt, create a spec file, and recompile everything using assembleme/crasm

You can then use hackfw.sh /dev/sdX to attempt to hack the device.

-PG



Edited 3 time(s). Last edit at 11/25/2010 06:38AM by petergunn.
Attachments:
open | download - generate-hack.pl (6 KB)
Re: LCD screen for your dockstar (cheap! <$5)
November 18, 2010 07:43AM
not aviable in EU :-( only US
Re: LCD screen for your dockstar (cheap! <$5)
November 18, 2010 10:25AM
Thanks for the well-written overview and the script, Peter. This looks like a great hack!

-- Jeff
Re: LCD screen for your dockstar (cheap! <$5)
November 18, 2010 03:05PM
There are loads of very cheap ones on eBay that look identical to the one the Peter linked to at http://spritesmods.com/?art=picframe. I'm going to be a real daredevil and risk the grand sum of £3.38 on the cheapest one on ebay.co.uk to find out whether this is a Sitronix one.

Due to the cheap postage, this is going to take a couple of weeks to get to the UK but if it works, I'll report back.

Thanks for the cool hack. I'm not quite sure why I want one of these but it's nifty and super cheap, so why not?
Re: LCD screen for your dockstar (cheap! <$5)
November 18, 2010 04:23PM
gorgone Wrote:
-------------------------------------------------------
> not aviable in EU :-( only US

Dealextreme has worldwide free shipping (although it takes weeks) and SKU5218 is listed on the Picframe site as being Sitronix based. The price is higher at $12 but this unit is free standing + takes regular AAA batteries so there is no lithium battery to wear out so it should be usable as a Picture Frame indefinitely - not that you'd want to do that.

The original hack came from Europe and used a TomTec frame that is not available in the USA so I suspect there are local units available. If you are buying off ebay ask the seller if the frame comes with a CD - you want one that does.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 18, 2010 04:35PM
rgtaa Wrote:
-------------------------------------------------------

> What can you do with it, or what are you doing
> with it.
>
> For music , on my dockstar I am running squeezebox
> server and client, would it be possible to see
> what music is playing like I can on my squeezebox
> boom?

I'm just using it to display basic CPU and Network stats on LCD4Linux, but you could do all sorts of things. LCD4Linux has plugins for lots of different apps like asterisk and you can easily create custom messages and add pictures (album covers?) etc. if you want. Changing the display does require creating a bitmap on-the-fly and pushing it over USB - this seems to take about 1-2% CPU to update once per second. If you want to try to stream video you might get a few frames/sec (I haven't tried). I don't know if each frame gets written to flash or if streaming will shorten the life of your unit.

> I bought a evga 16plus usb to vga adapter but i
> can't get it to work with dockstar, so hopefully
> with 5 dollar thing will work. :)

I think thats a displaylink device. Have you tried the steps I listed in my post about the DS-90U displaylink monitor? I found it easier to get my DS-90U working on my Dockstar than on my Ubuntu laptop.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 19, 2010 11:32AM
It would be really nice if there was a picture frame that would fit directly onto the mini USB of the dockstar. Does anybody know of such a model?

Regards,
twinpeaks
Maxi
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 06:13AM
So, what do we do about errors from your script?

like:
Locating CMP_VAR1 & CMP_VAR2...
Eeek! expected single match but found 0 - dont know what to do!

i followed your steps letter by letter, except the cc65, got the deb file off the site itself, and altered the script with the location of the da65 (/usr/bin/da65)..

is there something i done wrong?
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 06:56AM
Maxi, that part of the script is trying to analyze the disassembly output from da65 to find something like...
L6DEC:    LDA     $037c
          CMP     #$31
          BNE     L73c1
          LDA     $037d
          CMP     #$00
          BNE     L73c1
          BRA     L73d3
Its possible the da65 version from the .deb file installs with some different formatting options that might stop the script working (i.e. if "LDA $037c" is output as "LDA D037c").

Can you try compiling the version from svn? It shouldnt require any additional packages (other than regular build stuff), you dont have to install it (just run from build dir), and you can easily delete it afterwards.

If that still doesn't help please attach the disassembly of your first segment and I'll have a look...
da65 -S 0x4000 --cpu 65C02 fwimage-seg0.bin > fwimage-seg0.txt
-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 06:59AM
twinpeaks Wrote:
-------------------------------------------------------
> It would be really nice if there was a picture
> frame that would fit directly onto the mini USB of
> the dockstar. Does anybody know of such a model?

Both my frames fit on the mini-USB but they face backwards and downwards :-(

You would need to reverse the mini-B to get it to face forwards.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 05:16PM
Peter
Do we download these packages to cd/ tmp or untar them from root directory.

Also, you might want to edit that line to

tar xvfj lcd4linux-0.11.0-SVN.tar.bz2




Gee I don't know how to wget that hack file that you posted. I know it's on jeff's site, but it looks like this if I copy destination

file.php?2,file=31,filename=generate-hack.pl

You might want to add chmod 755 generate-hack.pl in your instructions.


I do have the exact model you have , is there a package that is completed.


Also, I would be interested in package that could give root access, or terminal mode, same as we would get using SSH from PC. I could then do apt-get stuff right from dockstar with keyboard attached. If it could be so it would have start-up script, then I wouldn't have to start this package from another pc but, on startup it would show ROOT access. :)



Edited 15 time(s). Last edit at 11/20/2010 09:50PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 10:10PM
rgtaa Wrote:
-------------------------------------------------------
> Peter
> Do we download these packages to cd/ tmp or
> untar them from root directory.

/tmp is a tmpfs filesystem so you'll lose the contents after root - including your original firmware which you will need if you ever want to reflash - so best to download somewhere more permanent.

> Also, you might want to edit that line to
>
> tar xvfj lcd4linux-0.11.0-SVN.tar.bz2

Good catch - should be fixed now.

> Gee I don't know how to wget that hack file that
> you posted. I know it's on jeff's site, but it
> looks like this if I copy destination
>
> file.php?2,file=31,filename=generate-hack.pl

You could just rename it after you download it :-)

Alternatively, you can use wget like this...
wget -O - 'http://forum.doozan.com/file.php?2,file=31,filename=generate-hack.pl,download=1'; > generate-hack.pl
chmod +x generate-hack.pl

> I do have the exact model you have , is there a
> package that is completed.

If you have a Coby 152 I found the hack listed in Step 5. of the Picframe instructions is identical to the one my generate-hack.pl creates. You could just download that into your st2205tool dir and run hackfw.sh /dev/sdX.

> Also, I would be interested in package that could
> give root access, or terminal mode, same as we
> would get using SSH from PC. I could then do
> apt-get stuff right from dockstar with keyboard
> attached. If it could be so it would have start-up
> script, then I wouldn't have to start this package
> from another pc but, on startup it would show ROOT
> access. :)

Interesting idea - kind of like Slugterm but with output to the Picframe. With 6x8 text the Picframe would have a 16 row x 21 column display - which might be big enough to actually be useful.

I had a look at the Slugterm code and while its function is an admiral achievement there are a number of design features that I'm not keen on - C++/boost is too heavy and the whole hard coded keyboard mapping thing doesn't look very portable.

I'm thinking that it might be possible to create a poorman's dockstar-term using Rote+LCD4Linux+Android key mapping without too much code. If I have time I might have a fiddle :-)

-PG



Edited 3 time(s). Last edit at 11/21/2010 07:31AM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 20, 2010 10:54PM
I realized you meant 152 even though you wrote 182.

I got the file and I'll post it here so others can get it to dockstar since it's on megadownload and don't know how to install it to dockstar since it ask for code to download.

I would sure appreciate it if you take one of your lcd's and just using your guide, do the installs, because I'm having problems.

I have the exact same model you have, and if you are saying the mcoby dp152 is the right file, could you post the how to based just on this. I'm suck at the installing hack phase. I can't extract this tar the right way. I even used a ubuntu PC to do this and have same problems. The tar.gz is good because I can extract it in ubuntu but I'm stuck. Can anyone else get it to work?

Thanks Peter for helping us out on this.

p.s. on the lcd screen is baks r ok from the ubuntu pc.

What does that mean?



Edited 7 time(s). Last edit at 11/21/2010 12:48AM by rgtaa.
Attachments:
open | download - m_coby_dp152.tar.gz (4.6 KB)
maxii
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 02:26AM
when i
user/st2205tool# svn checkout svn://svn.cc65.org/cc65/trunk cc65
i get..
svn: Network connection closed unexpectedly

thats why i went to the cc65.org site and get the deb file instead and installed it
(why would there be a difference between pre-compiled over source?? that would be bad for creators of the program)

here's the full fwimage-seg0.txt, at http://pastebin.com/TheRFQGX
doesn't look like there is misinterpreting $ as say D, just none of headers (or what ever you want to call them) for program to find..

oh, hardware info:

#lsusb
Bus 003 Device 011: ID 1403:0001 Sitronix Digital Photo Frame

#dmesg
[420810.872736] scsi16 : SCSI emulation for USB Mass Storage devices
[420810.893727] usb-storage: device found at 11
[420810.893733] usb-storage: waiting for device to settle before scanning
[420815.893364] usb-storage: device scan complete
[420815.896378] scsi 16:0:0:0: Direct-Access SITRONIX MULTIMEDIA 0.09 PQ: 0 ANSI: 0 CCS
[420815.901949] sd 16:0:0:0: Attached scsi generic sg4 type 0
[420815.907331] sd 16:0:0:0: [sde] 4096 512-byte logical blocks: (2.09 MB/2.00 MiB)
[420815.910309] sd 16:0:0:0: [sde] Write Protect is off
[420815.910319] sd 16:0:0:0: [sde] Mode Sense: 0b 00 00 08
[420815.910325] sd 16:0:0:0: [sde] Assuming drive cache: write through
[420815.925992] sd 16:0:0:0: [sde] Assuming drive cache: write through
[420815.926008] sde: unknown partition table
[420815.968346] sd 16:0:0:0: [sde] Assuming drive cache: write through
[420815.968360] sd 16:0:0:0: [sde] Attached SCSI removable disk

so i don't think its one of newer versions (aka, fake CD drive)...
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 08:07AM
maxii Wrote:
-------------------------------------------------------
> i get..
>
> svn: Network connection closed unexpectedly

Your ISP may be firewalling SVN connections. Try downloading via FTP:
# apt-get install ftp
# ftp ftp.musoftware.de
Name (ftp.musoftware.de:root): anonymous
ftp> passive
ftp> cd /pub/uz/cc65/snapshot/
ftp> get cc65-snapshot-sources-2.13.9.20101115.tar.bz2
ftp> quit
tar xvfj cc65-snapshot-sources-2.13.9.20101115.tar.bz2
mv cc65-snapshot-2.13.9.20101115 cc65
> thats why i went to the cc65.org site and get the
> deb file instead and installed it
> (why would there be a difference between
> pre-compiled over source?? that would be bad for
> creators of the program)

The svn repo version is the latest one for testing. The deb is supposed to
be the previous stable version, but it might be older.

> here's the full fwimage-seg0.txt, at
> http://pastebin.com/TheRFQGX
> doesn't look like there is misinterpreting $ as
> say D, just none of headers (or what ever you want
> to call them) for program to find..

Something is wrong with the disassembly. For instance 'grep -i bne fwimage-seg0.txt'
shows there are no BNE instructions at all. From dmesg I see your device is /dev/sde
- are you sure you dumped the right device?

Your fwimage-seg0.bin should look something like...
# hexdump fwimage-seg0.bin | head -10
0000000 a085 32a5 a548 4833 40a9 a948 4841 18da
0000010 bdba 0106 a285 0469 069d bd01 0107 a385
0000020 0069 079d fa01 a184 04a0 a2b1 8848 a2b1
0000030 8848 a2b1 8848 a2b1 3285 8568 a533 a4a0
0000040 60a1 8568 6833 3285 7860 3e64 3f64 3c64
0000050 3d64 3864 ffa2 209a 424d 5820 2042 41ec
0000060 4220 2042 4243 4c20 2042 4276 9620 2041
0000070 42ac 5520 a543 2994 090f 8500 4894 03a9
0000080 3585 2068 0820 0001 55d2 2020 0108 3800
0000090 2054 0820 0001 5628 d020 2056 41bb bb20
> oh, hardware info:
>
> #lsusb
> Bus 003 Device 011: ID 1403:0001 Sitronix Digital
> Photo Frame
>
> #dmesg
...
> [420815.907331] sd 16:0:0:0: 4096 512-byte
> logical blocks: (2.09 MB/2.00 MiB)
...
> [420815.926008] sde: unknown partition table
...
> [420815.968360] sd 16:0:0:0: Attached SCSI
> removable disk
>
> so i don't think its one of newer versions (aka,
> fake CD drive)...

This looks good - it should be hackable. Good news is
you only have to get the hack to work once :-)

-PG



Edited 1 time(s). Last edit at 11/21/2010 08:15AM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 08:14AM
rgtaa Wrote:
-------------------------------------------------------
> I realized you meant 152 even though you wrote
> 182.

Well spotted - I actually thought it was a 182 - but you are right :-)
I fixed the first post.

> I would sure appreciate it if you take one of your
> lcd's and just using your guide, do the installs,
> because I'm having problems.

I have a new one I'm going to flash so I'll try the instructions again.
The battery is currently dead so I need to charge it overnight before
I can try flashing - if you flash with a dead battery it has no effect.

> I have the exact same model you have, and if you
> are saying the mcoby dp152 is the right file,
> could you post the how to based just on this. I'm
> suck at the installing hack phase. I can't extract
> this tar the right way. I even used a ubuntu PC to
> do this and have same problems. The tar.gz is good
> because I can extract it in ubuntu but I'm stuck.
> Can anyone else get it to work?

When you extract the download you'll see a m_coby_dp152
directory...
cp m_coby_dp152 st2205tool/hack/
cd st2205tool
./hackfw.sh /dev/sdX
> Thanks Peter for helping us out on this.
>
> p.s. on the lcd screen is baks r ok
> from the ubuntu pc.
>
> What does that mean?

That means phack is working and your frame is likely
hackable but it is (probably) not yet hacked. All the Sitronix
frames have a debug capability that allow a short (10 char)
string to be sent directly to the screen without hacking. The
hackfw.sh script sends 'baks r ok' as a test.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 08:54AM
download the coby file and try to untar it and see what you get.

When doing your new lcd, cut and paste what you have in your first post, so you can spot any errors.

Maybe download the coby file yourself and add it to attachment in first post and also add :

cd ..
mkdir /install
cd /install

then the programs to download. If you are in root , tell us, but if you are in different directory let us know, so follow your guide to the letter, because I'm really interested it hacking this thing, it seems cool. :)

I got the exact model you have , so if I follow your guide exactly I should get the exact results you get. Same dockstar and same programs and same coby. So if you edit a file, I would need the exact commands to edit it. etc. :)



Edited 2 time(s). Last edit at 11/21/2010 08:56AM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 12:34PM
I have attached the original Coby 152 hack config from the Picframe site.

Download, extract, modify main.c as per instructions, recompile then hack...
cd st2205tool/hack
wget -O - 'http://forum.doozan.com/file.php?2,file=37,filename=m_coby_dp152.tar.gz,download=1'; > m_coby_dp152.tar.gz
tar xvfz m_coby_dp152.tar.gz
cd ..
perl -pi -e 'undef $/; $_=<>; s/\nint is_photoframe\(int f\) {\n/$&return 1;\n/; print' main.c
make
./hackfw.sh /dev/sdX # you have to change sdX to be the right device as shown in dmesg

Remember to save a copy of your original firmware somewhere safe.

-PG



Edited 5 time(s). Last edit at 11/21/2010 12:38PM by petergunn.
Attachments:
open | download - m_coby_dp152.tar.gz (4.6 KB)
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 01:33PM
Peter
That worked for me I have 2 of the hacked.
I don't know if the old firmware is saved, is it in one of the folders?

I have another unhacked lcd, so I can always use that firmware to fix the others , right?

Could you post your stock firmware so I can put it on safe place on windows 7 pc? thanks

I'm suck on what to do with it.

What script do you recommend that comes close to terminal root access?

I see on the screen

IT
WORKS!

The cut and paste you have next are confusing STEP 5
this is confusing as to what to do?

Quote

cd ../lcd4linux-*
# Download example lcd4linux.conf (looks like this)
wget -O lcd4linux.conf http://www.shrani.si/f/1c/J7/ynfJw3W/text.htm # edit out HTML cruft
# change device in config to be /dev/sdX

could you make it more like real file names and stuff, seems like you are giving examples but that part seems confusing as to what we actually are suppose to do.

I'm happy at least I hacked it , first part done! :)

Now I have to figure out what to do with it! :)



Edited 3 time(s). Last edit at 11/21/2010 01:45PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 01:39PM
You are almost there. Backup the firmware from your last device. You can do it explicitly with phack rather than trying to intercept the copy that hackfw.sh creates...

./phack -df original-fwimage.bin /dev/sdX

I know its a bit messy but there are so many different devices that many things can happen. Just got to muddle through until its hacked and you should be good to start setting up LCD4Linux (which you should have downloaded, compiled and installed in Step1).

-PG



Edited 2 time(s). Last edit at 11/21/2010 01:43PM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 02:07PM
Yeah , it's now the next step that is confusing.

Look at it and try it on your dockstar, what is the exact copy and paste

You say at step 5 # edit out HTML cruft

What do you mean exactly?

I open the file with
nano lcd4linux.conf

I see everything the first line does have html stuff in it, do I put ### in front of the first line or what exactly.

I did see on second line dev/sdc and I edited it to make to go to dev/sda which is my port.

I run the command to run the program
./lcd4linux -F -v -f ../lcd4linux.conf

I get:


Version 0.11.0-SVN-965 starting
stat(../lcd4linux.conf) failed: No such file or directory

This is what the nano edit shows me, the first few lines:






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="sl_SI" lang="sl_SI"><head><meta http-equiv="Content-Type$
Driver 'st2205'
Port '/dev/sda'
Font '6x8'
Foreground '0000ff'
Background 'ffffff'
Basecolor 'ffffff'
}

Display png {
Driver 'Image'
Format 'PNG'
Size '128x128'
Font '6x8'
Pixel '1+0'
Gap '0x0'
Foreground '0000ff'
Background 'ffffff'
Basecolor 'ffffff'
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 02:11PM
I have attached a working (but not vert exciting lcd4linux.conf file). Give it a shot.
wget -O - 'http://forum.doozan.com/file.php?2,file=38,filename=lcd4linux.conf,download=1'; > lcd4linux.conf
# edit the /dev/sdX line so it uses the right device
chmod 600 ./lcd4linux.conf
./lcd4linux -F -v -f ./lcd4linux.conf

-PG



Edited 5 time(s). Last edit at 11/21/2010 02:37PM by petergunn.
Attachments:
open | download - lcd4linux.conf (2.7 KB)
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 02:18PM
I am getting this error now, I did download it and edit it.

root@debian:~/lcd4linux-0.11.0-SVN# ./lcd4linux -F -v -f ./lcd4linux.conf
Version 0.11.0-SVN-965 starting
security error: group or other have access to './lcd4linux.conf'


I rebooted dockstar and I get the same error.

the start command must be off in some way, right?



Edited 1 time(s). Last edit at 11/21/2010 02:25PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 02:36PM
rgtaa Wrote:
-------------------------------------------------------
> I am getting this error now, I did download it and
> edit it.
...
> security error: group or other have access to
> './lcd4linux.conf'

Its a LCD4Linux security thing. The following should fix it...
chmod 600 lcd4linux.conf

-PG



Edited 1 time(s). Last edit at 11/21/2010 02:37PM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 03:04PM
Yes!
That did it.

I think I would need better font sizes because it's very tiny, but it works!
Thanks Thanks Thanks!

Now to figure out root access from this thing, but you made my day, Peter. :)

it tells me IP address
Time
Date
Kernal
Free ram
time up

Cool!

Peter is there a way to have it start on start up, right as it boots.
I would like to do start up script for this and for the monitor I've attached, then I wouldn't have to go to another pc to start both the monitor and the 5 dollar lcd.
Do you know about start-up scripts for this stuff?



Edited 2 time(s). Last edit at 11/21/2010 03:16PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 03:28PM
> Yes! That did it.

Yay! :-)

> Peter is there a way to have it start on start up, right as it boots.

General debian forums would be the best place for that sort of question.

I just tend to stick anything I want to start on boot at the end of /etc/rc.local before the "exit 0" line. The /etc/rc.local gets executed after all the other boot up stuff has finished.

Remember to remove the -F option so it runs in the background.

If you installed LCD4Linux and its in your path you might use something like...
# at end of /etc/rc.local ...
lcd4linux -f /path/to/config/lcd4linux.conf  # start up picframe display 
startx < /dev/null > /dev/null 2>&1 &        # start up displaylink monitor
exit 0

-PG



Edited 4 time(s). Last edit at 11/21/2010 03:49PM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 04:38PM
Can you check out your /etc/rc.local file because I can't get either program to work.
Here is my /etc/rc.local
I tried it a couple of ways since I wasn't sure if I needed /root/ first or not , I tried it both ways from the 5 dollar screen.
And I can't get startx to start on startup.

#!/bin/sh -e
#
# set date
rdate ptbtime1.ptb.de >/dev/null &
#
#oscam system compat
echo 2 > /proc/cpu/alignment
#
#set LED
echo default-on > /sys/class/leds/dockstar\:orange\:health/trigger
echo none > /sys/class/leds/dockstar\:orange\:misc/trigger
#
#
/usr/local/bin/camstart &
lcd4linux -f /root/lcd4linux-0.11.0-SVN/lcd4linux.conf
startx < /dev/null > /dev/null 2>&1 &


mount -a

exit 0


i also tried it
cd4linux -f /lcd4linux-0.11.0-SVN/lcd4linux.conf

from root directory:

root@debian:~# cd lcd4linux-0.11.0-SVN

root@debian:~/lcd4linux-0.11.0-SVN# dir

AUTHORS drv_MilfordInstruments.o lcd4kde.conf plugin_sample.c
COPYING drv_NULL.c lcd4linux plugin_sample.o
CREDITS drv_NULL.o lcd4linux.c plugin_seti.c
ChangeLog drv_Noritake.c lcd4linux.conf plugin_seti.o
INSTALL drv_Noritake.o lcd4linux.conf.sample plugin_statfs.c
Makefile drv_PHAnderson.c lcd4linux.kdelnk plugin_statfs.o
Makefile.am drv_PHAnderson.o lcd4linux.lsm plugin_string.c
Makefile.in drv_Pertelian.c lcd4linux.o plugin_string.o
NEWS drv_Pertelian.o lcd4linux.xpm plugin_test.c
README drv_RouterBoard.c lcd4linux_i2c.h plugin_test.o
TODO drv_RouterBoard.o missing plugin_time.c
ac_python_devel.m4 drv_Sample.c mkinstalldirs plugin_time.o
aclocal.m4 drv_Sample.o pid.c plugin_uname.c
cfg.c drv_SimpleLCD.c pid.h plugin_uname.o
cfg.h drv_SimpleLCD.



Edited 1 time(s). Last edit at 11/21/2010 04:39PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 05:08PM
Use the full path of all the files...

/root/lcd4linux-0.11.0-SVN/lcd4linux -f /root/lcd4linux-0.11.0-SVN/lcd4linux.conf
/usr/bin/startx < /dev/null > /dev/null 2>&1 &

The commands will be run as root so make sure startx works when you are root and doesn't need anything that is mounted when 'mount -a' is executed.

If startx isnt working change it to output stderr to a file and have a look at the file for clues...

/usr/bin/startx < /dev/null > /tmp/startx_output.txt 2>&1 &

-PG
Re: LCD screen for your dockstar (cheap! <$5)
November 21, 2010 05:27PM
Thanks Peter
Can you start monitor and lcd 5 dollar screen from start up script?

If you can , can you post your /etc/rc.local

so I can compare it to mine. I'm thinking I followed your guide so it should be the same, right?

here is my /etc/rc.local
#!/bin/sh -e
#
# set date
rdate ptbtime1.ptb.de >/dev/null &
#
#oscam system compat
echo 2 > /proc/cpu/alignment
#
#set LED
echo default-on > /sys/class/leds/dockstar\:orange\:health/trigger
echo none > /sys/class/leds/dockstar\:orange\:misc/trigger
#
#
/usr/local/bin/camstart &

/root/lcd4linux-0.11.0-SVN/lcd4linux -f /root/lcd4linux-0.11.0-SVN/lcd4linux.conf
/usr/bin/startx < /dev/null > /dev/null 2>&1 &
/usr/bin/startx < /dev/null > /tmp/startx_output.txt 2>&1 &


mount -a

exit 0




and I can't find anything in /tmp

r
root@debian:/# cd tmp
root@debian:/tmp# dir
root@debian:/tmp#


I can start startx from root directory , so we are on the same page on that.

I listed my other directories before. do you think it's some security stuff chmod stuff?

I appreciate you taking time to help us out on this.



Edited 2 time(s). Last edit at 11/21/2010 05:33PM by rgtaa.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: