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)
March 29, 2012 01:38PM
Hi superelchi,

I've added you as project member. Feel free to just add stuff, but make sure you don't break existing code, such that people can choose their menu skin and behaviour etc. using -D options (defines).
I also have a whacky adaptation of a VNC server that works with the display. Maybe someone (you?) would like to finish the framebuffer driver for the kernel, so that people can run a real boot screen instead just lcd4linux..

Cheers,

- hackfin
Re: LCD screen for your dockstar (cheap! <$5)
April 01, 2012 10:10PM
I got one of these AX206 frames form Focal Price abou t a year ago, but did not have time to play with it until now.
Item number from focal Price is ED022W.


dmesg output is:
...
...
usb 1-1.4: new full speed USB device using orion-ehci and address 41
scsi23 : usb-storage 1-1.4:1.0
scsi 23:0:0:0: CD-ROM            buildwin  Photo Frame     1.01 PQ: 0 ANSI: 2
sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
sr 23:0:0:0: Attached scsi CD-ROM sr0
sr 23:0:0:0: Attached scsi generic sg1 type 5
usb 1-1.4: reset full speed USB device using orion-ehci and address 41

lsusb output is:
Bus 001 Device 041: ID 1908:0102
Bus 001 Device 018: ID 0c76:1607 JMTek, LLC. audio controller
Bus 001 Device 007: ID 5bcd:5bcd
Bus 001 Device 003: ID 0951:161a Kingston Technology
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Checked out latest revision (revision 7) from svn and run make. Got error complaining about missing intelhex
so I installed it and run make again this time without problems.

Run detect.py and got error about missing dpf module:

root@NEPTUNE:/usr/src/dpf-ax/fw# python detect.py /dev/sg1
Traceback (most recent call last):
  File "detect.py", line 15, in <module>
    import dpf
ImportError: No module named dpf

So I coppied dpf.co from /usr/src/dpf-ax/Debug to /usr/src/dpf-ax/fw and run it again.
It worked with the following results.

root@NEPTUNE:/usr/src/dpf-ax/fw# python detect.py /dev/sg1
Opening generic SCSI device '/dev/sg1'
Manufacturer: Apple
Size        : 1 MB

Then I made original firmware backup with fulldump.py:

root@NEPTUNE:/usr/src/dpf-ax/fw# python fulldump.py /dev/sg1
Opening generic SCSI device '/dev/sg1'
Manufacturer: Apple
Size        : 1 MB
Reading 100000 bytes...
Wrote full.bin

I did not find hackit.py script that README file refers to, but there is a fwload file that ( I assume) is used to load firmware.
Any hint how this suppose to work?

BTW, I am dooing this all on the dockstar itself.

Thanks!

Roman
dpffan
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 12:33AM
RomanG Wrote:
-------------------------------------------------------
> I did not find hackit.py script that README file
> refers to, but there is a fwload file that ( I
> assume) is used to load firmware.
> Any hint how this suppose to work?
>
hackit.py was used in versions earlier than 0.2devel , from 0.2 onwards (rev 5 on the SVN tree), you should use restore.py since hackfin has developed a full alternative firmware for the ax206 dpfs. The documentation still needs some cleanup as some parts of it still refer to old stuff.
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 05:32AM
Thanks dpffan for prompt response.
I re-read the README in ../src directory and found reference to restore.py script as you suggested.
Put the frame in to BL mode (MENU + Reset button) and lsusb detected it as 1908:3318
root@NEPTUNE:/usr/src/dpf-ax# lsusb
Bus 001 Device 043: ID 1908:3318
Bus 001 Device 018: ID 0c76:1607 JMTek, LLC. audio controller
Bus 001 Device 007: ID 5bcd:5bcd
Bus 001 Device 003: ID 0951:161a Kingston Technology
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So far so good...

Following the syntax in RDAME file, I tried to flash the firmware:
root@NEPTUNE:/usr/src/dpf-ax/fw# python restore.py fw_focal_landscape.bin -f
Found AX206 DPF (bootloader)
Error: Failed to claim usb device!
Possibly you have to 'sudo libhid-detach-device 1908:3318'
Traceback (most recent call last):
  File "restore.py", line 23, in <module>
    d = dpf.open("usb0")
SystemError: Failed to open port:
Unknown error

No luck so far :-)

Roman
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 07:04AM
Did some more googling and looks like I will need libhid library installed.
Unfortunately it is not available for squeeze armel platform as far as I could find (I am doing this on dockstar itself).

Roman
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 08:01AM
You can do a "rmmod usbhid" then launch the script under root or sudo.
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 08:37AM
Try this script:
#!/bin/sh
#
# detach-from-hid
#
# Simple HID detach code for AX206 based DPF hardware in bootloader mode
#
# 2012/04/02 superelchi
#   First version   
#
#
if [ `id -u` -ne 0 ]; then
        echo "$0: You must be root to do this.">&2
        exit 1
fi

dirlist=$(find -L /sys/bus/usb/devices -maxdepth 1 -type d)
for d in $dirlist ; do
    if [ -e ${d}/product ] ; then
        grep -q BL206 ${d}/product
        if [ $? -eq 0 ] ; then
            id=${d##*/}:1.0
            if [ -e /sys/bus/usb/drivers/usbhid/${id} ] ; then
                echo -n "Detaching dpf at ${id}..."
                echo -n $id > /sys/bus/usb/drivers/usbhid/unbind
                echo " done."
            else
                echo "$0: info - dpf at ${id} is already detached."
            fi    
            exit 0
        fi
    fi
done            
echo "$0: warning - no dpf in bootloader mode found."
You will find this also in the fw-folder of the next version I upload to sourceforge - whenever that may be :).

superelchi
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 09:17AM
I checked out source of libhid form svn...
svn co svn://svn.debian.org/libhid/trunk libhid-svn
...and installed it from source. It was a bit of pain since instructions in README file did not work and I was not sure where shouls be the default installation located.

After that, I was able to flash the firmware. Attached are pictures of the initial screen and little scope that uses internal AD.

Now I need to patch the lcd4linux, but the patch is for SVN-1192 and mine is SVN-1047 so I guess I will need to reinstall that first.

Roman
Attachments:
open | download - initial_screen.JPG (341.8 KB)
open | download - scope.JPG (281.7 KB)
Re: LCD screen for your dockstar (cheap! <$5)
April 02, 2012 09:35AM
It looks like bulix.org is down at the moment, cannot get source for lcd4linux...

Roman
Re: LCD screen for your dockstar (cheap! <$5)
April 03, 2012 02:23PM
bulix.org is up and running again so I downloaded build 1192 of the lcd4linux and patched it with patch included in the dpf-ax package

When I run lcd4linux with dpf.conf (also included in the dpf-ax package), it runs as if the driver was configured for 128x128 display

However, when I kill lcd4linux, the good bye message is displayed correctly, accros the whole screen, centered

Have a look at attached pictures, I also includded my 20x4 character LCD for comparison

I would think that there is a way to configure DPF driver for proper display resolution.
Any hints appreciated.

Thanks,
Roman
Attachments:
open | download - DPF_running.JPG (318.5 KB)
open | download - DPF_goodbye_message.JPG (236.6 KB)
open | download - 20x4_goodbye_message.JPG (236.3 KB)
Re: LCD screen for your dockstar (cheap! <$5)
April 03, 2012 02:51PM
I take back my statment that the lcd4linux DPF driver is configured for 128x128 resolution. I loaded the background image with 320x240 resolution and it displays correctly.

In configuration file, I assume that if length of the widget is 21, it is actually 21x6=126 pixels long, am I correct?

Thanks
Roman
Attachments:
open | download - DPF_running-wbkgrnd.JPG (408.2 KB)
Sylvester
Re: LCD screen for your dockstar (cheap! <$5)
April 04, 2012 02:29PM
hi dpffan, were you able to create a firmware file for your display?
dpffan
Re: LCD screen for your dockstar (cheap! <$5)
April 05, 2012 04:59AM
@Sylvester:

I'm still waiting for confirmation from hackfin and superelchi and anybody else who is working on this, the lcd init sequence and the display blit function for a given unknown lcd.
buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 05, 2012 07:43AM
If I flash fw_blue.bin and the display is mirrored - you need a mirror to read the words and occupies a corner of the screen, about less than a quarter of the screen area. How do I get it to display properly?
Re: LCD screen for your dockstar (cheap! <$5)
April 05, 2012 08:24PM
buspirate,

I am not sure about the mirroring of the image, maybe fw_blue.bin is not the correct firmware for your display?

As far as image occupying only 1/4 of the screen, did you try to modify the config file or load an imagge with 320x240size to see if you can cover the whole screen?
See my earlier post above.

Roman
buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 06, 2012 08:44PM
@Roman:

I tried your suggestion. The 320x240 image will occupy the same area as the display which is a corner. But if I modify Orientation parameter of the DPF driver for lcd4linux, the display will shift to a different corner of the screen, ie value 0 for one corner, 1 for another corner etc. The text will continue to be mirrored. The screen area is not fully utilized.

Other firmware files, fw_*.bin all give white displays.

Any other ideas I can try? Thanks.
Re: LCD screen for your dockstar (cheap! <$5)
April 06, 2012 10:37PM
Looking at config.h in the ../scr directory, it looks like "white" is confirgured for 128x128, so what you are seeing seems to be correct

...
...
#if defined (DPFMODEL_white)
#       define LCD_128x128
#       define LCD_CONTROLLER_ILI9163B
#       define LCD_ORIENTATION_RGB RGB_DOWN
#       define BUTTON_SWAP
#       define DEFAULT_ORIENTATION ROT_UP
...
...

I wouldl try to change statement
#       define LCD_128x128
to
#       define LCD_320x240
and recompile the firmware

Roman
buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 06, 2012 11:05PM
@Roman:

Thanks for responding. I got a link error upon trying the latest suggestion:

Linking..
ASlink-Warning-No definition of area BLIT

