1 (edited by irimi 2012-04-03 20:25:03)

Topic: Digital Photo Frame as OpenWrt display howto

There is a nice and cheap 320x240 DPF that can be used with your OpenWrt Box.
See some details at 
http://tech.section5.ch/news/?p=68 and
https://forum.openwrt.org/viewtopic.php?id=30396


Step 1a – Flash your DPF (fast and easy Way, but windows required)
============================================

(German users see at http://www.vdr-portal.de/board18-vdr-hardware/board11-lcds/109196-howto-pearl-dpf-easy-hacking/ )

Download http://freakshare.com/files/99m9ba9p/Pearl_DPF_hackfin_firmware_bootflasher.zip.html


The archive contains a program to flash the DPF, a patched firmware dump for portrait mode, a dump for landscape mode,
and a dump of the original firmware (if want to undo the DPF hack).

1. On windows start flash program
2. Connect your DPF (it's NOT recommended to use the cable delivered with the DPF due to bad quality)
3. press DPF's RESET button , keep it don't release it!
4. press MENU button and release RESET button
5. the display becames black AND the field "channel 1" of flash programmer becomes green
6. Check Settings of programmer: "Reset" is checked and "prgram" is selected
7. With "Browse" select desired firmware
8. Press "execute" , (select Winbond 25P16 if asked) and wait some minutes
9. When ready you'll see some nices picture.
10. Now you can press the menu buttom for about 2-4s and you'll enter a special BLUE SCREEN of your hacked DPF.
   This screen is entered after some minutes automatically, too


Step 1b – Flash your DPF (LINUX required)
===========================
Download http://tech.section5.ch/files/dpfhack-0.12devel.tgz

Then

tar xzf dpfhack-0.12devel.tgz
cd dpf
make all
cd fw

Now we have to evaluate the DPF'S USB id: reconnect your DPF with usb (it's NOT recommended to use the cable delivered
with the DPF due to bad quality) ,select "connect with computer" via DPF menu and enter dmesg to get latest kernel msg output

fw> dmesg

[  362.373699] sr1: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
[  362.375448] sr 3:0:0:0: Attached scsi CD-ROM sr1
[  362.378171] sr 3:0:0:0: Attached scsi generic sg3 type 5
fw>

For me "sg3" is the id I was looking for.

As test and to get a backup of your DPF original firmware try to dump it. This creates a new file full.bin:

fw> sudo python fulldump.py /dev/sg3
Opening generic SCSI device '/dev/sg3'
Manufacturer: Macronix
Size        : 2 MB
Reading 200000 bytes...

The firmware hack is available as portrait mode (=default) and if you want to patch the landscape mode
you have to adapt the file profile.py and change the line with fw_pearl.ihx to fw_pearl_landscape.ihx

Now try to flash new firmware:

sudo python hackit.py /dev/sg3
Opening generic SCSI device '/dev/sg3'
Reading flash...
done

If you get an error like

No DPF found. Create a record or look for one
('20090504', 'Mar 27 2010\xff\xff\xff\xff\xff', 'ProcTbl5')

You have to edit profiles.py to adapt it to dpf's specific  signature.
I had to change the Pearl profile signature from 'Mar 26' to 'Mar 27'

Otherwise you'll get

Opening generic SCSI device '/dev/sg3'
Reading flash...
done
Found matching version info
Identifier: pearl
Now patching. There is no 100% guarantee that your device will
        work after doing this. You must never unplug the device from USB while
        it is being updated.
        Are you sure you take all risks and that you want to continue?

Press "Reset" and finally after pressing M-key for about 3s you'll enter a blue screen.

After reset , check the hack:
Press the menu button for about 2-3s and you'll enter a special BLUE SCREEN of your hacked DPF.
This screen is entered after some minutes automatically, too.

To undo the hack see step1a.

Step 2 - build your own package - lcd4linux r1184
=================================
Here we are: lcd4linux-r1184 and latest dpflib v0.2devel (released 03/2012 at sourceforge.net).
openwrt-dpf_r1184-2.tar.bz2

It’s running fine on my DPF, even with old firmware, larger fonts can be used, too !

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
}

