
The author placed the Raspberry Pi Zero, a Bluetooth “whistle” and a cable inside its new Handy Tech Active Star 40 Braille display. The built-in USB port provides power. The result was a self-contained, ARM-free computer with a Linux operating system, equipped with a keyboard and a braille display. You can charge / power it via USB, incl. from a power bank or solar charger. Therefore, it can do without the power supply for several hours, but for several days.

')
Dimensional differentiation of braille displays
First of all, they differ in the length of the string. Devices with 60 or more familiarity are good when working with a desktop computer, and 40 are convenient for carrying along with a laptop. Now there are braille displays connected to smartphones and tablets, with a line length of 14 or 18 familiarity.
In the past, braille displays were pretty massive. 40-familiar, for example, had the size and weight of a 13-inch laptop. Now, with the same amount of familiarity, they are miniature enough to be able to put the display in front of the laptop, and not the laptop on the display.
This, of course, is better, but it is still not very convenient to keep two separate devices on your lap. When working at the table, there are no complaints, but it is worth remembering that the laptop is differently called a laptop, and try to justify this name, as it turns out that the miniature 40-familiar display is even less convenient.
So the author waited for the release of the long-promised new model in the Handy Tech Star series. Back in 2002, the previous model Handy Tech Braille Star 40 was released, where there is enough body area to put a laptop on top. And if it does not fit - there is a retractable stand. Now this model is replaced by Active Star 40, it is almost the same, but with modernized electronics.

And the retractable stand remained:

