Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Android Devices > enTourage eDGe

Notices

Reply
 
Thread Tools Search this Thread
Old 03-14-2012, 11:01 PM   #1
javese
Zealot
javese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enough
 
Posts: 133
Karma: 589
Join Date: Jun 2011
Device: Entourage Pocket Edge(Black)
tips on pe/ee development

I'm glad to see new development coming up and would like to share all my discovery during the developement of lcd2eink, and also all source code.

1.Architecture.
PE/EE is an android tablet with a reader panel which consists of an eink screen and 4 reader buttons (zoom,next page,previous page,app switcher),and a wacom touch. Android can only access the tablet. The reader panel is controlled by 3 esi natvie linux eink softwares(esireader,esicalendar,esijournal). Android reader/calander/journal apps use udp socket to communicate with eink software following a priviate application protocol, and in this way they work together.
2.How to use reader buttons and wacom touch in your development.
Thanks to linux,all key events,touch events can be captured by reading dev files. Read /dev/input/event1 you can get reader button events.value =1 means press, value = 0 means release;key code for app switcher button is 183,next page is 109,previous page is 104. I didn't use zoom button so I can't remember it's key,but you can try yourself. Read /dev/input/event6 for wacom event,
Write to /dev/input/event4 on pe or /dev/input/event3 on ee to fake touch in the tablet side.In lcd2eink I fake some touch while reading next page button press or previous page button press, so that the app running on android will think it has got a swipe on the screen.
Write to /sys/class/graphics/fb2/rotate then the display on eink will rotate.
Read /sys/class/backlight/pwm-backlight.0/brightness to get hte current birghtness of lcd and save it,write 0 to it to turn the backlight off. Write the saved value to it to bring backlight on.
3. /dev/graphics/fb0 is for lcd display, /dev/graphics/fb2 is for eink display,which may have been well known. Thanks vldmr for the ebclass . Thanks sunlifeng for the "trick writes frame buffer on EE".

I also attached the latest source code for lcd2ink fyi.( not the source code for the last released lcd2eink,but newer which includes some new feature that may confuse a user who is not a developer.)

Good luck.
Attached Files
File Type: zip LCD2Eink.zip (57.3 KB, 43 views)
File Type: zip jni.zip (43.8 KB, 47 views)
javese is offline   Reply With Quote
Old 03-14-2012, 11:24 PM   #2
vldmr
Bigendian confidologist
vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.
 
vldmr's Avatar
 
Posts: 58
Karma: 494
Join Date: Oct 2011
Device: edge & edgejr
Hey, javese, glad to see you back here!

Thanks for sharing all your findings, this is solid gold and saves a lot of life time and frustration to anyone trying to program for edge!

Very kind of you to take time to share all this.

Thanks
vldmr is offline   Reply With Quote
Old 03-15-2012, 05:19 PM   #3
good153
Enthusiast
good153 began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2007
Device: irex iliad
Javese, you are wonderful!!! Thanks a lot.
good153 is offline   Reply With Quote
Old 03-16-2012, 08:06 AM   #4
kammerer
Connoisseur
kammerer doesn't litterkammerer doesn't litter
 
Posts: 53
Karma: 104
Join Date: Dec 2011
Device: nook
Javese, big thanks!

Could anybody add to thread "/system/usr/keylayout/qwerty.kl" file from edge system?
Or maybe, is there any android image for edge?
kammerer is offline   Reply With Quote
Old 03-16-2012, 10:06 AM   #5
vldmr
Bigendian confidologist
vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.vldmr has a complete set of Star Wars action figures.
 
vldmr's Avatar
 
Posts: 58
Karma: 494
Join Date: Oct 2011
Device: edge & edgejr
Quote:
Originally Posted by kammerer View Post
Javese, big thanks!

Could anybody add to thread "/system/usr/keylayout/qwerty.kl" file from edge system?
Or maybe, is there any android image for edge?
You can get all the files installed onto the system from any golden update zip file found in this forum. Like in the first post of the first sticky thread.
Attached Files
File Type: zip qwerty.kl.zip (702 Bytes, 32 views)
vldmr is offline   Reply With Quote
Old 03-17-2012, 10:10 AM   #6
sunlifeng
Enthusiast
sunlifeng doesn't littersunlifeng doesn't litter
 
Posts: 28
Karma: 122
Join Date: Feb 2012
Device: Kindle touch,EE
Quote:
Originally Posted by javese View Post
I'm glad to see new development coming up and would like to share all my discovery during the developement of lcd2eink, and also all source code.

1.Architecture.
PE/EE is an android tablet with a reader panel which consists of an eink screen and 4 reader buttons (zoom,next page,previous page,app switcher),and a wacom touch. Android can only access the tablet. The reader panel is controlled by 3 esi natvie linux eink softwares(esireader,esicalendar,esijournal). Android reader/calander/journal apps use udp socket to communicate with eink software following a priviate application protocol, and in this way they work together.
2.How to use reader buttons and wacom touch in your development.
Thanks to linux,all key events,touch events can be captured by reading dev files. Read /dev/input/event1 you can get reader button events.value =1 means press, value = 0 means release;key code for app switcher button is 183,next page is 109,previous page is 104. I didn't use zoom button so I can't remember it's key,but you can try yourself. Read /dev/input/event6 for wacom event,
Write to /dev/input/event4 on pe or /dev/input/event3 on ee to fake touch in the tablet side.In lcd2eink I fake some touch while reading next page button press or previous page button press, so that the app running on android will think it has got a swipe on the screen.
Write to /sys/class/graphics/fb2/rotate then the display on eink will rotate.
Read /sys/class/backlight/pwm-backlight.0/brightness to get hte current birghtness of lcd and save it,write 0 to it to turn the backlight off. Write the saved value to it to bring backlight on.
3. /dev/graphics/fb0 is for lcd display, /dev/graphics/fb2 is for eink display,which may have been well known. Thanks vldmr for the ebclass . Thanks sunlifeng for the "trick writes frame buffer on EE".

I also attached the latest source code for lcd2ink fyi.( not the source code for the last released lcd2eink,but newer which includes some new feature that may confuse a user who is not a developer.)

Good luck.

Zoom button is 184 .I use this key in my program as the capture image key .
Thanks for your share , especially the tips of brightness .

It sames I am doing something you have done . I get the lcd2eink's source ,build and run it.
Find that you have build-in fb direct write mode which I was doing on for one week .

Here is some code use mmap in cpp;use mmap write fb2 is fast than write file;
Quote:
int writefb0tofb2()
{
int line_x, line_y=0;
long int location = 0, location2=0;
unsigned char tmp;
unsigned int temp2;
PIXEL tmp3;
UINT srcWidth = 600, srcHeight = 1024;
UINT dstWidthA = 825, dstHeightA = 1200;
BYTE *pSrcData = new BYTE[srcWidth*srcHeight];

printf (" %d %d \n",bits_per_pixel,line_length);
for (line_y=0;line_y<1024;line_y++)
{
for (line_x=0;line_x<600;line_x++)
{
location =line_y*2+line_x*1024*2;
location2=line_y*600 +(600-line_x);
tmp3 =*(PIXEL*)(fbp + location);
tmp=(unsigned char)(((tmp3.red<<3)*0.3+(tmp3.green<<2)*0.59+(tmp 3.blue<<3)*0.14));
pSrcData[location2]=tmp;
}
}
ScalingTexturePoint( (BYTE*)fbp2, dstWidthA, dstHeightA, pSrcData, srcWidth, srcHeight );
msync(fbp2,screensize2,MS_ASYNC );
sync();
}
BTW: Did you mean you will away from PE/EE ?

Last edited by sunlifeng; 03-18-2012 at 10:05 AM. Reason: Something to say
sunlifeng is offline   Reply With Quote
Old 03-18-2012, 11:42 PM   #7
javese
Zealot
javese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enough
 
Posts: 133
Karma: 589
Join Date: Jun 2011
Device: Entourage Pocket Edge(Black)
Thanks all for your kind words.Thank kammerer for your great reader software.Thanks sunlifeng for the key code for zoom button and codes for mmap.

sunlifeng I'm not leaving the pe/ee community but my enthusiasm for development on pe/ee waned. I do not want to damp down your spirits but the first day I tried to write fb2 I noticed odd power consumption in my pe which was eventually out of battery with a red flash led.

Anyway I got one more tip to share. echo 7 > /sys/class/graphics/fb2/update_mode will put your eink to update mode 15 which is used by the eink journal and calendar software. In this mode you can write on the eink screen. I found this when looking for the 1 bit mode of eink in pe,which I was hoping to use for creating a prompt eink web browser. Unfortunately I didn't find the 1 bit mode.
javese is offline   Reply With Quote
Old 03-19-2012, 08:36 AM   #8
sunlifeng
Enthusiast
sunlifeng doesn't littersunlifeng doesn't litter
 
Posts: 28
Karma: 122
Join Date: Feb 2012
Device: Kindle touch,EE
Quote:
Originally Posted by javese View Post
Thanks all for your kind words.Thank kammerer for your great reader software.Thanks sunlifeng for the key code for zoom button and codes for mmap.

sunlifeng I'm not leaving the pe/ee community but my enthusiasm for development on pe/ee waned. I do not want to damp down your spirits but the first day I tried to write fb2 I noticed odd power consumption in my pe which was eventually out of battery with a red flash led.

Anyway I got one more tip to share. echo 7 > /sys/class/graphics/fb2/update_mode will put your eink to update mode 15 which is used by the eink journal and calendar software. In this mode you can write on the eink screen. I found this when looking for the 1 bit mode of eink in pe,which I was hoping to use for creating a prompt eink web browser. Unfortunately I didn't find the 1 bit mode.
If you do some reverse engineering on mct , journal and ep3521fb ,you will find 1 bit mode or partly update mode exist . It can be used through ioctl with some parameters. I'm trying.

Quote:
LDR R3, =epd_fd
LDR R3, [R3]
MOV R0, R3 ; fd
LDR R1, =0x4583 ; request
LDR R2, =epd_params
BL ioctl
This is some code in mct ,the function name is mct_paintscreen .
0x4583 is update screen partly. the epd_params should be try out .

Last edited by sunlifeng; 03-19-2012 at 08:56 AM.
sunlifeng is offline   Reply With Quote
Old 03-19-2012, 08:57 AM   #9
ivanjt
Guru
ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.ivanjt ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 1027478
Join Date: Aug 2010
Location: South of France
Device: kindle dx; eDGe
One question, how much of this information can be applied to the EE? One day I might manage to get my programmer interested in doing something for the EE. At the moment she says keeping our and clients servers going is enough but you never know.
ivanjt is offline   Reply With Quote
Old 03-19-2012, 09:14 AM   #10
sunlifeng
Enthusiast
sunlifeng doesn't littersunlifeng doesn't litter
 
Posts: 28
Karma: 122
Join Date: Feb 2012
Device: Kindle touch,EE
Quote:
Originally Posted by ivanjt View Post
One question, how much of this information can be applied to the EE? One day I might manage to get my programmer interested in doing something for the EE. At the moment she says keeping our and clients servers going is enough but you never know.
All the information work on EE . I am using EE now.
sunlifeng is offline   Reply With Quote
Old 03-19-2012, 09:17 PM   #11
javese
Zealot
javese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enoughjavese will become famous soon enough
 
Posts: 133
Karma: 589
Join Date: Jun 2011
Device: Entourage Pocket Edge(Black)
Quote:
Originally Posted by sunlifeng View Post
If you do some reverse engineering on mct , journal and ep3521fb ,you will find 1 bit mode or partly update mode exist . It can be used through ioctl with some parameters. I'm trying.


This is some code in mct ,the function name is mct_paintscreen .
0x4583 is update screen partly. the epd_params should be try out .
Wow!Seems you are doing great! Looking forward to your success in digging.
javese is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Android Development mba enTourage Archive 0 04-15-2010 07:08 AM


All times are GMT -4. The time now is 08:23 PM.


MobileRead.com is a privately owned, operated and funded community.