No exciting new hardware announcement to tie it to this time, but we’ve just released a new version of our Raspbian image with some (hopefully) useful features. Read on for all the details of what has changed…
When the Pi 3 launched back in February, we’d not had time to do much in terms of getting access to the new onboard Bluetooth hardware. There was a working software stack, but the UI was non-existent.
I’d hoped to be able to use one of the existing Linux Bluetooth UIs, but on trying them all, none were really what I was looking for in terms of usability and integration with the look and feel of the desktop. I really didn’t want to write one from scratch, but that ended up being what I did, which meant a fun few weeks trying to make head or tail of the mysteries of BlueZ and D-Bus. After a few false starts, I finally got something I felt was usable, and so there is now a Bluetooth plugin for the lxpanel taskbar.
On the taskbar, to the left of the network icon, there is now a Bluetooth icon. Clicking this opens a menu which allows you to make the Pi discoverable by other devices, or to add or remove a Bluetooth device. Selecting the ‘Add Device…’ option opens a window which will gradually populate with any discoverable Bluetooth devices which are in range – just select the one you want to pair with and press the ‘Pair’ button.
You will then be guided through the pairing procedure, the nature of which depends on the device. With many devices (such as mice or speakers), pairing is entirely automatic and requires no user interaction; on others you may be asked to enter a code or to confirm that a code displayed on a remote device matches that shown on the Pi. Follow the prompts, and (all being well), you should be rewarded with a dialog telling you that pairing was successful.
Paired devices are listed at the end of the Bluetooth menu – these menu entries can be used to connect or disconnect a paired device. To remove a pairing completely, use the ‘Remove Device…’ option in the menu.
Bluetooth support is limited at this stage; you can pair with pretty much anything, but you can only usefully connect to devices which support either the Human Interface Device or Audio Sink services – in other words, mice, keyboards and other UI devices, and speakers and headsets.
Devices should reconnect after a reboot or on powering up your Pi, but bear in mind that keyboards and mice may need you to press a key or click the mouse button to wake them from sleep when first used after a power-up.
The Bluetooth UI should also work with an external Bluetooth dongle on platforms other than Pi 3 – I’ve successfully tested it with a Targus dongle on all the earlier platforms.
The UI now supports the use of Bluetooth speakers and headsets for audio output, with a few caveats, about which more below.
To connect an audio device, you pair it as described above – it will then be listed in the audio device menu, accessible by right-clicking the speaker icon on the taskbar.
Selecting a Bluetooth device from the audio device menu will cause it to be selected as the default audio output device – there will be a few seconds’ pause while the connection is established. You can then use the volume control on the taskbar to control it, as for standard wired audio devices.
There is one issue with the support for Bluetooth audio, however. Due to the way the Bluetooth stack has been written, Bluetooth devices do not appear to the system as standard ALSA audio devices – they require the use of an intermediate audio layer called PulseAudio. The PulseAudio magic is all built into the UI – you don’t need to worry about setting it up – but the problem is that not all applications are able to send audio to the PulseAudio interface, and therefore cannot output audio over Bluetooth.
Most applications work just fine – videos and music work in the Epiphany and Iceweasel browsers, as does the command-line mplayer music player and the vlc media player. But at present neither Scratch nor Sonic Pi can output audio over Bluetooth – we are working with the authors of these programs to address this and are hopeful that both can be made compatible, so please bear with us!
The use of PulseAudio has one other effect that may cause issues for a small number of users – specifically, if you are already using PulseAudio for anything other than interfacing with Bluetooth devices. This plugin will automatically stop the PulseAudio service whenever a standard ALSA device is selected. If you are using PulseAudio for your own purposes, it would be best to remove the volumealsa plugin from the taskbar completely to avoid this – just right-click anywhere on the taskbar, choose ‘Add/Remove Panel Items’, and remove the “Volume Control (ALSA)” item from the list.
SD card copier
One query which comes up a lot on the forums is about the best way to back up your Pi. People also want to know how to migrate their Raspbian install to a new SD card which is larger or smaller than the one they are using at the moment. This has been difficult with the command-line tools that we’ve recommended in the past, so there is now a new application to help with this, and you’ll find it in the menu under ‘Accessories’.
The SD Card Copier application will copy Raspbian from one card to another – that’s pretty much all it does – but there are several useful things that you can do as a result. To use it, you will need a USB SD card writer.
To take a common example: what if you want to back up your existing Raspbian installation? Put a blank SD card in your USB card writer and plug it into your Pi, and then launch SD Card Copier. In the ‘Copy From Device’ box, select “Internal SD Card”, and then select the USB card writer in the ‘Copy To Device’ box (where it will probably be the only device listed). Press ‘Start’, watch the messages on the screen and wait – in ten or fifteen minutes, you should have a clone of your current installation on the new SD card. You can test it by putting the newly-copied card into the Pi’s SD card slot and booting it; it should boot and look exactly the same as your original installation, with all your data and applications intact.
You can run directly from the backup, but if you want to recover your original card from your backup, simply reverse the process – boot your Pi from the backup card, put the card to which you want to restore into the SD card writer, and repeat the process above.
The program does not restrict you to only copying to a card the same size as the source; you can copy to a larger card if you are running out of space on your existing one, or even to a smaller card (as long as it has enough space to store all your files – the program will warn you if there isn’t enough space). It has been designed to work with Raspbian and NOOBS images; it may work with other OSes or custom card formats, but this can’t be guaranteed.
The only restriction is that you cannot write to the internal SD card reader, as that would overwrite the OS you are actually running, which would cause bad things to happen.
Please also bear in mind that everything on the destination card will be overwritten by this program, so do make sure you’ve got nothing you want to keep on the destination card before you hit Start!
This image includes the pigpio library from abyz.co.uk – this provides a unified way of accessing the Pi’s GPIO pins from Python, C and other languages. It removes the need to use sudo in programs which want to access the GPIOs, and as a result Scratch now runs sudo-less for everyone.
One of the tools which is really useful for professional programmers is a good text editor – the simple editor provided with LXDE is fine for small tasks, but not really suitable for serious work.
The image now includes the Geany editor, which is much better suited to big projects – it offers features like syntax highlighting, automatic indentation and management of multiple files. There’s good online help built into the program itself, or have a look at the Geany website.
New versions of applications
There are new versions of many of the standard programs included in the image, including Scratch, Sonic Pi, Node-RED, BlueJ and PyPy. Please see the relevant individual websites or changelists for details of what has changed in each of these.
The Linux kernel has been upgraded to version 4.4. This change should have no noticeable effect for most users, but it does force the use of device tree; if you’ve been hacking about with your Raspbian install, particularly in terms of installing new hardware, you may find reading this forum post useful.
There are a lot of small user interface tweaks throughout the system which you may notice. Some of these include:
• A new Shutdown Options dialog
• The Mouse and Keyboard Settings dialog now allows you to set the delay between double-clicks of the mouse button
• The Raspberry Pi Configuration dialog now allows you to enable or disable the single-wire interface, and to enable or disable remote access to the pigpio daemon
• Right-clicking the Wastebasket icon on the desktop now gives the option to empty the wastebasket
• The keyboard shortcut Ctrl-Alt-T can now be used to open a Terminal window
Finally, there are a couple of setup-related features:
• When flashing a new Raspbian image, the file system will automatically be expanded to use all the space on the card when it is first booted.
• If a
wpa_supplicant.conf file is placed into the
/boot/ directory, this will be moved to the
/etc/wpa_supplicant/ directory the next time the system is booted, overwriting the network settings; this allows a Wifi configuration to be preloaded onto a card from a Windows or other machine that can only see the boot partition.
There are also a host of fixes for minor bugs in various parts of the system, and some general cleaning-up of themes and text.
How do I get it?
A full image and a NOOBS installer are available from the Downloads page on this website.
If you are running the current Jessie image, it can be updated to the new version by running
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install piclone geany usb-modeswitch pi-bluetooth
sudo apt-get install python-pigpio python3-pigpio
and then rebooting.
Edit – I’d omitted to show that the Python bindings for pigpio needed to be added as part of an upgrade – now added to the line above.
As ever, your feedback on the new release is very welcome – feel free to comment here or in the forums.
Some users who are using a remote desktop on the Pi have found that the taskbar keeps crashing. This has been traced to a security policy on the bus used to communicate with the Bluetooth hardware; to fix it, configure the Pi to autologin (using either the Raspberry Pi Configuration desktop application or raspi-config). Alternatively, update the security policy by editing
/etc/dbus-1/system.d/bluetooth.conf – change the third line from the end from
<deny send_destination="org.bluez"/> to
Some users are also reporting that no Bluetooth controller is found on a Pi 3 after updating. This seems to be linked to the package which adds the Pi-specific Bluetooth support (which was added in the software release to support the Pi 3 earlier this year) somehow becoming uninstalled. The fix is to reinstall it –
sudo apt-get install pi-bluetooth and reboot should enable the controller to be found.