Installation
-------------
Only if old lcd4linux-dpf is already installed:
Old extra dpflib package in libs is not required anymore and must be removed.
It’s recommend to delete old lcd4linux-dpf as well (at least all patch files)

rm  -rf feeds/packages/libs/dpflib
rm  -rf feeds/packages/utils/lcd4linux-dpf

Don’t forget to delete old “libdpf.a” in staging_dir/targetXYZ/usr/lib and staging_dir/targetXYZ/usr/include/dpf.h !

Otherwise just copy tarball to openwrt buildroot directory where trunk-dir is located and type

tar xjf openwrt-dpf_r1184-2.tar.bz2

Enter “make menuconfig” and check

[*]lcd4linux-dpf-->

with desired plugins.

Call “make”
or if already done try

make ./package/feeds/packages/lcd4linux-dpf/{clean,compile} V=99

pydpflib
=====
Above tarball openwrt-dpf_r1184-2.tar.bz2 also adds in section ->lang->python a new package called pydpflib.
This packages requires python but provides full python bindings to dpflib. When the package has been
built you'll find in ./build_dir/target*/pydpflib examples how to use it or unpack tarball located in your "dl"
directory. Look for "dpflib_c.py" resp. "dpflib_py.py"
You can upload jpg/png pictures onto your DPF screen directly or configure the backlight via python scripts.

Step 3 – Installation of LCD4Linux with dpf driver
================================
When ipk archive has been create (located in bin/.../packages/..) install it with opkg.

Following plugins are supported.

root@openwrt: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:
   DPF                 : generic hacked photo frame

available plugins:
  cfg, math, string, test, time, apm, asterisk, button_exec, cpuinfo, diskstats, exec, event, fifo, file,
  huawei, i2c_sensors, isdn, loadavg, meminfo, mpd, netdev, pop3, ppp, proc_stat, statfs, uname, uptime, w1retap

Some plugins could not be compiled due to uclibc dependencies of libm.

Same libs have to be installed manually:

opkg  install libmpd
opkg  install libiconv-full
opkg  install libintl-full

The included configuration /etc/lcd4linux.conf still has to be optimized

Try one one these to start it

openwrt>lcd4linux -Fvv

openwrt>/etc/init.d/lcd4linux start

Have fun !
Feedback is welcome !

[last UPDATE:  lcd4linux r1184-2 changes, pydpflib added]

Re: Digital Photo Frame as OpenWrt display howto

Hello irimi!

if have a working dpf wich works fine under Debian.

On my Netgear634u i have no success. The dpf is recognized in normal mode as CD-ROm drive

scsi0 : SCSI emulation for USB Mass Storage devices
scsi 0:0:0:0: CD-ROM            buildwin  Photo Frame     1.01 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5

If I switch to the hack mode i get following:


root@OpenWrt:/proc/bus/usb# cat devices

T:  Bus=01 Lev=02 Prnt=07 Port=00 Cnt=01 Dev#=  8 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=1908 ProdID=0102 Rev= 2.00
S:  Manufacturer=hackfin
S:  Product=USB-Display
S:  SerialNumber=0.1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms!

root@OpenWrt:/proc/bus/usb# lcd4linux -Fvv

LCD4Linux 0.11.0-SVN-1092 starting
Dump of /etc/lcd4linux.conf:
.
.
lcd4linux.c: initializing driver DPF
Please specify a string like 'usb0' or a sg device
dpf: cannot open dpf device usb0
Error initializing driver DPF: Exit!

I have no device like sg0 or usb0 in /dev

What modules did you load?

Re: Digital Photo Frame as OpenWrt display howto

hohoho wrote:
Please specify a string like 'usb0' or a sg device
dpf: cannot open dpf device usb0
Error initializing driver DPF: Exit!

I have no device like sg0 or usb0 in /dev

What modules did you load?

Following usb modules are loaded: usb-core, usb-storage, ushhid
Are you able to access usb flash drives ?

And do you have a section in your lcd4linux.conf at your Netgear like

Display dpf {
    Driver     'DPF'
    Port       'usb0'
    Font       '6x8'
    Foreground 'ffffff'
    Background '000000'
    Basecolor  '000000'
        Orientation 3          # Orientation value from 0-3
        Backlight  backlight   # Backlight variable control
}

