OpenWrt Forum Archive

Topic: Digital Photo Frame as OpenWrt display howto

The content of this topic has been archived between 30 Mar 2018 and 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

In my archive there is a *.patch file for lcd4linux which adds the dpf driver to lcd4linux. The patch is provided by 012devel resp. 01alpha version of dpfpackage by hackfin.
The patch which you have to use for lcd4linux depends on dpflib version !! The patchfile is located in  lcd4linux-dpf/patches/...

(Last edited by irimi on 3 Mar 2012, 19:16)

I am only using "openwrt-dpf-v0.2.tar.bz2" as you wrote at the beginning and I did not modify anything except the change of the filename  "usbuser.h" in the makefile. I do not understand why it is not working...

One question. Is the folder and the contend of "v0.12devel" necessary or can I delete it? I am asking because if I am extracting "openwrt-dpf-v0.2.tar.bz2" and after that running "make menuconfig" I have two entries in section libs for dplib

[*]dpflib
[*]dpflib

.
After deleting I have only one.

If I am doing so I get the following error:

fwload.o: In function `demo':
fwload.c:(.text+0xd4): undefined reference to `set_screen'
fwload.c:(.text+0xf0): undefined reference to `set_screen'
collect2: ld returned 1 exit status
make[4]: *** [fwload] Error 1

It seems, that the "dpf.h" wont be included. Could that be?

(Last edited by Elektrischlumpf on 4 Mar 2012, 20:31)

irimi wrote:
hvkls wrote:

If you had a link to a firmware that works, maybe you could provide a link, or contact me on a private basis...

yikes !? Did you try the firmware of above mentioned  [url]http://freakshare.com/files/99m9ba9p/Pe … r.zip.html[/url]

As I see you compiled at a PPC linux but flashed it via windows !? Are you able to flash via your PPC linux as described in step1b ?

For me it makes no difference to flash the landscape zipfile firmware at windows or by python script at linux (linux way is only faster).
The only problem I had, if you are using latest firmware and latest dpflib the display output is mirrored / 180° rotated. The workaround is to use the latest firmware but dpflib of 01alpha version hack.

Delayed reply, but I got it working just as expected. I flashed the "5 seconds landscape" firmware from http://www.vdr-portal.de/board18-vdr-ha … y-hacking/. Did so from Windows, as the entire compilation process on my Debian squeeze/PPC system was not exactly automatic... Anyway, and off-topic, you may download my Debian squeeze lcd4linux PPC binary if interested.

NOT FOR OPENWRT BUT FOR DEBIAN SQUEEZE/PPC:

$ lcd4linux -l
LCD4Linux 0.11.0-SVN-1092
Copyright (C) 2005, 2006, 2007, 2008, 2009 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>

available display drivers:
   Curses              : pure ncurses based text driver
   DPF                 : generic hacked photo frame
   Image               : PPM PNG
   LCD2USB             : LCD2USB homebrew USB interface for HD44780 text displays
   NULL                : NULL driver for testing purposes
   X11                 : any X11 server

available plugins:
  cfg, math, string, test, time, cpuinfo, diskstats, dvb, exec, fifo, file, iconv, kvv, meminfo, mpd, netdev, pop3, ppp, proc_stat, statfs, uname, uptime

(Last edited by hvkls on 14 Mar 2012, 06:29)

Could somebody compile lcd4linux with version 0.12 of the hack?
I tried it my self, but it don't works :-(

Hello Xent

yes I did. (Thank you irimi for your help)

Important is that you delete the "Makefile" and the "src" folder in the following directory:  "/trunk/feeds/packages/libs/dpflib/"
After that move the content of "/trunk/feeds/packages/libs/dpflib/v0.12devel/" to "/trunk/feeds/packages/libs/dpflib/"

Furthermore delete the file "199-lcd4linux-svn1142-dpf_v0.1alpha.patch"  in the folder "/trunk/feeds/packages/utils/lcd4linux-dpf/patches/" and then move "199-lcd4linux-svn1142-dpf-v012devel.patch" from folder "/trunk/feeds/packages/utils/lcd4linux-dpf/" to folder "/trunk/feeds/packages/utils/lcd4linux-dpf/patches/"

(Last edited by Elektrischlumpf on 21 Mar 2012, 20:27)

Thanks to Elektrischlumpf!!
Thanks to irimi!!

Now it works!

irimi, would you mind compiling a binary with the font size patch?

hvkls wrote:

irimi, would you mind compiling a binary with the font size patch?

Actually I'm working on update to dpflib version 0.2devel and lcd4linux r1184 ...

I have updated the HowTo at first page
Howto LCD4LINUX-DPF r1184

At Step2b you'll find how to build new version -r1184 with latest dpflib 0.2devel!

I have a chinese dpf, that has some a bit different firmware. I tried to flash these patches that come in a package, but none did work. I tried to patch the disassembled firmware by myself, but again bricked it. hmm

Does anyone here have skills to patch a disassembled firmware?

(Last edited by Kaar3l on 28 Mar 2012, 18:38)

Kaar3l wrote:

I have a chinese dpf, that has some a bit different firmware. I tried to flash these patches that come in a package, but none did work. I tried to patch the disassembled firmware by myself, but again bricked it. hmm

Does anyone here have skills to patch a disassembled firmware?

If you cannot use ProgSPI and firmware of http://freakshare.com/files/99m9ba9p/Pe … r.zip.html I see no chance

irimi wrote:
Kaar3l wrote:

I have a chinese dpf, that has some a bit different firmware. I tried to flash these patches that come in a package, but none did work. I tried to patch the disassembled firmware by myself, but again bricked it. hmm

Does anyone here have skills to patch a disassembled firmware?

If you cannot use ProgSPI and firmware of http://freakshare.com/files/99m9ba9p/Pe … r.zip.html I see no chance

Tried programming that. Powered up, only flickering and no readable text. Every pixel is different color. big_smile lol
Flashing back the original fw. hmm

Kaar3l wrote:

Tried programming that. Powered up, only flickering and no readable text. Every pixel is different color. big_smile lol
Flashing back the original fw. hmm

A flickering effect I get as well when I configure wrong orientation settings in lcd4linux.conf. Maybe this is your problem !? But I guess your Blue Screen Of Hack is flickering , too sad (if you get it)

(Last edited by irimi on 30 Mar 2012, 08:36)

There is a update to openwrt-dpf_r1184-2.tar.bz2 makefile.
Tarball also contains lang->python->pydpflib makefile, to build python bindings to dpflib.

Cheers,irimi

steveausten wrote:

i also using your script but it does not work .. i think u should have to re check your script ..

The build scripts work fine for me for 2 different system targets and on 2 different build hosts !
I can't see your problem if you just write "it does not work".

irimi wrote:
steveausten wrote:

i also using your script but it does not work .. i think u should have to re check your script ..

The build scripts work fine for me for 2 different system targets and on 2 different build hosts !
I can't see your problem if you just write "it does not work".

never mind, he's a spammer

lcd4linux version has been updated upto version 1187 in the trunk. There is a support of the dpf frames but libdpf is still missing in the trunk ; )

irimi wrote:

I changed my lcd4linux.conf to

Display dpf {
    Driver     'DPF'
    Port       'usb0'
    Font       '12x16'
    Foreground 'ffffff'
    Background '000000'
    Basecolor  '000000'
    Orientation 1          # Orientation value from 0-3
    Backlight  5
}

Hi irimi,
How did you get font 12x16 displayed when mpd plugin supports 6x8 font only?
Also, did you get an error message about missing libmpdclient files when compiling lcd4linux?
I am compiling it on dockstar but was able to compile it only by editing .configure file and manually disabling check for libmpdclient

Thanks
Roman

RomanG wrote:

How did you get font 12x16 displayed when mpd plugin supports 6x8 font only?
Also, did you get an error message about missing libmpdclient files when compiling lcd4linux?

I don't use lcd4linux with mpd plugin, I switched to PyDPF (at sourceforge).

I guess you are using an older version of dpflib for lcd4linux which does not support different font sizes.

At dpflib lcd4linux you can find a newer patch for newer lcd4linux version.

irimi wrote:

....
At dpflib lcd4linux you can find a newer patch for newer lcd4linux version.
....

Thanks, that did the trick.
I now have scalable fonts.

Roman

HI I have been trying to compile openwrt-dpf_r1184-2 using the trunk version of openwrt for a WR703N.
I can compile the kernel fine and when I do a make menuconfig, I do get Utilities -> lcd4linux-dpf, and Lang -> Python -> pydpflib

grep dpf .config
CONFIG_PACKAGE_lcd4linux-dpf=y
CONFIG_PACKAGE_pydpflib=y

But the closest I've come so far is:

checking which drivers to compile... done
configure: WARNING: libdpf.h not found: DPF driver disabled
configure: error: You should activate at least one driver...
make[2]: *** [/home/dextaslab/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/lcd4linux-dpf/lcd4linux-r1184/.configured_ynnnnynnnnnnnnnnnnnnnynnyynnnnnynnnnynn] Error 1
make[2]: Leaving directory `/home/dextaslab/openwrt/trunk/feeds/packages/utils/lcd4linux-dpf'
make[1]: *** [package/feeds/packages/lcd4linux-dpf/compile] Error 2
make[1]: Leaving directory `/home/dextaslab/openwrt/trunk'
make: *** [package/feeds/packages/lcd4linux-dpf/compile] Error 2

libdpf.h is copied to the "staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include/" directory from the make file so I'm not sure where I'm going wrong, other than there is no mention of dpflib or libdpf in "make menuconfig"

Any help would be appreciated,

Cheers :-)

(Last edited by dextaslab on 26 Sep 2012, 00:01)

I did the following, since more dfp devices are being added, and the utility for hacking it is a little different now.

First I've built the latest trunk dpf-ax in ubuntu, since in my Arch-linux OS it didn't build.

svn co https://dpf-ax.svn.sourceforge.net/svnroot/dpf-ax dpf-ax
cd dpf-ax/trunk/
make default

then copied the compiled stuff to my Arch linux (Ubuntu was in another machine).

[root@tool fw]# python2 fulldump.py /dev/sr1
Opening generic SCSI device '/dev/sr1'
Manufacturer: Apple
Size        : 1 MB
Reading 100000 bytes...
Wrote full.bin


[root@tool fw]# python2 identify.py full.bin 
Looking for firmware.............: Found (coby, 320x240 px).
Looking for Openwin..............: Found.
Looking for LcdIniTbl............: Found.
Looking for known signatures.....: Found.

Your dpf is compatible with model ['linkdelight_2'].

[root@tool fw]# cd ..

At this point I needed to press reset+menu to force the dfp bootloader mode

[root@tool trunk]# fw/hiddetach
Detaching dpf at 5-1:1.0... done.


[root@tool trunk]# cd fw

[root@tool fw]# python2 restore.py ../src/fw_disp_linkdelight_2.bin -f
Found AX206 DPF (bootloader)
Manufacturer: Apple
Size        : 1 MB
Erase full flash...
Flashing sector 0...
Flashing sector 1...
Flashing sector 2...
Flashing sector 3...
Flashing sector 4...
Flashing sector 5...
Executing applet..
[root@tool fw]#

And succesfully hacked my dfp. Now it shows lot of eyes drawn at the screen.

The next step was to build the firmware with the package posted in this thread. I've built it under Backfire branch. All were fine.
Lc4linux works in my router and shows CPU usage, memory...

However when I poweroff muy router the screen remains still showing info, it doesn't power off automatically. How can I solve it?, if I remove the battery will it work with the current from the usb?.
And if I go to the dfp menu and I power it off manually, then for powering it again, I need to press the reset button.

Another thing, does the latest PyDPF (v.18) work?, I have no idea how to install or use it since the package posted here is very old and only contains the dpflib.

please, someone, share compiled lcd4linux-dpf ipk file.

derrij wrote:

please, someone, share compiled lcd4linux-dpf ipk file.

An old version is still available at DropBox