Continuing with the same 2GB Raspberry Pi I used to try out Ubuntu for IoT, I reloaded it with Raspbian Buster and plugged Google’s Coral Accelerator. I’d gotten it yesterday for $75 from Amazon. The Raspberry Pi 4 comes with two USB 3 ports and a reasonably up-to-date and fast quad-core CPU. I had given serious consideration to purchasing Nvidia’s Jason Nano, but it came with its own support SBC with a CPU no better than a Raspberry Pi 3, and to top it off I’d have had to install and learn the peculiar ways of yet another Linux distribution for the Nano. The monitory difference between the Coral and the Nano is inconsequential; the cost is the much larger investment in time required to master yet another Linux system as well as using the Nvidia GPU. I have neither the time nor patience for that anymore. Give me something that I can quickly plug into and use with what I already have.
Getting set up and running was super fast. It took about 15 minutes to go online for the setup directions, install the Coral support libraries, git clone an example, plug in the Coral, and then run the example. The example ran successfully. All the steps where very straightforward and fast.
I then decided to run a secound example, this time Google’s detection example.
It’s difficult to see if you don’t zoom into the screen capture, but if you do you will see Admiral Grace Hopper’s tie is identified and a red box drawn around it. This is test #2, and a bit more interesting than the first test.
Not much more to offer at this point as all I’m doing is pulling the examples and giving them a spin. I’ll work on writing something more original when I better understand the system. Fortunately all the higher level software is written in Python. For me it’s a joy to work with Python, especially version 3, on any system.
I spent some time this Thanksgiving holiday taking Ubuntu for IoT for a quick spin on a Raspberry Pi 4 with 2GB of memory. I have three Raspberry Pi 4s, one each of 1GB, 2GB and 4GB memory capacity. The 4GB is the primary “development” system with the latest version of Raspbian Buster installed. I had the 2GB version mounted inside a Flirc case sitting on the shelf, unpowered and without an OS. I decided to experiment with that one, as I hadn’t used it since the very early days of the Raspberry Pi 4 hardware release and initial release of Raspbian Buster. Once the 4GB Raspberry Pi 4 arrived, I transferred all my work to it and ignored the other two. The 1GB board is back in its anti-static bag and in its original box. I need to pull it out and put it back to work as well. But I digress…
Raspberry Pi 4 with 2GB of memory
Firmware version – 000137ab
SanDisk Ultra Plus 64GB µSD card, V10, XC I, C10, A1
Monitor – Samsung S22C300H 1920 x 1080, 21.5 inch monitor
Keyboard – Logitech MK710 wireless
Mouse – Logitech MX Ergo trackball
Normally I use an LG 34UM61-p 2560 x 1080 monitor with my RPi 4 because Raspbian Buster is capable of driving it. But Ubuntu IoT won’t, neither in text nor graphics (desktop) mode. While the Logitech MK710 comes with its own mouse, I use the Ergo because it’s easier for me. I’ve begun to develop arthritis in my right wrist, and it’s easier for me to keep my hand still and at a 30% tilt from horizontal, and just move the track ball with my thumb.
Installing 64-bit Ubuntu Server IoT
The reason for installing 64-bit Ubuntu Server IoT on the 2GB memory RPi 4 board is that it currently will not work on the 4GB memory board.
I followed the directions on the Ubuntu site (https://ubuntu.com/download/raspberry-pi), flashing the 64-bit Ubuntu Server image to the µSD card using balenaEtcher (https://www.balena.io/etcher) on my Mac. If you don’t use balenaEtcher (on Linux, macOS, or Windows) then you’re only making it harder on yourself. balenaEtcher is incredibly simple to use and nearly foolproof.
Bootup was bit peculiar compared to Raspbian command line. It took awhile for the Ubuntu image to completely boot. When it finally presented a login prompt and I logged in, it had converted all the empty space on the µSD card into a Linux volume. The total amount of disk space that Server took for itself on that volume was less than 2GB, which isn’t bad at all.
Logging in the first time was annoying. The login prompt would appear, then get wiped as late starting services would announce themselves as via text to the console. I learned to wait until startup was truly finished before attempting to log in.
I had the Pi connected to my network via a wired cable. The server image doesn’t have everything necessary to turn on WiFi on the board. I had to install network tools in order to make wireless work, and I had to create by hand an initial wpa_supplicant.conf configuration file with my wireless networks SSID and password. At the next reboot the WiFi network came up and Ubuntu IoT was running in 64 bit mode with WiFi. After that it was ‘apt update’ and more waiting. Bringing up WiFi is very simple, and very easy, with Raspbian. It can be done either with a text tool or on the desktop. Ubuntu Server IoT could take a page from the Raspbian setup manual on how it should be done.
Now I know that security is a Big Deal with the Ubuntu IoT crew. I really get that. But forcing me to change my password into something long and complex is a royal pain in my behind. I hate that crap. Trust me: if and when I decide to deploy based on this (which at this time I won’t, but keep reading) then I’ll harden login. I didn’t fall off the turnip truck to get here. And I certainly don’t need such a sledgehammer reminder as the one in Ubuntu Server IoT right off the bat.
Installing a Desktop
After installing Server I followed the direction’s advice and installed Lubuntu Desktop. That took some time as a large number of packages had to be installed, and many others updated. When it finished and the RPi 4 rebooted, it showed a graphical login screen. I logged in and beheld a typical Linux graphical desktop.
It was, for the most part, rather uneventful, which is a Good Thing. I noticed that the applications installed were rather sparse, which is another Good Thing. There were no ancient games, for example. What I did find unusual is that LibreOffice was installed. I don’t need an office suite installed on a RPi development board. That’s why I never install the full Raspbian desktop plus applications, only the basic Raspbian desktop.
I also discovered that gcc isn’t installed either. I understand not having it with the Server image, but the desktop image should have the development tools as part of the overall package. Python 3 was there as was Vim, so I could have taken off with that if I’d wanted to. And yes, I can certainly apt install all the development tools. But still…
I did like the look of Lubuntu, but not necessarily it’s operation. The desktop software operated in a halting, janky sort of fashion. I’d move the mouse across the desktop and watch it stutter a bit. It wasn’t all the time, and it didn’t get in the way of getting work done. But compared to Raspbian, it didn’t feel quite as polished while using it.
I spent a half hour poking about, looking at things, and appreciating it was actually running in 64-bit mode. That’s my biggest complaint about Raspbian, that it’s still 32-bit. Once set up I shut it down and attempted to bring it back up with the LG monitor. While Ubuntu Server came up, the monitor stayed dark. I could ping it and ssh into it, but the graphical desktop was non-functional. In the end I pulled out the µSD card, put it away, and brought the 2GB RPi 4 in up-to-date Raspbian.
I’m not sure what to say. It feels rough, especially the desktop. My advice there is to pick just one desktop, and then to tailor it more towards development, including such applications as gcc and supporting development tools. Or if you don’t want to bloat the desktop meta package then create a Languages Development meta-package that has everything needed, while trimming back the desktop package.
Ubuntu Server IoT has a lot of promise and I will tinker with it some more in the near future, but for now, based on my very limited experience, if you’re starting out with the Raspberry Pi, then chose Raspbian. There are three Raspbian images; one minimal command line, one basic desktop, and a desktop with all sorts of additional goodies. I personally use the first two. But I can’t ignore the fact that Ubuntu Server has a 64-bit foundation. They’re all good and solid and will get you up and running with a minimum of fuss.
One other positive aspect about Ubuntu Server plus desktop. It’s disk footprint is noticeably smaller than Raspbian, even with the desktop meta package installed. I certainly appreciated that. It’s memory footprint also is rather small as well. Again, another aspect to appreciate.
I’m not giving up on Ubuntu Server IoT. I just need to think of the best way to use it in the future.