Some other output dmesg / lsusb after connecting:

 usb 2-1: new full speed USB device number 4 using uhci_hcd
Bus 002 Device 004: ID 1908:0102 GEMBIRD

Re: Digital Photo Frame as OpenWrt display howto

The portrait firmware might work while the landscape firmware might not

Re: Digital Photo Frame as OpenWrt display howto

Make sure you have loaded all necessary usb-modules (wiki). Maybe install the usbutils-package to get lsusb.

You have to compile for some stuff openwrt and/or lcd4linux with the build environment.

Does the dpflib contain only appotechs or is it merged with the old st2205?

Re: Digital Photo Frame as OpenWrt display howto

patrick_ wrote:

Does the dpflib contain only appotechs or is it merged with the old st2205?

The dpflib is part of dpfhack http://tech.section5.ch/files/dpfhack-0.12devel.tgz


hvkls wrote:

The portrait firmware might work while the landscape firmware might not

The landscape firmware works quite good !

7 (edited by hohoho 2012-02-14 11:20:10)

Re: Digital Photo Frame as OpenWrt display howto

i think this is my problem:, but how can i solve this?
cat /proc/bus/usb/devices

D:  Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=1908 ProdID=0102 Rev= 2.00
S:  Manufacturer=hackfin
S:  Product=USB-Display
S:  SerialNumber=0.1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

There is no driver loaded in hacked mode. Driver=(none)


And this is what i have installed:

opkg list-installed

base-files - 103-r30493
base-files-network - 3
blkid - 1.41.12-2
block-mount - 0.2.0-7
busybox - 1.19.3-9
crda - 1.1.1-1
dnsmasq - 2.59-2
dpflib - 0.12dev-1
dropbear - 2011.54-1
firewall - 2-45
glib2 - 2.26.1-2
hotplug2 - 1.0-beta-4
iptables - 1.4.10-4
iptables-mod-conntrack - 1.4.10-4
iptables-mod-nat - 1.4.10-4
iw - 3.3-1
kernel - 3.0.18-1-05e08b4e5143b7292bf6eed4e36d1ffb
kmod-b43 - 3.0.18+2012-02-06-2
kmod-b43legacy - 3.0.18+2012-02-06-2
kmod-cfg80211 - 3.0.18+2012-02-06-2
kmod-crypto-aes - 3.0.18-1
kmod-crypto-arc4 - 3.0.18-1
kmod-crypto-core - 3.0.18-1
kmod-diag - 3.0.18-10
kmod-ipt-conntrack - 3.0.18-1
kmod-ipt-core - 3.0.18-1
kmod-ipt-nat - 3.0.18-1
kmod-ipt-nathelper - 3.0.18-1
kmod-lib-crc-ccitt - 3.0.18-1
kmod-mac80211 - 3.0.18+2012-02-06-2
kmod-nls-base - 3.0.18-1
kmod-ppp - 3.0.18-1
kmod-pppoe - 3.0.18-1
kmod-scsi-cdrom - 3.0.18-1
kmod-scsi-core - 3.0.18-1
kmod-scsi-generic - 3.0.18-1
kmod-switch - 3.0.18-4
kmod-usb-brcm47xx - 3.0.18-1
kmod-usb-core - 3.0.18-1
kmod-usb-ohci - 3.0.18-1
kmod-usb-storage - 3.0.18-1
kmod-usb-storage-extras - 3.0.18-1
kmod-usb-uhci - 3.0.18-1
kmod-usb2 - 3.0.18-1
lcd4linux-dpf - r1142-3
libblkid - 1.41.12-2
libc - 0.9.33-103
libcom_err - 1.41.12-2
libext2fs - 1.41.12-2
libgcc - 4.6-linaro-103
libgd - 2.0.35-1
libiconv-full - 1.11.1-1
libintl-full - 0.18.1.1-1
libip4tc - 1.4.10-4
libjpeg - 6b-1
libmpd - 0.20.0-1
libmpdclient - 2.4-1
libnl-tiny - 0.1-2
libpng - 1.2.46-1
libpthread - 0.9.33-103
librt - 0.9.33-103
libuci - 2011-11-14.1-1
libusb - 0.1.12-2
libusb-1.0 - 1.0.8-1
libuuid - 1.41.12-2
libxtables - 1.4.10-4
mtd - 17
nvram - 9
opkg - 618-2
ppp - 2.4.5-4
ppp-mod-pppoe - 2.4.5-4
swap-utils - 2.13.0.1-4
uci - 2011-11-14.1-1
usbutils - 004-1
wireless-tools - 29-4
wpad-mini - 20111103-3
zlib - 1.2.5-1

