Welcome! Log In Create A New Profile

Advanced

LCD screen for your dockstar (cheap! <$5)

Posted by petergunn 
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 04:34PM
Thanks rat
I see my problem , for picframe I used __ and should have used -- . I corrected it.


I can't get displaylink to blink, is that suppose to? or fast scroll.


# start up st2205term instance for Displaylink
$ST2205TERMDIR/st2205term \
--font=giant \
--dlo \
--keyboard=/dev/input/event0 \
--fontdata=$ST2205TERMDIR/fonts.txt \
--keymap=$ST2205TERMDIR/us.kmap < /dev/null > /dev/null 2>&1 &
--blink \
--dlo-fast-scroll=yes \

I like the blink feature , it tells me that system is going. Good Job on that.



Edited 6 time(s). Last edit at 12/01/2010 04:48PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 05:11PM
rgtaa Wrote:
-------------------------------------------------------
> I can't get displaylink to blink, is that suppose
> to? or fast scroll.
>
>
> # start up st2205term instance for Displaylink
> $ST2205TERMDIR/st2205term \
> --font=giant \
> --dlo \
> --keyboard=/dev/input/event0 \
> --fontdata=$ST2205TERMDIR/fonts.txt \
> --keymap=$ST2205TERMDIR/us.kmap < /dev/null > /dev/null 2>&1 &
> --blink \
> --dlo-fast-scroll=yes \


looks like bash syntax issue... try...
# start up st2205term instance for Displaylink
$ST2205TERMDIR/st2205term \
    --font=giant \
    --dlo \
    --keyboard=/dev/input/event0 \
    --fontdata=$ST2205TERMDIR/fonts.txt \
    --blink \
    --dlo-fast-scroll=yes \
    --keymap=$ST2205TERMDIR/us.kmap < /dev/null > /dev/null 2>&1 &

The "\" concatenates lines so it has to be at the end of every line except the last one

-PG
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 05:21PM
Peter
That did it.
Thanks

(not on topic -- Peter I have a thread on restoring save nanddump back onto Nand , do you know how to do that, you seem so knowledgeable about linux stuff, if you have some type of answer, you can answer in that thread, and if you don't know about that stuff, no problem).

(also, not on topic -- a number of us in another forum room can't figure out how to put squeezebox slave in startup rc.local , I told some of the guys about you and you probably could figure it out, since No private message area in this forum site, didn't know how else to talk to you about it, here is the site, this forum room I'm linking too is for dockstar/squeezeplug stuff, and it's for music server and client stuff, internet radio. I have music server going on dockstar and slave (client with audio toggle and speakers attached to dockstar)
http://forums.slimdevices.com/showthread.php?t=76466&page=122


I look forward to your next project for the dockstar.

Have anything else planned to put on the lcd screen?

I love the picture frame hack and monitor stuff.



Edited 2 time(s). Last edit at 12/01/2010 05:27PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 08:02PM
rgtaa Wrote:
-------------------------------------------------------
> (not on topic -- Peter I have a thread on
> restoring save nanddump back onto Nand , do you
> know how to do that, you seem so knowledgeable
> about linux stuff, if you have some type of
> answer, you can answer in that thread, and if you
> don't know about that stuff, no problem).

Sorry not my area - I'm more into network/application development
on Intel/AMD. Anything beyond flashing a router with DD-WRT is
beyond me :-)

> (also, not on topic -- a number of us in another
> forum room can't figure out how to put squeezebox
> slave in startup rc.local , I told some of the
> guys about you and you probably could figure it
> out, since No private message area in this forum
> site, didn't know how else to talk to you about it

Try emailing squeezeplug at wingovers.com (actually pretty much anything at wingovers.com should work :-)

> Have anything else planned to put on the lcd
> screen?

Not sure whats next really. I could do all sorts of things like add a screensaver that does metrics like LCD4Linux or does a picture slideshow. I was also thinking about possibly messing with a webcam and streaming video to the picframe then maybe adding face recognition with OpenCV - with 2x picframes I could make them look like eyes that follow you around the room :-)

Or, I'll probably leave it the way it is for now. Time is tight and there is a bunch of other non-dockstar stuff needing attention.

> I love the picture frame hack and monitor stuff.

Thanks. I'm wondering how it will work on less powerful devices like routers. I don't have any with usb ports but hopefully someone will give it a try.

-PG
rat
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 09:28PM
Following eyeballs? You guys are starting to scare me now...

Well, as far as the LCDs go. I have my DP151SX hacked and after considering what I'd need to do, I think I prefer the Shift3 (even despite the battery icon) if only because it's the simplest solution and requires no modifications or additions for me to have something that works. (I sit it directly on the connector. No turning the unit on its side, no mini B to mini A extension cables, no using a different USB port, etc) Shame because the white plastic matches perfectly.

Seeing as there might be other people who are possibly interested in having something like this for themselves, seems a shame to leave the thing sitting in the closet as I have no use for a second.

If anyone wants, I'll sell my DP151 hacked unit for the cost of what I paid for it and shipping. It'll save someone the trouble of hunting down a working unit and hacking it themselves.
Re: LCD screen for your dockstar (cheap! <$5)
December 01, 2010 09:41PM
rat Wrote:
-------------------------------------------------------
> Well, as far as the LCDs go. I have my DP151SX
> hacked and after considering what I'd need to do,
> I think I prefer the Shift3 (even despite the
> battery icon) if only because it's the simplest
> solution and requires no modifications or
> additions for me to have something that works. (I
> sit it directly on the connector. No turning the
> unit on its side, ...

If its just a rotation issue you might try hacking libst2205.
In st2205.c you could change...
    case 16:
            c = getpixel(h, pixinfo, x, y);
to
    case 16:
            if (getenv("ROTATE")==NULL)
                c = getpixel(h, pixinfo, x, y);
            else
                c = getpixel(h, pixinfo, y, x);
Then if you want rotation you could start st2205term or LCD4Linux with...
export ROTATE=1 
./st2205term ....

I haven't tried this but I don't see why it wouldn't work.
-PG
Justin Laughlin
Re: LCD screen for your dockstar (cheap! <$5)
December 09, 2010 12:22PM
I have some Coby DP-152's and my friend made the one line code change to the st2205tool source and downloaded the new hack config, then recompiled but it still does not recognize the frame. I am a furniture design major at the California College of the Arts and I designed a cabinet for my final project with some of these screens embedded in it but I am having trouble getting the firmware to update. Any ideas on what we could be doing wrong? Thanks, Justin
Re: LCD screen for your dockstar (cheap! <$5)
December 09, 2010 10:23PM
Justin Laughlin Wrote:
-------------------------------------------------------
> Any ideas on what we could be doing wrong?
> Thanks, Justin

Check dmesg output to make sure your picframe is being recognized as USB storage rather than a scsi CDROM. Devices that are detected as a CDROM are not hackable - but I haven't seen any DP-152s like that yet.

Does the following write text to the picframe?
cd st2205tool
./phack -m /dev/sdX "test" # replace /dev/sdX with your picframe device name

If your picframe registers as a regular /dev/sdX device and phack -m works then you may just have a new firmware version. In this case the generate-hack.pl script may be able to create a new hack config for you.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
December 11, 2010 08:13PM
Peter
Remember when I told you in your guide that something was wrong with the first part.
I figured out what you are missing.
Go look at first page of this thread, the first steps.
The correct first part is there but not on your webpage.
You forgot to put some of those steps on your webpage.
That is why your webpage didn't work for me.

add this to your webguide:
apt-get install libgd2-xpm-dev

# 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



Edited 2 time(s). Last edit at 12/11/2010 08:18PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
December 11, 2010 08:34PM
Thanks rtgaa, I'll update the web page next time I get near my laptop.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
December 12, 2010 03:05PM
First, let me thank everyone for working on this. it is amazing.

i've been using the DP-152 with my dockstar for about a month, and i have come up with a few questions about lcd4linux and the DP-152 itself. This may not be the best place to ask these questions, but i'm not really sure who else to ask.

I am concerned about the life of my DP-152. i have removed the internal battery, and now i am worried about the screen itself. this may be an unfounded concern, but it would suck if this thing broke. As a way to extend it, i have been unplugging the usb connector from it and then killing the process via SSH. when i want to use it again, i plug it back in and fire up lcd4linux via SSH. This works, but is somewhat cumbersome.

has anyone experimented with the three buttons on this thing? it'd be cool if we could map them to something, or use them to turn the screen off. Anyone have any ideas?

also, does anyone know how to get lcd4linux to display the free space on the drives mounted on the dockstar? something like 'df' from the command shell?

thanks in advance!
Re: LCD screen for your dockstar (cheap! <$5)
December 12, 2010 05:16PM
tegsirat

You might want to go through the tread, because some of your answers lie there.

Peter and Me had discussion on how to hot plug this device and also put it in startup script.

Very cool stuff.

So I can remove the mini screen any time and plug it in and it will work.
So you could use it to see something on screen then remove it and plug it in later and it works.
Also Jeff created root access so I can type with keyboard from dockstar and do apt-get and do everything I can do from ssh.
This is nice because even if I have network problem I can see stuff from lcd and fix network interface.
Hopefully Peter will figure out other cool gadgets that will work on this screen, I think Peter has a lot going on with the holidays, he said when he gets some time, he will look into the 3 buttons and getting other cool stuff working.

Even a webcam and using this device as screen to see stuff, securitycam! :)

I would also like music/internet radio gadget so we can use the 3 buttons to change radio stations and control volume.

Also, like you said having a gadget that shows IP address, amount of memory free on drive , or other stats on screen, and using the 3 buttons to cycle through different info about dockstar system, maybe even clock, root access, wifi stats, memory stats, network stats, securitycam viewer, changing music folders, internet radio station changer, so ... it could do a lot of cool things from this screen , using the 3 buttons to pick stuff just like the picture frame has a menu to do different stuff using those 3 buttons. :)

Good stuff in this thread.



Edited 3 time(s). Last edit at 12/12/2010 05:30PM by rgtaa.
rat
Re: LCD screen for your dockstar (cheap! <$5)
December 12, 2010 11:23PM
tegsirat:
>I am concerned about the life of my DP-152. i have removed the
>internal battery, and now i am worried about the screen itself. this
>may be an unfounded concern, but it would suck if this thing broke.
>As a way to extend it, i have been unplugging the usb connector
>from it and then killing the process via SSH. when i want to use it
>again, i plug it back in and fire up lcd4linux via SSH. This works,
>but is somewhat cumbersome.

You're actually putting more wear and tear on the device by constantly cutting power to it and unplugging it. Just leave it plugged in and don't worry about it. LCDs don't tend to wear out. They may develop stuck pixels over time but even then, it's not that likely. You'd do better to just leave it alone if you have it working as a status display for most of the time like I do.

>also, does anyone know how to get lcd4linux to display the free space
>on the drives mounted on the dockstar? something like 'df' from the
>command shell?

The options for lcd4linux are horribly limited and the documentation is absolutely terrible... but I did manage to find some sample conf files that had more widget examples after a few days searching.

Getting MemFree is buggy and no matter what you do with it, it will return an incorrect value. I only include it for reference.

If you want to have it display free space on the drive:

Widget RootFSSpace {
class 'Text'
expression statfs('/', 'bavail')*statfs('/', 'bsize')/1024/1024
prefix 'Disk: '
postfix 'MB Free'
precision 2
width 21
align 'C'
update 10000
}


Will return free space starting from root, so this will include anything that is mounted in a branch beyond your rootpoint.

Add another /1024 if you want the value to be in Gigabytes. ( expression statfs('/', 'bavail')*statfs('/', 'bsize')/1024/1024/1024 ) If you make that change, also change the postfix text to say GB Free. My Dockstar only has a 4GB SD card, so I let it display in MB.

Right now it says: Disk: 2554.87 MB Free

Adding the extra /1024 and changing it to say GB Free will make it appear as: Disk: 2.49 GB Free

Buggy RamFree code below:

Widget RAMFree {
class 'Text'
expression meminfo('MemFree')/1024
prefix 'RAM '
width 9
precision 0
align 'L'
update tick
}

Does not work. Don't even try to get it to work. No matter what you change the division value to, you will never get an accurate reading of free ram using this widget code. Shame, because it's one of the two things I wanted most to see on the screen when using lcd4linux.

My lcd4linux.conf file is attached. One thing that isn't documented or immediately obvious is that you can pretty much set each row to any text color you want, but unfortunately you cannot set the inside bar color apart from the outline. I set the sensitivity of ETH0 to a very high number (50000) because it was getting distracting seeing the whole bar light up for even the most minimal typing. I pretty much have to hit above 0.5MB/sec for it to max out. You'll also notice my last two lines were shifted over due to my Shift3's battery icon overlay.

There's other things you can do with it, but when it comes to status display, I don't have a UPS or RAID on this thing... and those are the only other status info bits I've seen working for lcd4linux.

Pic of mine as it is right now: http://i.imgur.com/CZckS.jpg

Yellow makes it easier to look at at night/low light.
Attachments:
open | download - lcd4linux.conf (3.3 KB)
Re: LCD screen for your dockstar (cheap! <$5)
December 13, 2010 07:57PM
Guys,

thanks for all of the help.

rgtaa: I read through the entire forum, and maybe i'm a dummy, but i am a bit confused between the ST2205term, displaylink, etc. Do you have a concise code example of how to get the hotplug to work?

As for the buttons, it'd be amazing if we could get these to 'work'. LCD4Linux has some built in stuff to do this, but i don't know where to begin to find out the mappings for the buttons. Anyone know of a way to sniff the USB line for GPIO info?

rat: thanks for the info on the lcd. i figured i was worried about nothing. I'm going to set it up with the new 'ROOTFSSpace' widget, and give it a whirl. one question: any idea on how to get this to show individual disks?
Re: LCD screen for your dockstar (cheap! <$5)
December 13, 2010 08:37PM
The hotplug works because Peter linked right to the device in rc.local file. So anywhere it sees this device It will hotplug it. Before it was set to first usb slot a, or one of the others ones, so you are gonna have to read what peter said to do.



Edited 1 time(s). Last edit at 12/13/2010 10:11PM by rgtaa.
rat
Re: LCD screen for your dockstar (cheap! <$5)
December 14, 2010 12:33AM
tegsirat Wrote:
-------------------------------------------------------
> rat: thanks for the info on the lcd. i figured i
> was worried about nothing. I'm going to set it up
> with the new 'ROOTFSSpace' widget, and give it a
> whirl. one question: any idea on how to get this
> to show individual disks?


Should be as simple as changing the values:

Widget ShowDriveSpaceSDA {
class 'Text'
expression statfs('/dev/sda1', 'bavail')*statfs('/dev/sda1', 'bsize')/1024/1024
prefix 'SDA1: '
postfix 'MB Free'
precision 2
width 21
align 'C'
update 10000
}

Widget ShowDriveSpaceSDC {
class 'Text'
expression statfs('/dev/sdc1', 'bavail')*statfs('/dev/sdc1', 'bsize')/1024/1024
prefix 'SDC1: '
postfix 'MB Free'
precision 2
width 21
align 'C'
update 10000
}


etc...

The problem is that you have to specify the path BEFORE you start LCD4Linux... and if there is nothing plugged in that would go to that path or if it happens to be assigned a different path than the one you specified... OR if you unplug the device, it'll just spam you with:

statfs(/dev/sdc1) failed: No such file or directory
statfs(/dev/sdc1) failed: No such file or directory

etc... for every time it updates.

Gave it a whirl and when I plugged in a thumbdrive, it refreshed from: SDC1: 0.00 MB Free - to: SDC1: 54.89 MB Free

So it works.
Re: LCD screen for your dockstar (cheap! <$5)
December 14, 2010 08:41PM
I got the m_shift3.zip and a shilft3(with silver back), hmm, now what?

If you can be so kind as to put some steps together I will try them,clean them up, post some pics(in focus) on my site. As always, proper attribute will be given back to anyone who assists.

I want to get my general DockStar hacking guide up by year end, might be nice to also have the display hacking included.

Also why did you not reverse the top usb port? Seems simple enough to do. Might give it a try, worst case is you trash that one port only.

I just updated the mirror of my main site to run of my dockstar, will move over my main site soon.
Mirror is www.codewarriorcanada.com

Many thanks.

Glen Lalonde
www.binarysearchtree.com
glalonde at gmail.com
Re: LCD screen for your dockstar (cheap! <$5)
December 14, 2010 09:30PM
glalonde Wrote:
-------------------------------------------------------
> I got the m_shift3.zip and a shilft3(with silver
> back), hmm, now what?

* Follow steps 1 to 3 from the original instructions. You may also need to make the 1-line code change to main.c before compiling.

* Archive an extra backup of your original firmware (just in case)...
cd st2205tool && ./phack -df /root/original-firmware.bin /dev/sdX
* Unzip the m_shift3 directory into the st2205tool/hack directory.

* Step 4 of the original instructions - Hack your device

Disclaimer: I don't have a Shift3. rat is the only person that I know of that has hacked one.

-PG
rat
Re: LCD screen for your dockstar (cheap! <$5)
December 15, 2010 03:30PM
>petergunn
>Disclaimer: I don't have a Shift3. rat is the only person that I know of that has hacked one.

Beat me to it. But yep, it's really that simple. Everything else was either my own screwing up the process by not knowing what to do or not remembering one crucial step before I started (going into superuser mode)...

So glalonde, make sure, before you start downloading and making everything, you're putting everything in a folder (for keeping things tidy) and doing every step as root.

The Shift3 is going to be about as easy to hack as the DP152's... Some minor tweaks needed, but since I dumped the firmware, got it reassembled thanks to PG's tool, and uploaded it, all the hard work is done for you.


>glalonde
>Also why did you not reverse the top usb port? Seems simple enough
>to do. Might give it a try, worst case is you trash that one port only.

Up to a point. You have to shave off part of the plastic/rubber plug molding that bends the cable. I opted not to do it because I didn't want to risk damaging the cable itself. I already had a close call with my Dockstar and just didn't want to push my luck. I, also, built a (cheesy, but functional) cardboard mount for the dockstar as it works better for me to have the screen "backwards" as I have direct access to the rear USB port. (It also aligns it at an angle from where I sit so that the backlight glare of the Shift3 screen isn't a problem, in other words, correct viewing angle for this type of LCD) So when I put it into root prompt mode with st2205term, I don't need to keep adjusting my line of sight to the dockstar or use a USB cable to bring it closer. It looks really ghetto/tacky, but it works quite well for me. Maybe I'll get a proper one made using a sheet of acrylic. ;)

http://i.imgur.com/ezWrh.jpg - Mount from the front
http://i.imgur.com/JDWJB.jpg - Mount from the side.

Funny how all those things you put on that list of things you plan to do with your Dockstar before you actually get it...tend to change when you actually do have it. Instead of just being a replacement Linux Server for media files and LAN based hosting, it turned into my primary always-on linux desktop. I just hope there's another lull coming around for these because I'd love to snag a 2nd for $30 to have as a backup device.
Re: LCD screen for your dockstar (cheap! <$5)
December 15, 2010 08:06PM
Step 1 did not go too well, missing libs, then compile failed:

(issued wget then tar ok then...)

/home/glen/picFrame:apt-get install libgd2-xpm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libexpat1-dev libfontconfig1-dev libfreetype6-dev libgd2-xpm libjpeg62-dev libpng12-dev libpthread-stubs0
libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxpm-dev pkg-config x11proto-core-dev
x11proto-input-dev x11proto-kb-dev xtrans-dev zlib1g-dev
Suggested packages:
libgd-tools
The following NEW packages will be installed:
libexpat1-dev libfontconfig1-dev libfreetype6-dev libgd2-xpm libgd2-xpm-dev libjpeg62-dev libpng12-dev
libpthread-stubs0 libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxpm-dev pkg-config
x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev zlib1g-dev
0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 4769 kB/6979 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://ftp.us.debian.org/debian/ squeeze/main libx11-dev armel 2:1.3.3-3
404 Not Found [IP: 204.152.191.39 80]
Err http://ftp.us.debian.org/debian/ squeeze/main libfreetype6-dev armel 2.4.2-1
404 Not Found [IP: 204.152.191.39 80]
Err http://ftp.us.debian.org/debian/ squeeze/main libgd2-xpm armel 2.0.36~rc1~dfsg-4
404 Not Found [IP: 204.152.191.39 80]
Err http://ftp.us.debian.org/debian/ squeeze/main libgd2-xpm-dev armel 2.0.36~rc1~dfsg-4
404 Not Found [IP: 204.152.191.39 80]
Failed to fetch http://ftp.us.debian.org/debian/pool/main/libx/libx11/libx11-dev_1.3.3-3_armel.deb 404 Not Found [IP: 204.152.191.39 80]
Failed to fetch http://ftp.us.debian.org/debian/pool/main/f/freetype/libfreetype6-dev_2.4.2-1_armel.deb 404 Not Found [IP: 204.152.191.39 80]
Failed to fetch http://ftp.us.debian.org/debian/pool/main/libg/libgd2/libgd2-xpm_2.0.36~rc1~dfsg-4_armel.deb 404 Not Found [IP: 204.152.191.39 80]
Failed to fetch http://ftp.us.debian.org/debian/pool/main/libg/libgd2/libgd2-xpm-dev_2.0.36~rc1~dfsg-4_armel.deb 404 Not Found [IP: 204.152.191.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
/home/glen/picFrame:cd st2205tool
/home/glen/picFrame/st2205tool:make
make -C setpic
make[1]: Entering directory `/home/glen/picFrame/st2205tool/setpic'
cc -g -Wall -I../libst2205 -c -o main.o main.c
main.c:25:16: error: gd.h: No such file or directory
main.c: In function 'sendpic':
main.c:38: error: 'gdImagePtr' undeclared (first use in this function)
main.c:38: error: (Each undeclared identifier is reported only once
main.c:38: error: for each function it appears in.)
main.c:38: error: expected ';' before 'im'
main.c:49: error: 'im' undeclared (first use in this function)
main.c:49: warning: implicit declaration of function 'gdImageCreateFromPng'
main.c:58: warning: implicit declaration of function 'gdImageGetPixel'
main.c:59: warning: implicit declaration of function 'gdImageTrueColor'
main.c:60: warning: implicit declaration of function 'gdTrueColorGetRed'
main.c:61: warning: implicit declaration of function 'gdTrueColorGetGreen'
main.c:62: warning: implicit declaration of function 'gdTrueColorGetBlue'
main.c:64: warning: implicit declaration of function 'gdImageRed'
main.c:65: warning: implicit declaration of function 'gdImageGreen'
main.c:66: warning: implicit declaration of function 'gdImageBlue'
main.c:77: warning: implicit declaration of function 'gdImageDestroy'
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/glen/picFrame/st2205tool/setpic'
make: *** [setpic/setpic] Error 2
/home/glen/picFrame/st2205tool:

I assume this is a result of the missing libs from step above?
Re: LCD screen for your dockstar (cheap! <$5)
December 15, 2010 08:07PM
Try...
apt-get update && apt-get install libgd2-xpm-dev
-PG
Re: LCD screen for your dockstar (cheap! <$5)
December 15, 2010 11:08PM
petergunn Wrote:
-------------------------------------------------------
> Try...
>
> apt-get update && apt-get install libgd2-xpm-dev
>
> -PG


that did it, step 1 completed now. Will try the rest tomorrow, it's too late now.

Also I got 3 dockstars at 30/each so I can risk breaking the top port of one on a reversal attempt.
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 08:13PM
Rat:

thanks for all of your help, the disk space thing is just what i was looking for!

Rgtaa:

i'm a dummy, i can't figure it out. i read every page on this forum again, and it doesn't make sense exactly what needs to be done to have this thing hotplug and automatically start and stop lcd4linux.

all:

nobody has any idea on getting the buttons to work?!?
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 08:19PM
tegsirat Wrote:
-------------------------------------------------------
> i'm a dummy, i can't figure it out. i read every
> page on this forum again, and it doesn't make
> sense exactly what needs to be done to have this
> thing hotplug and automatically start and stop
> lcd4linux.

I dont think there is a solution to hot plugging LCD4Linux in this thread - just st2205term which has hotplug support.

You could try to create a udev rule to start LCD4Linux when the device is inserted. This is probably the "correct" way. I dont know how to do this.

A quick and dirty hack would be to write a quick script that periodically checks for the picframe and starts LCD4Linux when the device appears.

> all:
>
> nobody has any idea on getting the buttons to
> work?!?

I dont think its currently possible. The device does not normally send a signal over the USB cable when a button is pressed so at minimum a new firmware hack would be required.

-PG
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 08:35PM
Sorry tegsirat for giving wrong info on hotplugging into lcd4linux. Peter figured out the way to hot plug for the root access on the mini-lcd which is all I've used the mini-lcd for. It must have been frustrating reading the posts and not getting it to work.

Well, now we know it just works for root access. sorry again.



Edited 1 time(s). Last edit at 12/16/2010 08:36PM by rgtaa.
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 08:48PM
Don't give up though a quick script like the following will probably work...

/usr/local/bin/hotplug_lcd4linux.sh
#!/bin/bash
while [ 1 ]
do
    while [ 1 ]
    do
        if [ -e /dev/sdX ]; then break; fi
        sleep 2
    done
    lcd4linux .... # whatever your lcd4linux startup options are
    sleep 2
done
make it executable...
chmod +x /usr/local/bin/hotplug_lcd4linux.sh
/etc/rc.local - before the "exit 0" start up the script on boot...
/usr/local/bin/hotplug_lcd4linux.sh < /dev/null >/dev/null 2>/dev/null &

I haven't tried any of this :-)

-PG



Edited 1 time(s). Last edit at 12/16/2010 08:51PM by petergunn.
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 10:38PM
Peter:

thanks for the info. i will try it. one question - it looks like your code will just start lcd4linux. what happens when i disconnect? i'm thinking that it will keep running, which may cause issues. i'll give it a swing.

Rgtaa:

no worries - i figured it was something like this.

All:

on the button thing, i figured it be simpler. i know lcd4linux will support button presses, but the documentation on it at the st2205hack thing isn't so helpful to a dummy like me! maybe someone will figure this out one day.
Re: LCD screen for your dockstar (cheap! <$5)
December 16, 2010 11:07PM
ah, and i have some other strangeness:

i finally updated my config file earlier, and i am getting the same value from rat's post above. the strange thing is, it wasn't showing the same available space values as -df from the command line. i put in my own multiplier as a test, and it seemed to work. i continued to add sections for my other three drives, and now all four entries are showing the same value. any ideas? here's an exerpt from my config:

Widget ShowDriveSpaceHD98 {
class 'Text'
expression statfs('/dev/sda1', 'bavail')*0.040669441
#*statfs('/dev/sda1', 'bsize')
prefix 'HD98: '
postfix ''
precision 0
width 9
align 'L'
update 10000
} 

Widget ShowDriveSpaceHD44 {
class 'Text'
expression statfs('/dev/sde1', 'bavail')*0.040669441
#*statfs('/dev/sde1', 'bsize')
prefix 'HD44: '
postfix ''
precision 0
width 9
align 'R'
update 10000
}

Widget ShowDriveSpaceHD43 {
class 'Text'
expression statfs('/dev/sdc1', 'bavail')*0.040669441
#*statfs('/dev/sde1', 'bsize')
prefix 'HD43: '
postfix ''
precision 0
width 9
align 'R'
update 10000
}

Widget ShowDriveSpaceHD45 {
class 'Text'
expression statfs('/dev/sdd5', 'bavail')*0.040669441
#*statfs('/dev/sde1', 'bsize')
prefix 'HD45: '
postfix ''
precision 0
width 9
align 'R'
update 10000
}

rat
Re: LCD screen for your dockstar (cheap! <$5)
December 17, 2010 02:57AM
tegsirat Wrote:
-------------------------------------------------------
> on the button thing, i figured it be simpler. i
> know lcd4linux will support button presses, but
> the documentation on it at the st2205hack thing
> isn't so helpful to a dummy like me! maybe someone
> will figure this out one day.

This is just something I'm not holding my breath on. The st2205 project was all but completely dead until this Dockstar thing and Peter Gunn's work revived it again. (I had looked into it about 2 years ago as a status display for my headless linux box and I was a lot greener then... and the information was even more scattered despite the wiki being there) I honestly haven't been able to find too much activity around the st2205 aside from us and this thread. (Almost EVERY change I made to my picframe wiki is still standing, meaning I was the last to revise) I'd almost say we're the only torchbearers at the moment. In hindsight, I'm VERY surprised I lucked out the way I did with the Shift3 because it probably wouldn't have been something I would have bothered to try to hack if I knew what I was getting myself into. ;)

> i finally updated my config file earlier, and i am
> getting the same value from rat's post above. the
> strange thing is, it wasn't showing the same
> available space values as -df from the command
> line. i put in my own multiplier as a test, and it
> seemed to work. i continued to add sections for my
> other three drives, and now all four entries are
> showing the same value. any ideas? here's an
> exerpt from my config:

Probably because the original entry calculates filespace based on "/" root path and when you mount anything, it's branched off root under /dev/- or the other likely scenario: lcd4linux is just buggy and quirky as hell.
Re: LCD screen for your dockstar (cheap! <$5)
December 17, 2010 10:27PM
glalonde Wrote:
-------------------------------------------------------
> petergunn Wrote:
> --------------------------------------------------
> -----
> > Try...
> >
> > apt-get update && apt-get install
> libgd2-xpm-dev
> >
> > -PG
>
>
> that did it, step 1 completed now. Will try the
> rest tomorrow, it's too late now.
>
> Also I got 3 dockstars at 30/each so I can risk
> breaking the top port of one on a reversal
> attempt.

Not too much luck:



lsusb:
Bus 001 Device 022: ID 1403:0001 Sitronix Digital Photo Frame

dmesg:
[ 174.946559] scsi 1:0:0:0: Direct-Access SITRONIX MULTIMEDIA 0.09 PQ: 0 ANSI: 0 CCS
[ 174.960145] sd 1:0:0:0: [sdb] 4096 512-byte logical blocks: (2.09 MB/2.00 MiB)
[ 174.982886] sd 1:0:0:0: [sdb] Write Protect is off
[ 174.987765] sd 1:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[ 174.987776] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 174.997739] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 175.003870] sdb: unknown partition table
[ 175.029764] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 175.035922] sd 1:0:0:0: [sdb] Attached SCSI removable disk





end of ./hackfw.sh /dev/sdb


Uploading fw
Expected response 8 on cmd 1, got 0x10!
Firmware update! If unsure, press ctrl-C NOW!
Too late. Commencing firmware update...
..
Firmware upgraded. Un- and replug USB connection to restart device.


All done. To test, disconnect the device and when it has rebooted, connect
it again, go into 'update mode' and press enter. To quit, use ctrl-c.

Ok, just a sec...
Unable to get parm_block
Open failed!


phack -m <message> /dev/sdb, does work and generates a message.


but
/home/glen/picFrame/st2205tool/setpic:setpic /dev/sdb test.png
Unable to get parm_block
Open failed!

( also had to remove the 'exit' after the check otherwise it just stopped after it generate theExpected response 8 on cmd 1, got 0x10! message, in main.c)



Edited 1 time(s). Last edit at 12/17/2010 10:30PM by glalonde.
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: