1

Temat: LCD4Linux i brelok z biedronki DIG-291.

Hej !

Dostalem od kolegi w/w brelok, wiec postanowilem wykorzystac go i podlaczyc do routera w celu wyswietlania kilku danych.

Niestety ... mimo wykorzystania informacji zawratych w linku : http://eko.one.pl/?p=openwrt-lcd4linux
nie udalo mi sie nawiazać polaczenia router-brelok.

Ale po kolei.

Wg ubuntu na komputerze brelok zglasza sie tak :

[  129.851786] usb 4-6: new full-speed USB device number 3 using ohci-pci
[  130.063972] usb 4-6: New USB device found, idVendor=1403, idProduct=0001
[  130.063982] usb 4-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  130.063988] usb 4-6: Product: Flash Disk     
[  130.063992] usb 4-6: Manufacturer: USB    
[  130.128315] usb-storage 4-6:1.0: USB Mass Storage device detected
[  130.128532] scsi host11: usb-storage 4-6:1.0
[  130.128806] usbcore: registered new interface driver usb-storage
[  130.148845] usbcore: registered new interface driver uas
[  131.135939] scsi 11:0:0:0: Direct-Access     SITRONIX MULTIMEDIA       0.09 PQ: 0 ANSI: 0 CCS
[  131.136549] sd 11:0:0:0: Attached scsi generic sg4 type 0
[  131.146947] sd 11:0:0:0: [sdd] 4096 512-byte logical blocks: (2.10 MB/2.00 MiB)
[  131.153922] sd 11:0:0:0: [sdd] Write Protect is off
[  131.153934] sd 11:0:0:0: [sdd] Mode Sense: 0b 00 00 08
[  131.160902] sd 11:0:0:0: [sdd] No Caching mode page found
[  131.160909] sd 11:0:0:0: [sdd] Assuming drive cache: write through
[  131.277907] sd 11:0:0:0: [sdd] Attached SCSI removable disk

...... sama kompilacja przebiegla bez problemu :

wojtek@Linux:~/libst2205-master$ sudo make clean
make -C libst2205 clean
make[1]: Wejście do katalogu '/home/wojtek/libst2205-master/libst2205'
rm -f st2205.o test *.a *.so
make[1]: Opuszczenie katalogu '/home/wojtek/libst2205-master/libst2205'
make -C setpic clean
make[1]: Wejście do katalogu '/home/wojtek/libst2205-master/setpic'
rm -f main.o setpic
make[1]: Opuszczenie katalogu '/home/wojtek/libst2205-master/setpic'
rm -f main.o phack splice splice.o bgrep bgrep.o
wojtek@Linux:~/libst2205-master$ sudo make install
make -C libst2205
make[1]: Wejście do katalogu '/home/wojtek/libst2205-master/libst2205'
cc -W -Wall -g -fPIC -O2   -c -o st2205.o st2205.c
st2205.c: In function ‘malloc_aligned’:
st2205.c:45:6: warning: implicit declaration of function ‘open’ [-Wimplicit-function-declaration]
  f = open("/dev/zero", O_RDONLY);
      ^
st2205.c: At top level:
st2205.c:155:12: warning: ‘write_data’ defined but not used [-Wunused-function]
 static int write_data(int fd, char* buff, int len)
            ^
st2205.c:165:13: warning: ‘dumpmem’ defined but not used [-Wunused-function]
 static void dumpmem(unsigned char* mem, int len)
             ^
ar -rv libst2205.a st2205.o
ar: tworzenie libst2205.a
a - st2205.o
gcc -shared -Wl,-soname,libst2205.so.1 -o libst2205.so st2205.o
make[1]: Opuszczenie katalogu '/home/wojtek/libst2205-master/libst2205'
make -C setpic
make[1]: Wejście do katalogu '/home/wojtek/libst2205-master/setpic'
cc -g -Wall -I../libst2205   -c -o main.o main.c
gcc -o setpic main.o -lgd -L../libst2205 -lst2205  
make[1]: Opuszczenie katalogu '/home/wojtek/libst2205-master/setpic'
make[1]: Wejście do katalogu '/home/wojtek/libst2205-master/libst2205'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
install libst2205.so /usr/local/lib
install st2205.h /usr/local/include
ldconfig
make[1]: Opuszczenie katalogu '/home/wojtek/libst2205-master/libst2205'
wojtek@Linux:~/libst2205-master$


Wgranie wyglada tak :

wojtek@Linux:~/libst2205-master$ ./hackfw.sh /dev/sdd

Interactive script to hack the firmware of your keychain photo
player.
Message written.

Ok, first off all, we're going to backup the firmware and memory of your
device to fwimage.bak and memimage.bak. Please save fwimage.bak, you
need it to flash a newer version into your unit.
Found existing fwimage.bak, moving to fwimage.bak.old
..
..............................................................
Making a working copy...
Looking for a known device profile...
hack/m_coby_dp151 ...
...nope.
hack/m_coby_dp151_v8 ...
...nope.
hack/m_dealextreme_sku5218 ...
...nope.
hack/m_dealextreme_sku5218_new ...
...nope.
hack/m_dig-291 ...
We have a match!
Requirements OK, we can try to hack the device. Proceed? (yes/no)
yes
Patching fw...

Uploading fw
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.

[Odlaczylem brelok od USB, po chwili podlaczylem go ponownie, wszedlem w USB mode..i dalem ENTER na komputerze]

Ok, just a sec...
Unable to get parm_block
Open failed!
wojtek@Linux:~/libst2205-master$ 


W routerze, brelok zglasza sie tak :

Zas wg routera z openwrt (CC)
mam :

Tue Jul  5 20:06:52 2016 kern.info kernel: [288498.710000] usb 2-1: new full-speed USB device number 6 using ehci-platform
Tue Jul  5 20:06:52 2016 kern.info kernel: [288498.860000] usb-storage 2-1:1.0: USB Mass Storage device detected
Tue Jul  5 20:06:52 2016 kern.info kernel: [288498.890000] scsi host5: usb-storage 2-1:1.0
Tue Jul  5 20:06:53 2016 kern.notice kernel: [288499.890000] scsi 5:0:0:0: Direct-Access     SITRONIX MULTIMEDIA       0.09 PQ: 0 ANSI: 0 CCS
Tue Jul  5 20:06:53 2016 kern.notice kernel: [288499.900000] sd 5:0:0:0: [sdb] 4096 512-byte logical blocks: (2.09 MB/2.00 MiB)
Tue Jul  5 20:06:53 2016 kern.notice kernel: [288499.920000] sd 5:0:0:0: [sdb] Write Protect is off
Tue Jul  5 20:06:53 2016 kern.debug kernel: [288499.920000] sd 5:0:0:0: [sdb] Mode Sense: 0b 00 00 08
Tue Jul  5 20:06:53 2016 kern.err kernel: [288499.930000] sd 5:0:0:0: [sdb] No Caching mode page found
Tue Jul  5 20:06:53 2016 kern.err kernel: [288499.930000] sd 5:0:0:0: [sdb] Assuming drive cache: write through
Tue Jul  5 20:06:53 2016 kern.info kernel: [288499.970000]  sdb: unknown partition table
Tue Jul  5 20:06:53 2016 kern.notice kernel: [288499.990000] sd 5:0:0:0: [sdb] Attached SCSI removable disk

Zas proba uruchomienia lcd4linux na routerze zwraca ten sam blad co przy tescie, po wgraniu softu:

root@OpenWrt:~# lcd4linux -F -f /etc/lcd4linux.conf

Unable to get parm_block
st2205: cannot open st2205 device /dev/sdb
Error initializing driver st2205: Exit!

Problem z chipem w breloku ?

--
Pozdrawiam
Wojtek

2

Odp: LCD4Linux i brelok z biedronki DIG-291.

Hej !

Nikt nie ma pomyslu jak zmusic brelok do gadania z routerem ?

--
Pozdrawiam
Wojtek