Skip to content
Johan Abbors edited this page Feb 29, 2016 · 11 revisions

Here we describe various issues with Vadelma and how to work around them.

Unreadable books with windows-1252 encoding

The toolchain used to build Vadelma is not compiling in support in libxml2 to open XML files with encoding 'windows-1252'. Thus, when a user tries to read a book with this encoding, it fails and the "error in content" message is played.

If the book is on a local storage media, i.e. USB disk, one can easily change the encoding type and make the book readable. Keep in mind that changing the encoding type may corrupt the book when opened in other players. So make a backup of the book before continuing. This fix works in Vadelma since it is not rendering the text content in a book. Vadelma only plays the audio files in a book.

Linux

Linux users can run a single command in a terminal and replace the encoding. Open the terminal, go to the directory where the book is and run the command below.

$ sed -i 's/windows-1252/iso-8859-1/' *.smil *.html

Windows

Windows users have a harder time changing the encoding type. They must open each .smil and .html file in a text editor, search for all occurrences of 'windows-1252' and replace it with 'iso-8859-1'.

SSH login to Vadelma

Vadelma does not support SSH login by default, but one can alter the file system on the SD-card and setup key-based SSH logins. It requires the you have private-public SSH keys generated and root access to a Linux system with a SD-card reader.

On a Ubuntu machine, do the following steps:

  1. Generate keys if you haven't done it already. Follow the instructions here https://help.ubuntu.com/community/SSH/OpenSSH/Keys

  2. Insert the SD-card into the Linux machine. Ubuntu automatically mounts the SD-card and if you run the mount command you should see something similar to this:

/dev/sdc2 on /media/<user>/7a543578-0ad2-4d1e-9d85-77276892f336 type ext4 (rw,nosuid,nodev,uhelper=udisks2)
/dev/sdc1 on /media/<user>/raspberrypi type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
  1. Copy the public SSH key to the SD-card. Remember to change all occurrences of <user> with your username from the output above.
$ sudo mkdir /media/<user>/7a543578-0ad2-4d1e-9d85-77276892f336/home/root/.ssh
$ sudo chmod 700 /media/<user>/7a543578-0ad2-4d1e-9d85-77276892f336/home/root/.ssh
$ sudo cp /home/<user>/.ssh/id_rsa.pub /media/<user>/7a543578-0ad2-4d1e-9d85-77276892f336/home/root/.ssh/authorized_keys
$ sudo chmod 600 /media/<user>/7a543578-0ad2-4d1e-9d85-77276892f336/home/root/.ssh/authorized_keys
  1. Unmount the SD-card, boot up Vadelma and login. Remember to substitute <raspberrypy-ip> with the IP address assigned to your RaspberryPi.
$ ssh root@<raspberrypi-ip>

Mount USB drives at boot

Vadelma is not designed to detect removable media, i.e. USB, when it boots. It only supports detection of removable media while it is running. However, it is possible to configure Vadelma to search for removable media paths at startup but it requires that you know the exact mount path for drive. Usually this is /media/<NAME> where NAME is the identifier of the drive you'll see when it's inserted in any PC (Windows,Linux,Mac).

For example, a Kingston 8GB USB stick, when inserted in a MAC it's listed as KINGSTON.

Modify the settings.ini file and define a FileSystemPath. It should look similar to the snippet below. Remember to substitute KINGSTON with the name of your drive.

[FileSystemPath]

NAME=usb
PATH=/media/KINGSTON

Note: If Vadelma still doesn't detect your USB stick at start you must login to Vadelma (instructions above) and see how it's is mounted by typing command mount.

Clone this wiki locally