i have no file like  libdpf or something else. In my opinion the package dpflib is created but contains no files??

lsmod:

Module                  Size  Used by    Not tainted
sg                     19936  0
ums_usbat               7408  0
ums_sddr55              4768  0
ums_sddr09              8784  0
ums_karma               1440  0
ums_jumpshot            3648  0
ums_isd200              5088  0
ums_freecom             1856  0
ums_datafab             4640  0
ums_cypress             2064  0
ums_alauda              8288  0
sr_mod                 10848  0
nf_nat_irc               848  0
nf_conntrack_irc        2512  1 nf_nat_irc
nf_nat_ftp              1008  0
nf_conntrack_ftp        4544  1 nf_nat_ftp
ipt_MASQUERADE           976  1
iptable_nat             2128  1
nf_nat                 10912  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
xt_conntrack            2128  3
xt_CT                   1408  0
xt_NOTRACK               576  0
iptable_raw              560  1
xt_state                 608  0
nf_conntrack_ipv4       4016  6 iptable_nat,nf_nat
nf_defrag_ipv4           624  1 nf_conntrack_ipv4
nf_conntrack           40848 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppoe                   8688  0
pppox                   1152  1 pppoe
ipt_REJECT              1776  2
xt_TCPMSS               2000  0
ipt_LOG                 6432  0
xt_comment               400  0
xt_multiport            1136  0
xt_mac                   528  0
xt_limit                1040  1
iptable_mangle           816  1
iptable_filter           624  1
ip_tables               8896  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1664  3
x_tables                9968 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
cdrom                  31296  1 sr_mod
ppp_async               8128  0
ppp_generic            19952  3 pppoe,pppox,ppp_async
slhc                    4736  1 ppp_generic
b43legacy              89936  0
b43                   292080  0
mac80211              250528  2 b43legacy,b43
crc_ccitt                944  1 ppp_async
cfg80211              136336  3 b43legacy,b43,mac80211
compat                  1632  0
arc4                     768  0
aes_generic            30592  0
crypto_algapi           9104  2 arc4,aes_generic
usb_storage            36272 10 ums_usbat,ums_sddr55,ums_sddr09,ums_karma,ums_jumpshot,ums_isd200,ums_freecom,ums_datafab,ums_cypress,ums_alauda
uhci_hcd               18704  0
ohci_hcd               16416  0
ehci_hcd               33904  0
sd_mod                 23264  0
usbcore               105040 15 ums_usbat,ums_sddr55,ums_sddr09,ums_karma,ums_jumpshot,ums_isd200,ums_freecom,ums_datafab,ums_cypress,ums_alauda,usb_storage,uhci_hcd,ohci_hcd,ehci_hcd
scsi_mod               72272  5 sg,ums_cypress,sr_mod,usb_storage,sd_mod
nls_base                4576  1 usbcore
ssb_hcd                 1632  0
bcma_hcd                2288  0
switch_robo             3984  0
switch_core             4624  1 switch_robo
diag                    8928  0

i used openwrt-dpf-v0.2.tar.bz2 and after make menuconfig and selecting

[*]dpflib
[*]lcd4linux-dpf

make V=99

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:
   DPF                 : generic hacked photo frame

available plugins:
  cfg, math, string, test, time, cpuinfo, loadavg, meminfo, proc_stat, uptime

Tested with 2 hacked dpf´s (landscape & portrait) directly connected and connected via active hub.

If i select "mit PC verbinden" i get this message:

