@@ -20,3 +20,96 @@ A resting state (pause) stops the scanning process when the user does not select
The installation steps described hereafter have been checked on a Raspberry Pi Zero W V1.1, after a fresh install of a 32bit version of Raspbian (bullseye v11, kernel v5.15, release date: April 4th 2022). For Raspbian installation instructions, see [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/).
## Required additional modules
* wxPython
This module provides the GUI used by the application. wxPython is available on all standard operating systems, which allows an easy testing and configuration of the software on any computer. To install wxPython execute:
```
sudo pip install wxPython
```
* pypubsub
This python module allows communication between processes through a publish-subscribe mechanism, see [https://pypubsub.readthedocs.io/](https://pypubsub.readthedocs.io/). To install pypubsub execute:
```
sudo pip install pypubsub
```
## HID keyboard configuration
The following configuration steps are strongly inspired by the tutorial available at [http://www.isticktoit.net/?p=1383](http://www.isticktoit.net/?p=1383). The aim is to make the RPi0 appear as a USB keyboard when connected to a host computer.
First, modules must be added to the kernel to enable a device tree overlay:
```
echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt
echo "dwc2" | sudo tee -a /etc/modules
echo "libcomposite" | sudo tee -a /etc/modules
```
Since gadget devices definitions are volatile, the HID keyboard must be created after each boot by a configuration script. To create this script execute:
```
sudo touch /usr/bin/cristal-speller
sudo chmod +x /usr/bin/cristal-speller
```
Then edit this script using:
```
sudo nano /usr/bin/cristal-speller
```
and copy/paste the following device definition parameters:
Finally, save (`ctrl+O`) and close (`ctrl+X`) the editor.
The device definition script is called at each system startup by the `/etc/rc.local` script. This call is inserted in `/etc/rc.local` just before the `exit` instruction by executing:
```
sudo sed -i '/^exit.*/i /usr/bin/cristal-speller # libcomposite configuration' /etc/rc.local
```
## Application installation
Get a copy of the application from this gitlab page, either using a git clone operation or by downloading the entire project directory in compressed format. Uncompress all the files in a dedicated folder, keeping the directory structure (for instance 'video-audio-speller-master' in the following example). Then in order to start the application after GUI boot, create a shortcut by executing: