Raspberry Pi 4 Starter Kit - Ubiquiti Unifi controller software

I've been considering (because I have way too much time on my hands these days) getting a Raspberry Pi to run my Unifi access point controller software on. I would be doing this with Ubuntu or Raspian Linux. I currently run the controller on my desktop system (openSUSE). I assume a kit like this would be suitable. https://www.canakit.com/raspberry-pi-4-starter-kit.html

On 2021-05-09 10:51 a.m., James Knott via talk wrote:
I've been considering (because I have way too much time on my hands these days) getting a Raspberry Pi to run my Unifi access point controller software on. I would be doing this with Ubuntu or Raspian Linux. I currently run the controller on my desktop system (openSUSE). I assume a kit like this would be suitable.
Short answer: yes, maybe. You probably want a 4 GB system, as at least it can act as a lightweight desktop(-ish) system if the controller project doesn't work out. Also, read the bit about Imager below, as it makes setting up a Raspberry Pi trivial. --------- Longer answer: It should do. Check availability, though; Elmwood seems to be short of Raspberry Pi 4 kits, so they may be back-ordered from Canakit too. Buyapi (in Nepean) and Canakit are Canadian official resellers, so are supposed to get priority on stock. Practically, they'll run out like everyone else from time to time. Choice of OS could be critical: Raspberry Pi OS (the OS formerly known as Raspbian) is a 32-bit Debian-derived distro. Ubuntu is 64-bit. Raspberry Pi OS has devices and drivers tweaked to work with the Raspberry Pi's hardware, as well as support from the Raspberry Pi Foundation. Ubuntu may not have all the best and brightest drivers, and Raspberry Pi-specific support may be lacking. For installation, you'll probably want to replace whatever comes on the supplied SD card with a known latest release. Many Raspberry Pi SD cards still come installed with a slightly annoying (but super quick for vendors to install) distro wrapper called NOOBS. Raspberry Pi Imager is probably the quickest way to install an OS on the card: https://www.raspberrypi.org/software/ You might want to install Raspberry Pi OS Lite, which doesn't run a desktop. Imager has a 'secret' setup screen (Ctrl + Shift + X) that allows you to pre-configure bits of your system, such as user password, ssh keys and wifi access (if you need it). Details: https://www.raspberrypi.org/blog/raspberry-pi-imager-update-to-v1-6/ Regarding running the Unifi controller, it looks like it's a bit of a hack to get it running. Both tutorials I found recommend adding Ubiquiti's Debian repo to the system. On a Raspberry Pi, this can result in anything from "zero problems" to "everything stops working, forever". It all depends what the repo pulls in and assumes about the system. Both tutorials aren't perfect, but are a start: 1) https://pimylifeup.com/rasberry-pi-unifi/ 2) https://lazyadmin.nl/home-network/installing-unifi-controller-on-a-raspberry... In particular, both recommend unnecessary messing with the system entropy source. If you install rng-tools (sudo apt install rng-tools) without messing with the config file, it will automatically pull in the hardware entropy source. It looks like both of these followed old advice. 'Old', in the Raspberry Pi world, is anything older than 18 months or so. So much changes with the Raspberry Pi hardware and software that old advice can sometimes be detrimental. cheers, Stewart

On 2021-05-10 9:01 a.m., Stewart C. Russell via talk wrote:
I've been considering (because I have way too much time on my hands these days) getting a Raspberry Pi to run my Unifi access point controller software on. I would be doing this with Ubuntu or Raspian Linux. I currently run the controller on my desktop system (openSUSE). I assume a kit like this would be suitable.
https://www.canakit.com/raspberry-pi-4-starter-kit.html Short answer: yes, maybe. You probably want a 4 GB system, as at least it can act as a lightweight desktop(-ish) system if the controller
On 2021-05-09 10:51 a.m., James Knott via talk wrote: project doesn't work out. Also, read the bit about Imager below, as it makes setting up a Raspberry Pi trivial.
I'd probably go for 8 GB, as the price difference isn't that great. I learned a long time ago that going cheap with memory is a bad idea.
---------
Longer answer: It should do. Check availability, though; Elmwood seems to be short of Raspberry Pi 4 kits, so they may be back-ordered from Canakit too. Buyapi (in Nepean) and Canakit are Canadian official resellers, so are supposed to get priority on stock. Practically, they'll run out like everyone else from time to time.
This isn't a high priority, so I can live with that.
Choice of OS could be critical: Raspberry Pi OS (the OS formerly known as Raspbian) is a 32-bit Debian-derived distro. Ubuntu is 64-bit. Raspberry Pi OS has devices and drivers tweaked to work with the Raspberry Pi's hardware, as well as support from the Raspberry Pi Foundation. Ubuntu may not have all the best and brightest drivers, and Raspberry Pi-specific support may be lacking.
For installation, you'll probably want to replace whatever comes on the supplied SD card with a known latest release. Many Raspberry Pi SD cards still come installed with a slightly annoying (but super quick for vendors to install) distro wrapper called NOOBS. Raspberry Pi Imager is probably the quickest way to install an OS on the card:
https://www.raspberrypi.org/software/
You might want to install Raspberry Pi OS Lite, which doesn't run a desktop.
The software runs as a service, so no desktop needed.
Imager has a 'secret' setup screen (Ctrl + Shift + X) that allows you to pre-configure bits of your system, such as user password, ssh keys and wifi access (if you need it). Details: https://www.raspberrypi.org/blog/raspberry-pi-imager-update-to-v1-6/
Regarding running the Unifi controller, it looks like it's a bit of a hack to get it running. Both tutorials I found recommend adding Ubiquiti's Debian repo to the system. On a Raspberry Pi, this can result in anything from "zero problems" to "everything stops working, forever". It all depends what the repo pulls in and assumes about the system.
I have the software running on openSUSE and it was a simple matter of installing the RPM and ensuring the service was enabled. Also, the official software from Ubiquiti is Debian based, whereas the openSUSE one was created by someone in the openSUSE community. However, I have no experience with Raspberries and little with DEB systems.
Both tutorials aren't perfect, but are a start:
1) https://pimylifeup.com/rasberry-pi-unifi/
2) https://lazyadmin.nl/home-network/installing-unifi-controller-on-a-raspberry...
In particular, both recommend unnecessary messing with the system entropy source. If you install rng-tools (sudo apt install rng-tools) without messing with the config file, it will automatically pull in the hardware entropy source. It looks like both of these followed old advice. 'Old', in the Raspberry Pi world, is anything older than 18 months or so. So much changes with the Raspberry Pi hardware and software that old advice can sometimes be detrimental.
Yeah, there's often "old" advice in the Linux community. As for using the Pi as a desktop system, I doubt I'll be doing that. It will be for this one task alone. Likewise, my firewall/router is pfsense, running on a Qotom mini PC with i5 CPU and 4 Ethernet ports. It certainly could be used as a desktop, but I don't see myself doing that. It even came with the hardware for mounting on the back of a monitor. ;-) tnx jk

It's hard to find general-purpose computers that can be USB clients, rather that hosts. This mode is called "gadget". You can do this with a Raspberry Pi Zero. You can also do it with a Pi 4! It turns out that the Pi 4's power connector is also a USB 2.0 port. To conveniently access it, you can use one of these: <https://www.buyapi.ca/product/usb-c-pwr-splitter/> (There's a different splitter that might be aimed at the Pi Zero) Why you cannot do this with other models of Pi: The Broadcom chip has one USB port. It is fed to a USB hub, and that's exposed on the connectors. A USB hub cannot provide Gadget ports. On the Pi 4, the Broadcom's USB port is connected to the power input, with no hub in the way. | From: Stewart C. Russell via talk <talk@gtalug.org> | Buyapi (in Nepean) and Canakit are Canadian official | resellers, so are supposed to get priority on stock. Practically, | they'll run out like everyone else from time to time. If I were making a buyapi order, I'd certainly throw in a splitter. Just on spec. What prompted me to look at this is the description of the "TinyPilot" KVM project. <https://tinypilotkvm.com/> <https://www.servethehome.com/tinypilot-voyager-kvm-raspberry-pi-remote/> This is a Raspberry Pi 4 + extras that acts as another computer's Keyboard, Video, an Mouse. It can be accessed via ethernet. Not cheap enough for me. Their magic sauce is software (there is an open source subset), a splitter for the USB C power-in (like above, but US$35), and an HDMI capture circuit (AliExpress dongle for less that $20 should work). According to STH, the obvious competitor is the Lantronix Spider. The cheapest, used, on ebay is over $200 and may not have the features I'd like. I actually use 4-port UltraHD KVMs that I got for about $100 (in other words, $25/computer). They fulfill my needs at a lower cost. Maybe a Pi Zero solution could cost about that. The HDMI capture dongles are diverse and mysterious to me. AliExpress's descriptions are unreliable. For example, the first item in their list was emblazoned with "4K" but the specs said 1080p was the max resolution. Any recommendations? - I think FullHD is fine. - USB 3.0 might be an advantage: higher bandwidth possible - "driverless" would be nice. I think that that means it looks like a USB video camera the software. AliExpress is an adventure. I would not bother if I actually had a serious or urgent need.

On Mon, May 10, 2021 at 03:29:11PM -0400, D. Hugh Redelmeier via talk wrote:
It's hard to find general-purpose computers that can be USB clients, rather that hosts. This mode is called "gadget".
You can do this with a Raspberry Pi Zero.
You can also do it with a Pi 4!
It turns out that the Pi 4's power connector is also a USB 2.0 port. To conveniently access it, you can use one of these:
<https://www.buyapi.ca/product/usb-c-pwr-splitter/> (There's a different splitter that might be aimed at the Pi Zero)
Why you cannot do this with other models of Pi: The Broadcom chip has one USB port. It is fed to a USB hub, and that's exposed on the connectors. A USB hub cannot provide Gadget ports.
On the Pi 4, the Broadcom's USB port is connected to the power input, with no hub in the way.
| From: Stewart C. Russell via talk <talk@gtalug.org>
| Buyapi (in Nepean) and Canakit are Canadian official | resellers, so are supposed to get priority on stock. Practically, | they'll run out like everyone else from time to time.
If I were making a buyapi order, I'd certainly throw in a splitter. Just on spec.
What prompted me to look at this is the description of the "TinyPilot" KVM project.
<https://tinypilotkvm.com/> <https://www.servethehome.com/tinypilot-voyager-kvm-raspberry-pi-remote/>
This is a Raspberry Pi 4 + extras that acts as another computer's Keyboard, Video, an Mouse. It can be accessed via ethernet. Not cheap enough for me.
Their magic sauce is software (there is an open source subset), a splitter for the USB C power-in (like above, but US$35), and an HDMI capture circuit (AliExpress dongle for less that $20 should work).
According to STH, the obvious competitor is the Lantronix Spider. The cheapest, used, on ebay is over $200 and may not have the features I'd like.
I actually use 4-port UltraHD KVMs that I got for about $100 (in other words, $25/computer). They fulfill my needs at a lower cost. Maybe a Pi Zero solution could cost about that.
The HDMI capture dongles are diverse and mysterious to me. AliExpress's descriptions are unreliable. For example, the first item in their list was emblazoned with "4K" but the specs said 1080p was the max resolution. Any recommendations?
- I think FullHD is fine.
- USB 3.0 might be an advantage: higher bandwidth possible
- "driverless" would be nice. I think that that means it looks like a USB video camera the software.
AliExpress is an adventure. I would not bother if I actually had a serious or urgent need.
Pretty sure the beaglebone can do usb gadget mode. In fact I think it has to since I believe that is how it implements the serial console as well as storage and networking if desired. Doing video, not sure. I am pretty sure I once saw an HDMI switch that attached to a raspberry pi to control it, but I can't seem to find it. -- Len Sorensen

On 2021-05-10 3:29 p.m., D. Hugh Redelmeier via talk wrote:
<https://www.buyapi.ca/product/usb-c-pwr-splitter/> (There's a different splitter that might be aimed at the Pi Zero)
Ah, I see this is from 8086 Consultancy, who are known for their compellingly weird products. Like this, for instance: Cluster HAT — https://www.buyapi.ca/product/cluster-hat-v2-4/ What it does is add 4 Raspberry Pi Zeroes (W/WH, etc) as a cluster on top of another Raspberry Pi. The cluster networking is done via USB gadget mode. Useful? Uh ... maybe. It's certainly smaller than any Vax cluster ever was. Stewart
participants (4)
-
D. Hugh Redelmeier
-
James Knott
-
lsorense@csclub.uwaterloo.ca
-
Stewart C. Russell