But the most convenient thing in the novelty is a recess about the size of a smartphone (see KDPV). It opens when you move the site back. It was inconvenient to hold a smartphone there, but somehow it is necessary to use the empty compartment, inside which even the power outlet is provided.
The first thing that the author invented was to place the Raspberry Pi there, but when the display was purchased, it turned out that with the “raspberry” the stand covering the compartment does not move. Now, if the board was only 3 mm thinner ...
But a colleague told about the output of the Raspberry Pi Zero, which turned out to be so tiny that it would fit two in the compartment ... or perhaps even three. It was immediately ordered along with a 64 GB memory card, Bluetooth, a “whistle” and a Micro USB cable. A few days later all this arrived, and sighted friends helped the author to prepare a map. Everything worked right away.
What was done for it
On the back of the Handy Tech Active Star 40 there are two USB ports for devices such as keyboards. Compact magnetic keyboard included. When the keyboard is connected, and the display itself works via Bluetooth, the computer additionally recognizes it as a Bluetooth keyboard.
Thus, if you connect a Bluetooth “whistle” to the Raspberry Pi Zero, placed in the smartphone compartment, it can communicate with the Braille display via Bluetooth using
BRLTTY , and if you also connect a keyboard to the display, the “Malinka” will work and with her.
But that's not all. The Malinka itself, in turn, can access the Internet via Bluetooth PAN from any device supporting it. The author has properly set up his smartphone and computers at home and at work, but in the future he plans to adapt for this another “raspberry” - a classic, not Zero, connected to Ethernet and another Bluetooth “whistle”.
BlueZ 5 and PAN
The way to configure PAN with
BlueZ was not obvious. The author found a bt-pan Pyhton script (see below) that allows you to configure PAN without a GUI.
With it, you can configure both the server and the client. Having received the appropriate command via D-Bus when working in client mode, he creates a new network device bnep0 immediately after the connection with the server is established. Normally, DHCP is used to assign an IP address to this interface. In server mode, BlueZ requires specifying the name of the bridge device to which it can add on the slave device to connect each of the clients. Configuring the address for the bridge device and starting the DHCP server plus IP masquerading on the bridge is usually all that is required.
Bluetooth PAN Access Point with Systemd
To configure the bridge, the author applied systemd-networkd:
File /etc/systemd/network/pan.netdev
[NetDev] Name=pan Kind=bridge ForwardDelaySec=0
File /etc/systemd/network/pan.network
[Match] Name=pan [Network] Address=0.0.0.0/24 DHCPServer=yes IPMasquerade=yes
Now you need to force BlueZ to configure the NAP profile. It turned out that BlueZ 5.36 regular utilities cannot do this. If the author is mistaken, correct it: mlang (can move ears) blind (sometimes access and quantum) guru
But he found
a blog post and
a Python script to make the necessary calls to the D-Bus.
For convenience, the author used the Systemd service to run the script and verify dependency resolution.
File /etc/systemd/system/pan.service
[Unit] Description=Bluetooth Personal Area Network After=bluetooth.service systemd-networkd.service Requires=systemd-networkd.service PartOf=bluetooth.service [Service] Type=notify ExecStart=/usr/local/sbin/pan [Install] WantedBy=bluetooth.target
File / usr / local / sbin / pan
#!/bin/sh # Ugly hack to work around #787480 iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE exec /usr/local/sbin/bt-pan --systemd --debug server pan
The second file would not be needed if there was IPMasquerade = support in Debian (see
# 787480 ).
After executing the
systemctl daemon-reload and
systemctl restart systemd-networkd commands, you can start Bluetooth PAN with the
systemctl start pan command
Bluetooth PAN Client using Systemd
The client part is also easy to configure using Systemd.
File /etc/systemd/network/pan-client.network
[Match] Name=bnep* [Network] DHCP=yes
File /etc/systemd/system/pan@.service
[Unit] Description=Bluetooth Personal Area Network client [Service] Type=notify ExecStart=/usr/local/sbin/bt-pan --debug --systemd client %I --wait
Now, after reloading the configuration, you can connect to the specified Bluetooth access point like this:
systemctl start pan@00:11:22:33:44:55
Pairing with the command line
Of course, the configuration of the server and clients must be performed after pairing them via Bluetooth. On the server, you need to run the bluetoothctl and give it commands:
power on agent on default-agent scan on scan off pair XX:XX:XX:XX:XX:XX trust XX:XX:XX:XX:XX:XX
After starting the scan, wait a few seconds until the device you need appears in the list. Write down his address and use it, giving the command pair, and if necessary - and the command trust.
From the client’s side, you must do the same, but the trust command will not be needed for sure. The server needs it to accept a connection over a NAP profile without manual confirmation by the user.
The author is not sure that this is the optimal sequence of commands. Perhaps all that is needed is to pair the client with the server and execute the trust command on the server, but he has not tried this yet.
Enable use of the HID Bluetooth profile
It is required that the “raspberry” recognize the keyboard connected to the braille display with a wire and thrown by the display itself via Bluetooth. It is done the same way, only instead of
agent on, you must give the
agent KeyboardOnly command, and the bluetoothctl will find the device with the HID profile.
But configuring Bluetooth via the command line is complicated
Although the author managed to configure everything, he understands that it is inconvenient to configure BlueZ via the command line. At first, he thought that agents are only needed to enter PIN codes, but it turned out, for example, that to enable the HID profile, you need to dial "agent KeyboardOnly". Surprisingly, to start Bluetooth PAN, you need to climb the repositories in search of the desired script. He remembers that in the previous version of BlueZ there was a ready-made
pand tool for this - where is he doing in BlueZ 5? Suddenly a new solution appeared, unknown to the author, but lying on the surface?
Performance
The data transfer rate was about 120 kbps, which is quite enough. The 1 GHz ARM processor is very fast for the command line interface. The author still plans to use ssh and emacs on the device.
Console fonts and screen resolution
The screen resolution used by the framebuffer on the Raspberry Pi Zero by default is rather strange: fbset reports that it is 656x416 pixels (the monitor, of course, is not connected). With the console font 8x16, we got 82 characters per line and 26 lines.
It is inconvenient to work with the Braille display for 40 acquaintances in this mode. Also, the author would like the display to display Braille unicode characters. Fortunately, Linux supports 512 characters, and in most console fonts there are 256. With console-setup, you can use two 256-character fonts together. The author added the following lines to the / etc / default / console-setup file:
SCREEN_WIDTH=80 SCREEN_HEIGHT=25 FONT="Lat15-Terminus16.psf.gz brl-16x8.psf"
Note: to make the brl-16x8.psf font available, you need to install the console-braille.
What's next?
There is a 3.5mm jack on the Braille display, but the author doesn’t know any adapters for removing the audio signal from the Mini-HDMI. The author did not manage to use the sound card built into the “raspberry” (strangely, the translator was sure that there was no such thing in Zero, but there are ways to output sound by PWM to GPIO). He plans to use a USB-OTG hub and connect an external card and output the sound to the column built into the braille display. For some reason, two external cards did not work, now it is looking for a similar device on another chipset.
It is still inconvenient to manually turn off the “raspberry”, wait a few seconds and turn off the Braille display. And all because when it is disconnected it removes power from the connector in the compartment. The author plans to place a small buffer battery in the compartment and, through GPIO, inform the Malinka about turning off the display so that it can finish its work. Such is the UPS in miniature.
System image
If you have the same braille display, and you want to do the same with it, the author is ready to provide a ready-made image of the system (based on Raspbian Stretch). Write to him about it at the address indicated above. If there are a lot of people willing, it is even possible to release sets that include everything needed for such a conversion.
Acknowledgments
Thank you Dave Mielke for reading the text.
Thanks to Simon Kainz for the photo illustrations.
Thanks to colleagues at the Graz University of Technology for the rapid introduction of the author to the world of Raspberry Pi.
PS
The author’s
first tweet on this topic (the translator doesn’t open) was completed just five days before the original of this article was published, and we can assume that, with the exception of problems with sound, the task was practically solved. By the way, the author edited the final version of the text from a “self-sufficient braille display” made by him, connecting it via SSH to a home computer.