Prepping the Raspberry Pi 3 for Jasper
I’ve been using a Raspberry Pi 2, for a while now, using it as a NAS box. I recently read about Jasper, an open-source project aimed at developing voice-controlled applications, like Siri and Alexa. Since I’ve been using Arch Linux for Arm on my RPi2 for a while, and quite happily at that, I simply did a disk dump of the / and /boot partitions on my older pi and cloned them on the new SD card. What I forgot to do after partitioning the new card though, was to set the LBA flag on, on the /boot partition. If the file system on the /boot partition is not either fat32 or fat16, and if the LBA flag is not turned on, the pi will neither boot, nor display any diagnostics. The only indication will be the non lighting up of the green LED, indicating SD card activity.
Once I figured out the mistake and set the LBA flag on, the new pi booted without further issues. One of the differences between the RPi2 and RPi3 is that the newer edition has a built-in wifi-adaptor. I’d never configured the older pi to auto-connect to wifi, so the new one didn’t either, and when I tried to use wifi-menu to generate the connect scripts, I found netctl simply failing, and a bit of digging later, I found that it didn’t like dashes in the profile name, though it’s quite acceptable in the SSID value itself. Once I renamed the ‘profile’ file, it auto-connected to the wifi without trouble, so I was able to disconnect it from the wired network, and perform rest of the setup on the wifi.
For jasper, the package to be installed was jasper-voice-commands-git, from the Arch User Repository (AUR). The only changes that were needed were the addition of the armv7h to the architectures list in the PKGBuild file, to allow yaourt to compile the packages on the pi. When it tried to build openfst however, it ran out of memory and failed, as I’d not turned on swap, so fixed that by giving it 1 GB of swap, and that took care of the out-of-memory issue during the build. This is what the partitioning looks like, with a further 20 GiB unpartitioned free space available.
[root@rpi3 ~]# parted /dev/mmcblk0
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) u MiB
(parted) print
Model: SD SC32G (sd/mmc)
Disk /dev/mmcblk0: 30437MiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1.00MiB 101MiB 100MiB primary fat16 lba
2 102MiB 10342MiB 10240MiB primary ext4
3 10343MiB 11367MiB 1024MiB primary linux-swap(v1)
Trying to install one of the install-prerequisites, phonetisaurus, I ran into this bug, and I’m still trying to work around it, so installing and configuring Jasper will have to be another post, and it’ll happen when I get around to it. For now, I’m happy the new Pi is up and running.