usb 2-1: USB disconnect, device number 2
[ 2295.720000] usb 2-1: new full speed USB device number 3 using ohci_hcd
[ 2295.948000] scsi1 : usb-storage 2-1:1.0
[ 2296.972000] scsi 1:0:0:0: CD-ROM            buildwin  Photo Frame     1.01 PQ: 0 ANSI: 2
[ 2296.996000] sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
[ 2297.000000] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 2297.012000] sr 1:0:0:0: Attached scsi generic sg0 type 5

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 1908:0102 GEMBIRD

in hacked mode is get only this message:

usb 2-1: new full speed USB device number 4 using ohci_hcd

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 1908:0102 GEMBIRD

mount

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
none on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,relatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/mtdblock2 on /mnt/mtdblock2 type squashfs (ro,relatime)

Re: Digital Photo Frame as OpenWrt display howto

irimi wrote:
hvkls wrote:

The portrait firmware might work while the landscape firmware might not

The landscape firmware works quite good !

Here it doesn't. I compiled the DPF enabled LCD4Linux on a Debian squeeze PPC system, flashed the firmware referred to above from Windows, and found only the portrait mode firmware flashed device is detected in comparison. If you had a link to a firmware that works, maybe you could provide a link, or contact me on a private basis...

Re: Digital Photo Frame as OpenWrt display howto

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.

Re: Digital Photo Frame as OpenWrt display howto

I would like to recommend an application called 'PyDPF' written in Python that extends your OpenWrt  device with above mentioned DPF to an MPD client with colored LCD display to show current song informations (see screenshot)
You can use it as a standard digital picture frame to show image galleries directly, too.

The application /MPD is controlled via /dev/input/eventX (e.g. infrared remote control or usb keyboard).
It is running successfully on my TP-Link TL-1043ND (python packages has been installed to /opt placed on flashdrive)

The 1st version of PyDPF is available at Sourceforge

PyDPF does not need lcd4linux ! The dpflib was ported to Python and in the source package it is called dpflib.py and can be used independently from PyDPF ( if someone wants to write his own Python application).


The screenshot of the alumin theme:

http://sourceforge.net/projects/pydpf/screenshots/alu_screenshoot.png

Re: Digital Photo Frame as OpenWrt display howto

irimi wrote:

I would like to recommend an application called 'PyDPF' written in Python that extends your OpenWrt  device with above mentioned DPF to an MPD client with colored LCD display to show current song informations (see screenshot)
You can use it as a standard digital picture frame to show image galleries directly, too.

The application /MPD is controlled via /dev/input/eventX (e.g. infrared remote control or usb keyboard).
It is running successfully on my TP-Link TL-1043ND (python packages has been installed to /opt placed on flashdrive)

- python dependency is a bad idea
- opening /dev/input/eventX is a bad idea. Mine is already opened by the triggerhappy
- what you achieved could be done exclusively with lcd4linux and triggerhappy.
http://images.wikia.com/mpd/images/9/97/Mpd_with_lcd4linux-serdisplib_on_a_l4m132c.jpg

what is needed - a way to create a complex dynamic menu structures which is not possible with the lcd4linux. Something like http://www.youtube.com/watch?v=pCiFjRDGZes#t=113s

All the waiting and then the CPU ventilator brrrrrr all the time.

Re: Digital Photo Frame as OpenWrt display howto

Yes, I know you can use lcd4linux with mpd plugin. You even don't need triggerhappy, you can use 'empcd' as well.
My goal was to write my own application and with Python it is fast & easy to achieve this.
But , yes , Python is not the recommended language for an embedded device.

flux wrote:

- what you achieved could be done exclusively with lcd4linux and triggerhappy.

NO ! That's wrong !
1. For my DPF lcd4linux just supports only one very small font that is difficult to read.
The font that is shown in my screenshot resp. other larger font sizes lcd4linux cannot display !
Hence PyDPF generates a picture that is transfered directly to the DPF.

2. PyDPF has some other features - it is not only a MPD client - and if you want to achieve this with lcd4linux you MUST have additional scripts/programs !

flux wrote:

what is needed - a way to create a complex dynamic menu structures which is not possible with the lcd4linux. Something like http://www.youtube.com/watch?v=pCiFjRDGZes#t=113s