?ASlink-Warning-Undefined Global '_st77xx_landscape_blit' referenced by module 'main'

?ASlink-Warning-Undefined Global '_st77xx_landscape_blit' referenced by module 'lcd'

?ASlink-Warning-Undefined Global '_st77xx_landscape_blit' referenced by module 'usb_ep1'

?ASlink-Warning-Undefined Global '_st77xx_landscape_blit' referenced by module 'print'
make: *** [main.ihx] Error 9
Re: LCD screen for your dockstar (cheap! <$5)
April 07, 2012 07:55AM
I should have checked the driver chip datasheet first. The Ilitek ILI9163B driver that is defined for the "white" display can control only displays up to 132x168 pixels resolution, so my suggestion above was wrong.

Can you post more information about your display?
Where did you buy it, maybe also picture of it?

Roman
prezes_kk
Re: LCD screen for your dockstar (cheap! <$5)
April 11, 2012 06:54AM
Hi
I have a dpf with ax206 flashed with latest hackfin fw.
The lcd is working but display was shifted (3px from bottom and 2px from right).
Linux also does not see any device on /dev/usb0 but lsusb shows the device properly.
Can anybody help?
Flash is AMIC 25L080
I using SPI Programmer to flash it.
neon
Re: LCD screen for your dockstar (cheap! <$5)
April 13, 2012 11:39PM
@prezes_kk
Which file you used for flashing? Maybe you should test every file on your device.

I had the same problem, when I flash using fw_white.bin (display was shifted, colors was ugly, and screen was blurred).
Then I try fw_focal_landscape.bin but it doesn't work (only white screen).
But then I flash using fw_blue.bin and it works correct. (In normal mode colors are still ugly, but in lcd4linux mode, everything looks beautiful)

I have similar flash chip like RomanG (m25p80 Apple 1 MB), but my device has 128x128 screen, different LCD driver and different casing (it looks the same like "pebble 1.5 digital frame"). lsusb id was the same.

BTW. I was flashing using "dpf-ax" form svn. I thought it's not possible to flash "homebrew software" using ProgSPI.exe. What kind of SPI Programmer you used?
Re: LCD screen for your dockstar (cheap! <$5)
April 14, 2012 03:39AM
neon Wrote:
-------------------------------------------------------
> @prezes_kk
>
> BTW. I was flashing using "dpf-ax" form svn. I
> thought it's not possible to flash "homebrew
> software" using ProgSPI.exe. What kind of SPI
> Programmer you used?

The newest version from svn allows programming with ProgSPI. I rearranged the header and inserted some dummy tables to keep ProgSPI happy.

superelchi
buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 14, 2012 08:41PM
RomanG Wrote:
-------------------------------------------------------

> Can you post more information about your display?
> Where did you buy it, maybe also picture of it?
>
> Roman

@Roman
I got it from an Ebay seller, greatfoto. Picture of DPF

buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 15, 2012 10:49AM
Hi buspirate,

you could try the focal firmware from svn or precompiled here. We have successfully flashed some greatfoto DPFs with this firmware.

Also I'm currently working on an update to dpf-ax with support for some new models and a new detection program. Will be ready for commit in a few days. One new model - linkdelight - is availabe as a preview here.

superelchi
Re: LCD screen for your dockstar (cheap! <$5)
April 15, 2012 03:10PM
Seriously, get a parrot df3120. Not such a big hassle to hack as most other dpf.
prezes_kk
Re: LCD screen for your dockstar (cheap! <$5)
April 16, 2012 01:43AM
@superelchi
on my dpf fw_linkdelight has normal colors, display is not shifted but mirrored :(

@neon
i flashed fw_white because on fw_blue i have blank screen
Re: LCD screen for your dockstar (cheap! <$5)
April 16, 2012 05:56AM
@prezes_kk
What about the focal fw? Please post a dump of the original fw and I will see what I can do. :)

superelchi
prezes_kk
Re: LCD screen for your dockstar (cheap! <$5)
April 16, 2012 10:22AM
RonSon
Re: LCD screen for your dockstar (cheap! <$5)
April 17, 2012 06:25PM
Hi there!

I stumbled over great news... For all of you with a AX206 DPF... Someone figured out how to use the display to show a VNC session compleely on the display.. YEEEEEAH.. Waiting for the official release..

Here the Link
http://tech.section5.ch/news/?p=150

Can Not wait to try it out!
buspirate
Re: LCD screen for your dockstar (cheap! <$5)
April 18, 2012 04:33AM
superelchi Wrote:
> Also I'm currently working on an update to dpf-ax
> with support for some new models and a new
> detection program. Will be ready for commit in a
> few days. One new model - linkdelight - is
> availabe as a preview

Thanks, I just saw the rev8. update to dpf-ax svn. I will try the new identify.py and report back. The dpf.inc and lcdinit_linkdelight.c looks very interesting, it seems it's fairly trivial to support an unknown LCD when combined with what dpffan posted - or am I reading this wrongly and assuming too much?

Anyway great work and I will try this at the earliest opportunity.
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: