04-08-2020, 09:45 AM | #16 |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Thanks for the pointer to Jessie. I had been looking at Stretch as that appeared to be the version using the kernel the PW4 is using. I guess they decided to use a newer kernel with the Jessie base.
Another thought. Debian strongly recommends the use of a package manager as opposed to attempting to manually download and install and mentions aptitude and synaptic. Obviously neither is currently on the PW4. Has anyone managed to install a package manager? Which one? Dave |
04-08-2020, 12:02 PM | #17 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
While that's a given on any kind of classic Linux distro (even an LFS ;p), that's not really applicable here.
The Kindle is not a real Linux distro. It's a snapshot of one, heavily trimmed down for one specific purpose. (Probably based on OpenEmbedded nowadays). That makes this a terrible idea outside of a chroot. Last edited by NiLuJe; 04-08-2020 at 12:05 PM. |
04-08-2020, 12:24 PM | #18 | |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
On a related topic, I thought perhaps I am missing something. I planned to ssh into the pw4 while using the audio features Amazon provides and using top to see how they are doing so. But when I do so I get: Code:
[root@kindle root]# top Unknown HZ value! (8) Assume 100. 'xterm-256color': unknown terminal type. [root@kindle root]# Dave |
|
04-08-2020, 01:43 PM | #19 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
It does, but in a custom terminfo db location in order to leave the rootfs untouched.
htop should enforce the relevant env var automatically, unlike the stock top. |
04-08-2020, 03:23 PM | #20 | |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
Now I am looking into any side effects usbnet may have on the pw4. I had selected in the KUAL menu to enable ssh via WiFi only and indeed I am able to ssh via WiFi and use the usbms to transfer books and other files to the pw4, but I find that if I ssh into the pw4 and then plug it in the usbms works but the ssh freezes. Is this expected? I am also having an issue with voiceview, but as I only tried it once this might be operator error. Dave |
|
04-08-2020, 03:46 PM | #21 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yes, the sshd is hosted on the very partition that goes poof during USBMS.
|
04-08-2020, 04:51 PM | #22 | |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
Ah, a design limitation. Understood. I finally got voiceview working with htop running. The related processes appear to be: ivonattds bsa_server btd audiomgrd All of these live in /usr/bin and normally I would inspect them with fcl or mc for clues, as of course there is no manpage for any of them. I assume one of these is doing the text-to-voice and assuming it is outputting in WAV it might be possible for mplayer to route its output there as well. Dave |
|
04-09-2020, 12:10 PM | #23 |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
It does appear from inspecting the above executables that they operate much as I suspected, but what is less obvious is how the text-to-voice process interfaces with the others. Is source code available for any of these?
Beyond that I do see references to /var/local and various sub-directories. Among these this one seems particularly interesting: Code:
[root@kindle root]# ls -l /var/local/zbluetooth/ srwxrwxr-x 1 root javauser 0 Apr 9 11:36 bt-daemon-socket -rw-rw-r-- 1 root javauser 632 Apr 9 11:36 bt_config.xml -rw-rw-r-- 1 root javauser 1727 Apr 9 11:37 bt_devices.xml -rw-rw-r-- 1 root javauser 197 Jan 29 12:20 reconnect_devices.xml Code:
[root@kindle root]# cat /var/local/system/bt_source_state.conf [BT_AUDIO_SOURCE_STATES_GROUP_NAME] MAJOR_SOURCE_ASR=0 MAJOR_SOURCE_NON_ASR=1 COPY_FM_MAJOR_SOURCE_ASR=-1 COPY_FM_MAJOR_SOURCE_NON_ASR=-1 Dave |
04-09-2020, 01:09 PM | #24 |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
I thought of one more thing to check out besides VoiceView. I "bought" a free audible book on Amazon and downloaded it onto my pw4 to play. Using htop via ssh while playing it showed it to be using /usr/bin/playermgr in addition to those I had already identified. Inspecting this executable shows many references to gstreamer.
I am not familiar with gstreamer, but I imagine someone who is could inspect this execuable and sniff out how the audible book is being played via bluetooth. I don't see a reference to using mplayer with gstreamer, but I imagine there are players able to do so. Any guidance appreciated. Dave |
04-09-2020, 07:07 PM | #25 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Try WireShark (for ARM, on the Kindle).
On Linux (which is the Kindle's system), wireshark does more than just your Ethernet card. On Linux, Wireshark can manage nearly any interface, including BlueTooth. For example: https://opensource.com/article/20/1/...k-linux-tshark about the second section down the page. |
04-09-2020, 09:02 PM | #26 | |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
I downloaded the Kindle open source code for my pw4 and inspecting the archive appears to show that gstreamer-0.10 is included there. My difficulty at this point is my lack of knowledge of how to extract the source for that particular interface knowing where it ends up on the pw4. A pointer from someone more familiar with this would be helpful. Any suggestions? Dave |
|
04-10-2020, 05:23 PM | #27 |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
I downloaded the kindle source for my pw4 and searched it for the code for the mixersink without success. This led me to pull the strings for that library binary where I unfortunately found:
Code:
EINK-specific Mixer GStreamer sink Proprietary eink http://www.amazon.com/ audio/x-raw-int, rate = (int) [ 1, MAX ], channels = (int) { 1, 2 } The lsof shows the stdin,stdout and stderr handles and an open /var/run/playermgr.pid file plus four sockets, three FIFO pipes and the audible file being played. These must form the interface to the mixer sink and the player GUI displayed on the pw4 and its controls. Is there at this point a reasonable source code reconstructor that could allow deducing which of these are actually the mixer sink interface? Is there a debug tool that would allow tracing all calls to the library? Once again I wonder if I have the skills to track down what is necessary make use of this mixer sink library interface and code an alternative front end to feed other audio to it. Dave |
04-10-2020, 08:31 PM | #28 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
gStreamer is GNU LGPL IE: proprietary code can link to/from it at runtime. But if this "sink" code is compiled into gStreamer, then the code is no longer proprietary. Now that question can be resolved using one of the ELF header file viewers. Hmm... "readelf" would be one of the tools. Note: you don't have to have the tool(s) on the Kindle, when you find the library (or executable) file you are interested in, just copy it to somewhere that you do have the tools. There is most likely even "web interface" sites that will run readelf for you (if you happen to be "Windows handicapped". I wrote too soon, there is a "work-alike" tool for readelf on other systems now: Ref: http://elfparser.com/download.html |
|
04-10-2020, 09:50 PM | #29 | |
Guru
Posts: 829
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
If we can determine how to use this library we should be able to play any audio stream by converting it to an acceptable WAV stream and routing it to the mixer to pass on to the connected audio output. Thank you four your guidance any any assistance you may offer me in this effort. Dave Last edited by dhdurgee; 04-10-2020 at 09:54 PM. |
|
04-11-2020, 01:40 AM | #30 |
Wizard
Posts: 2,731
Karma: 6681393
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
The actual meat of the code is in libmixerAPI.so.1. Also, you should be able to compile gst-launch and try piping raw audio into it.
|
Tags |
audiobook, bluetooth, jailbreak, m4b, mp3 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issue with finding audiobook metadata on Amazon | angelyne | Calibre | 6 | 10-21-2018 08:52 AM |
Listen Audiobook Player question | Hrafn | Audiobook Hardware & Software | 0 | 06-16-2018 02:36 AM |
Listen Up - We've got a brand new audiobook forum | Alexander Turcic | Announcements | 11 | 09-10-2014 06:18 PM |
Amazon Ebooks and downloaded Audiobook | ErikaGC | Kindle Fire | 1 | 06-10-2013 12:13 PM |
Sony & Amazon, etc. - Why No Wifi or Bluetooth? | poohbear_nc | News | 8 | 08-26-2009 04:29 PM |