Very good idea ! If all is so bad, please write that application, but - please - use C/C++ wink.

Re: Digital Photo Frame as OpenWrt display howto

irimi wrote:

Yes, I know you can use lcd4linux with mpd plugin. You even don't need triggerhappy, you can use 'empcd' as well.
My goal was to write my own application and with Python it is fast & easy to achieve this.
But , yes , Python is not the recommended language for an embedded device.

flux wrote:

- what you achieved could be done exclusively with lcd4linux and triggerhappy.

NO ! That's wrong !
1. For my DPF lcd4linux just supports only one very small font that is difficult to read.
The font that is shown in my screenshot resp. other larger font sizes lcd4linux cannot display !
Hence PyDPF generates a picture that is transfered directly to the DPF.

2. PyDPF has some other features - it is not only a MPD client - and if you want to achieve this with lcd4linux you MUST have additional scripts/programs !

flux wrote:

what is needed - a way to create a complex dynamic menu structures which is not possible with the lcd4linux. Something like http://www.youtube.com/watch?v=pCiFjRDGZes#t=113s

Very good idea ! If all is so bad, please write that application, but - please - use C/C++ wink.

1. Was it also difficult to read this? http://ssl.bulix.org/projects/lcd4linux/changeset/1170
2. Additional scripts are fine! You are free to implement them with the available software tools and use them separately if needed. It's like I'm using a bash script to check for emails on a command line and with the lcd4linux
3. lcd4linux offers a framework which is easy to use. It lacks some features like changing layouts without restarting the daemon. Are you going to offer a similar or better framework? Really? My point is - if you already doing something then do it correct.

So if I was doing it I'd start with integration of the libdpf. Its headers shall be fixed, libusb 0.1 could be updated to libusb 1.0 (or libusb-compat integrated into the openwrt). And it shall be put somewhere like github or something. Having libdpf it would be possible to upgrade the lcd4linux svn revision to include dpf driver and your hackery wouldn't be needed. Then I'd check the possibility to hack the lcd4linux to make it more useful for raster displays.

All the waiting and then the CPU ventilator brrrrrr all the time.

Re: Digital Photo Frame as OpenWrt display howto

flux wrote:

1. Was it also difficult to read this? http://ssl.bulix.org/projects/lcd4linux/changeset/1170
2. Additional scripts are fine! You are free to implement them with the available software tools and use them separately if needed. It's like I'm using a bash script to check for emails on a command line and with the lcd4linux
3. lcd4linux offers a framework which is easy to use. It lacks some features like changing layouts without restarting the daemon. Are you going to offer a similar or better framework? Really? My point is - if you already doing something then do it correct.

So if I was doing it I'd start with integration of the libdpf. Its headers shall be fixed, libusb 0.1 could be updated to libusb 1.0 (or libusb-compat integrated into the openwrt). And it shall be put somewhere like github or something. Having libdpf it would be possible to upgrade the lcd4linux svn revision to include dpf driver and your hackery wouldn't be needed. Then I'd check the possibility to hack the lcd4linux to make it more useful for raster displays.

Indeed , I didn't know that changeset, but quite interesting.

I don't want to compare my application with lcd4linux !
My scope and goals are different , I just want to write my own single PYTHON application because Python makes fun and my application shall be independent from other tools !

If you prefer lcd4linux and bash scripting it's ok - no problem !
I'm looking forward if my hackery is not needed anymore, and I only have call "opk install lcd4linux" to get it with dpf driver.

Re: Digital Photo Frame as OpenWrt display howto

btw, this is like it looks by me
http://i.picasion.com/pic50/d8db4194da5d944eb52c8e8001972234.gif

All the waiting and then the CPU ventilator brrrrrr all the time.

Re: Digital Photo Frame as OpenWrt display howto

Nice, could you share your configuration ?
You appears to be an expert for lcd4linux, do you have already written a cfg to switch between a similar MPD client screen.
That's I'm looking for.

Re: Digital Photo Frame as OpenWrt display howto

irimi wrote:

Nice, could you share your configuration ?
You appears to be an expert for lcd4linux, do you have already written a cfg to switch between a similar MPD client screen.
That's I'm looking for.

the config is here http://pastebin.com/vTrpx24v

no I haven't done anything mpd related yet. Displaying a status is simple but I need a way to show a dynamic menu structure to be able to select what to play. And I do not know how to do that with the lcd4linux

All the waiting and then the CPU ventilator brrrrrr all the time.

Re: Digital Photo Frame as OpenWrt display howto

Hello,

I tried to compile the dpflib and I always get the following errors:

xyz@abc:~/openwrt/trunk$ make package/feeds/packages/dpflib/compile V=99
Checking 'xgettext'... ok.
make[1]: Entering directory `/home/martin/openwrt/trunk'
make[1]: *** No rule to make target `package/feeds/packages/dpflib/compile'.  Stop.
make[1]: Leaving directory `/home/martin/openwrt/trunk'
make: *** [package/feeds/packages/dpflib/compile] Fehler 2

Can anybody help?
Thanks
Elektrischlumpf

Re: Digital Photo Frame as OpenWrt display howto

when I run make V=99 I get the following error:

make[3]: Entering directory `/home/martin/openwrt/trunk/feeds/packages/libs/dpflib/v0.12devel'
mkdir -p /home/martin/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33/dpflib
cp -fpR ./src/* /home/martin/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33/dpflib/
cp -fpR ./src/dpf.h /home/martin/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33/usr/include
cp -fpR ./src/usb_user.h /home/martin/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33/usr/include
cp: cannot stat `./src/usb_user.h': No such file or directory
make[3]: *** [/home/martin/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33/dpflib/.prepared_03182c8ab12e90f8bb5ef56aba298fce] Error 1
make[3]: Leaving directory `/home/martin/openwrt/trunk/feeds/packages/libs/dpflib/v0.12devel'
make[2]: *** [package/feeds/packages/dpflib/v0.12devel/compile] Error 2
make[2]: Leaving directory `/home/martin/openwrt/trunk'
make[1]: *** [/home/martin/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/martin/openwrt/trunk'
make: *** [world] Fehler 2

Re: Digital Photo Frame as OpenWrt display howto

Elektrischlumpf wrote:

when I run make V=99 I get the following error:

make[3]: Entering directory `/home/martin/openwrt/trunk/feeds/packages/libs/dpflib/v0.12devel'

cp: cannot stat `./src/usb_user.h': No such file or directory

Apparently you try to develope your own buildscript ,  I propose to use my above script and modify it.

your error msg: the include search path for c-header files is not correct rsp. complete.

Re: Digital Photo Frame as OpenWrt display howto

I am using your script, but it does not work :-(

Re: Digital Photo Frame as OpenWrt display howto

Elektrischlumpf wrote:

I am using your script, but it does not work :-(

I can't reproduce your problem. For me the script is running fine for different targets and on different hosts.
I guess you did not extract the archive correctly !?

Please verify your output is like this

ls -la package/feeds/packages/dpflib
package/feeds/packages/dpflib -> ../../../feeds/packages/libs/dpflib/

But

Elektrischlumpf wrote:

v0.12devel'

is not part of my script !

23 (edited by Elektrischlumpf 2012-03-02 20:35:25)

Re: Digital Photo Frame as OpenWrt display howto

I have the same symbolic link...

In the meantime I solved my problem with the error message "cannot stat `./src/usb_user.h': No such file or directory"

One filename in the Makefile (located in folder v0.12devel) is wrong.
I changed it from

        $(CP) ./src/usb_user.h $(STAGING_DIR)/usr/include

to

       $(CP) ./src/usbuser.h $(STAGING_DIR)/usr/include

But now I get another new error message if the lcd4linux-dpf will be compiled:

     drv_dpf.o: In function `plugin_backlight':
     drv_dpf.c:(.text+0xb0): undefined reference to `dpf_backlight'

Re: Digital Photo Frame as OpenWrt display howto

If you change to devel0.12 you have to exchange the lcd4linux dpf patch, too !!!

Warning: I get a 180° rotated screen with that dpflib version.

Re: Digital Photo Frame as OpenWrt display howto

Sorry, but I do not understand what you mean (exchange the lcd4linux dpf patch). Could you explain it again please.