I want do stream images to my e-ink reader's browser. I have a Kobo Aura H2O and a Kindle Paperwhite.
I have tried multiple mechanics but nothing seems to work, because the browser ignores half of the javascript.
Websockets
do not work, setInterval
to update the image regularly does not work neither
Are there any Specs of this Browsers to be found? What other alternatives within Javascript are there to test?
Asked
Active
Viewed 339 times
1

jeff
- 1,169
- 1
- 19
- 44
-
What's the User-Agent string? If unsure, you can look find out by visiting e.g. [What is my User Agent?](https://www.whatismybrowser.com/detect/what-is-my-user-agent) (disclaimer: first Google hit) – Álvaro González May 22 '20 at 17:34
-
I can find out, but how would it help? – jeff May 22 '20 at 18:33
-
Surely Rakuten didn't write a brand new browser from scratch – Álvaro González May 22 '20 at 19:29
-
Website says for Kobo: Android Browser 4 on Android (Eclair) – jeff May 22 '20 at 20:16
-
Kindle is: Kindle Browser on Fire OS 3 – jeff May 22 '20 at 20:18
-
I don't find it very helpful - may be they are using a specific engine under the hood, but they have disabled specific functions on purpose – jeff May 22 '20 at 20:21
-
Sorry, your follow-up comments give me a strong feeling that I somehow didn't understand the question. Let's see if someone else can help. – Álvaro González May 23 '20 at 09:16
2 Answers
1
The Kindle browser does technically support WebSockets (even on the very first Kindle Touch), however because it's based on a very old version of Webkit, it's the very first version (or one of the first versions, I'm not exactly sure) of the WebSocket spec which is very different from the current one and isn't supported in the majority of Websocket libraries.
I made a very bad patch for the Node ws library here: https://github.com/HimbeersaftLP/ws
Google's pywebsocket also supports it: https://github.com/google/pywebsocket/wiki/WebSocketProtocolSpec

Himbeer
- 141
- 1
- 3
- 9
-
1Thanks! I use a dart server (because it's inside a Flutter app) do you know which specs are used, may be I can implement them in dart too – jeff May 30 '20 at 05:50
-
Do you maybe have a good source with kindle specs? Because I had another problem, trying to update src in
, which didn't work – jeff May 30 '20 at 05:52
-
The WS specs used are I think https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00 for a bad sample implementation you can see my GitHub repo linked in the answer. To test your implementation I recommend using https://github.com/google/pywebsocket/blob/master/example/echo_client.py from the Google Repo with the argument --protocol-version=hybi00 – Himbeer May 30 '20 at 10:45
-
For general browser specs I sadly don't know, you could try looking at the user agent for the webkit version or run a generic browser compatibility tester. Generally, to test the websites I build for the Kindle I usually just use Internet Explorer (sometimes with emulation set to IE 10). – Himbeer May 30 '20 at 10:46
-
0
setInterval actually works, the problem was that I have used es6 instead of es5 js syntax.
Websockets also work with Kobo Browser but not on Kindle

jeff
- 1,169
- 1
- 19
- 44