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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2016, 08:02 PM   #1
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
Seafile Client

Hi There,

I've made a very simple Seafile https://www.seafile.com/en/home/ client.

Currently it lives here:
https://github.com/trap000d/seafile-kindle-client

Known Issues/Bugs
- Only one way synchronization
- Client doesn't erase sub-directory (and it's contents) if it's not exist on the server
- Non-latin characters are not shown through eips
- Just rudimentary checks of internet/WiFi availability/file operations
- SSL certificate verification ignored (verify=False) just to make it work with self-signed SSL certs

So I've got some questions to developers:
1. Is it possible to put text to Kindle screen from bash/python script other then with eips (to use Unicode characters)?
2. Any suggestions in regarding to self-signed SSL certs, or just left it as is (verify=False)?
trap000d is offline   Reply With Quote
Old 09-29-2016, 08:11 PM   #2
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
1) Yes.
What makes you think eips does not do Unicode (UTF-8 flavor)?
Tell us how you tested that, perhaps we can duplicate your problem.

2) For what purpose is the certificate to be used?
Your certificate or the servers?
Context please.
knc1 is offline   Reply With Quote
Advert
Old 09-29-2016, 11:42 PM   #3
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
1. Here the simplest test script (just some Cyrillic letters):
====
#! /bin/bash

ustring="Йцукенг"
eips 1 58 "$ustring"
====
When I run it either from terminal or KUAL menu, I got

eips: paint_char> character "�" not available

and no output at Kindle screen. The same reaction happens when string contains particular ASCII symbols, e.g. ' (apostrophe)

2. I'm keeping my own web server and using self-signed SSL certificate (too lazy to get one at Let's Encrypt). There are several options to handle it:
a) import certificate to OS (mntroot rw && cp ca.crt /etc/ssl/ && mntroot ro && update_ca [or something similar])
b) ignore it (possible MiTM attack)
c) put it into more convenient place, e.g. to the same directory as script, and then verify with 'verify=/path/to/cert/file.crt' option
trap000d is offline   Reply With Quote
Old 09-30-2016, 09:49 AM   #4
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
1) Is that language on your Kindles list of languages it can be set to?
What is the Kindle's current language setting?
Do you have any localization and/or font add-ins in use?
What model Kindle?
What version firmware?

Please, all relevant context, do not turn this into a question and answer guessing game.

2) Do not be lazy or just use it at the "warm and fuzzy (plus bragging rights)" setting.

Last edited by knc1; 09-30-2016 at 09:52 AM.
knc1 is offline   Reply With Quote
Old 09-30-2016, 09:08 PM   #5
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
1)

OK. No problem:

Russian language is available as system language

Current settings
Language - English (United States)

Language related environment variables:
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

No any custom/non-standard localization packages/fonts/e.t.c. installed

Model: Kindle PW3

Firmware version 5.8.2.1

After some additional tests: eips also doesn't show the following ASCII symbols: ' ! $ % ^ { } ; ` \

So I suppose it's not a Unicode problem. It looks like eips takes an image of particular symbol in it's own font file and this font file contains only a partial subset of ASCII table (letters, numbers and some punctuation symbols). All other symbols seems not available.

P.S. I'll test it on two other devices I've got (PW1 and PW2 resp.) then let you know of results.


2) Added option in configuration file
Quote:
Originally Posted by knc1 View Post
1) Is that language on your Kindles list of languages it can be set to?
What is the Kindle's current language setting?
Do you have any localization and/or font add-ins in use?
What model Kindle?
What version firmware?

Please, all relevant context, do not turn this into a question and answer guessing game.

2) Do not be lazy or just use it at the "warm and fuzzy (plus bragging rights)" setting.
trap000d is offline   Reply With Quote
Advert
Old 09-30-2016, 09:44 PM   #6
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
After some additional tests: eips also doesn't show the following ASCII symbols: ' ! $ % ^ { } ; ` \
Surprise, surprise - those are all reserved characters in the shell and I think eips is a shell script.
Check that and check how you are escaping the characters.

Try setting it to Russian and then try Russian characters.
It should work - I do not know what escaping that needs to be used, if any.

Last edited by knc1; 09-30-2016 at 09:46 PM.
knc1 is offline   Reply With Quote
Old 10-01-2016, 02:19 AM   #7
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
Your assumption seems wrong:

Indeed, some of these symbols forming a subset of shell escape symbols, but there are some exceptions: [ ] ( ) " : < > ? are shown by eips without any error

file eips
eips: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.16, stripped

and I know how to cook shell escape characters properly.

Quote:
Originally Posted by knc1 View Post
Surprise, surprise - those are all reserved characters in the shell and I think eips is a shell script.
Check that and check how you are escaping the characters.

Try setting it to Russian and then try Russian characters.
It should work - I do not know what escaping that needs to be used, if any.
trap000d is offline   Reply With Quote
Old 10-01-2016, 09:27 AM   #8
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by trap000d View Post
Your assumption seems wrong:

Indeed, some of these symbols forming a subset of shell escape symbols, but there are some exceptions: [ ] ( ) " : < > ? are shown by eips without any error

file eips
eips: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.16, stripped

and I know how to cook shell escape characters properly.
Now that you have provided that additional information,
please try setting the machine's interface language to Russian and try some Russian character strings.
Report your result, including test environment (Kindle model as first six characters of the serial number and firmware version running).
knc1 is offline   Reply With Quote
Old 10-01-2016, 09:31 AM   #9
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 400
Karma: 2010802
Join Date: May 2012
Device: kt
Looking into eips disassembly it seems that the only valid characters are
[a-z], [A-Z], [0-9], various space chars and one of ,":._-*~/,()@&+?<>=|[].
baf is offline   Reply With Quote
Old 10-01-2016, 09:38 AM   #10
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by baf View Post
Looking into eips disassembly it seems that the only valid characters are
[a-z], [A-Z], [0-9], various space chars and one of ,":._-*~/,()@&+?<>=|[].
Thanks.
Looks like Lab126 missed that one when they went to UTF-8 on the Kindles.

Is there any signs that it calls out to a lower level routine to post the character(s)?
Perhaps the lower level routine can be accessed as an answer to this question.
knc1 is offline   Reply With Quote
Old 10-01-2016, 04:09 PM   #11
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 400
Karma: 2010802
Join Date: May 2012
Device: kt
Quote:
Originally Posted by knc1 View Post
Is there any signs that it calls out to a lower level routine to post the character(s)?
Perhaps the lower level routine can be accessed as an answer to this question.
It maps ascii characters to pixel representation and sends it to framebuffer device. To send unicode characters you will have to convert it first to image, then you can use eips as well. If you want to use low level framebuffer stuff there are people that have already done it here (geekmaster?).
baf is offline   Reply With Quote
Old 10-01-2016, 05:20 PM   #12
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by baf View Post
It maps ascii characters to pixel representation and sends it to framebuffer device. To send unicode characters you will have to convert it first to image, then you can use eips as well. If you want to use low level framebuffer stuff there are people that have already done it here (geekmaster?).
Thanks.
Since the Kindles are language localized in, what, fifteen languages - there must be another way to write to the screen other than this one.

Probably have to go through the display manager (awesome).
Since we only use eips for short messages, such as status messages, this language shortcoming hasn't been noticed before (that I can recall).
knc1 is offline   Reply With Quote
Old 10-02-2016, 03:57 AM   #13
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
Yeah, I've found that magic string too:
Code:
DCB " ",0x22,":._-*~/,()@&+?<>=|[]",0
ALIGN 0x10
DCB "paint_char",0
ALIGN 0x10
DCB "main",0
ALIGN 4
DCB "eips: %s> bpp = %d not supported",0xA,0
Indeed, it can draw only a basic sub-set of ASCII (letters, numbers and some symbols). So I'll just put a simple spinner instead of typing file names.



Quote:
Originally Posted by baf View Post
Looking into eips disassembly it seems that the only valid characters are
[a-z], [A-Z], [0-9], various space chars and one of ,":._-*~/,()@&+?<>=|[].
trap000d is offline   Reply With Quote
Old 10-02-2016, 04:05 AM   #14
trap000d
Member
trap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipsetrap000d can illuminate an eclipse
 
Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
Thanks for a good piece of advice. I'll play a bit with awesome-client.

P.S. However such kind of mix (Python + Lua + bash ) looks a bit heavy for my little project.

Quote:
Originally Posted by knc1 View Post
Thanks.
Since the Kindles are language localized in, what, fifteen languages - there must be another way to write to the screen other than this one.

Probably have to go through the display manager (awesome).
Since we only use eips for short messages, such as status messages, this language shortcoming hasn't been noticed before (that I can recall).
trap000d is offline   Reply With Quote
Old 10-02-2016, 09:00 AM   #15
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,153
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Neither Python nor Bash come pre-installed in the Amazon file system (the shell is Busybox Ash).
But Lua does (in all 5.x series devices).

You have never said WHAT you want to put on the screen, only what didn't work for you.
Without any clue to just what you are trying to achive . . . .

Write to tekUI - it has already been modified to play nicely with the Lab126 X11 installed.
The project page:
http://tekui.neoscientists.org/

The modified version (with examples):
https://github.com/janetizzy/KUAL-buttons

tekui does not have its own thread, the contribution starts here:
https://www.mobileread.com/forums/sho...9&postcount=15

And I have already set-up a 'standard practice' for extending the built-in Lua with <whatever> placed in visible USB storage.
A working example - look up (here) my CPU Report button thread.

Last edited by knc1; 10-02-2016 at 10:42 AM.
knc1 is offline   Reply With Quote
Reply

Tags
kpw, kual, pw2, python, seafile

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OPDS Client? Kudalufi Calibre 9 12-21-2012 02:59 AM
Touch OPDS client ??? vlad59 Kobo Reader 7 12-04-2011 10:36 AM
Android Email Client veronica0406 enTourage Archive 2 11-12-2010 06:23 PM
Android SFTP (client) kenjennings enTourage Archive 4 04-12-2010 02:37 PM
other client for forum? Jonas777 Feedback 4 02-05-2010 12:34 PM


All times are GMT -4. The time now is 05:26 AM.


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