💾 Archived View for colincogle.name › blog › unifi-cloud-key-rescue captured on 2024-05-10 at 10:49:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-26)

-=-=-=-=-=-=-

"Rescuing a UniFi Cloud Key Gen2 Plus"

by Colin Cogle

Published Monday, October 17, 2022.

Abstract

A non-working eBay item gets saved from the scrap heap, and I get a cheap upgrade.

Introduction

When I found a non-working UniFi Cloud Key Gen2 Plus on eBay for 99 cents, I decided, "why not?" (This was before I heard that UniFi Network App 7.3 will drop support for the now-vintage first-generation Cloud Key.)

Source: Release notes for UniFi Network App 7.3.69

The Cloud Key Gen2 would be sitting inside a closet, so I wasn't too concerned that this thing had been physically damaged, cracked and dented, and sold without the internal hard drive. Fortunately, it arrived and looked better than I expected.

Image: My damaged and unbootable UniFi Cloud Key Gen2 Plus. It looks fine from this angle, but there is cosmetic damage around the rear USB-C power port.

Disassembly

To start, remove the back plastic. It's glued on, so use a spudger or guitar pick to break the adhesive. Once you've gotten that off, there are seven Phillips-head screws underneath to remove.

Image: Removing the black plastic back.

Image: The black plastic removed, showing the screws we need to remove.

To continue disassembly, we will need to remove the hard drive and the latch itself. Slide the latch over to remove the hard drive and the tray. Then, use the end of a flat-head screwdriver or metal spudger, gently press on one of the tabs to pop it loose. Hold the metal slider in position, then carefully remove the plastic tab.

Image: The hard drive bay and latching mechanism.

Image: The hard drive latch removed.

Now, we need to remove two screws underneath the screen. The screen is held on by adhesive, like everything else these days. Use a spudger or plastic opening tool to carefully pry it up. Note that there is an unremovable ribbon cable on the bottom edge. Take care not to sever it. (Ubiquiti does not sell spare parts. I've tried.)

Image: Breaking the screen adhesive.

Image: The display removed, dangling by the ribbon cable.

Next, the 13-pin connector for the Cloud Key Gen2 Rack Mount Accessory needs to be removed. There are four latches on the underside to make sure that it sits flush. This also means that removing it is next to impossible. You can try to carefully pry it up, but I had luck pushing it up from underneath. If you try that, be sure to push up on the plastic, and not on the wires themselves!

Once you have all four tabs disengaged, unplug the connector. Be sure to mark it, or remember which way it goes so you can reassemble it later.

Image: Removing the 13-pin rackmount port assembly.

Finally, the entire plastic unit can be slid out of the aluminum housing. Normally, this will not be a problem. However, these batteries do seem to be defective, because they tend to swell up and fail, so I hear—and now, so I see firsthand.

Image: The internal battery (swollen and failed), in place.

If your battery is bad, let's grab a plastic, non-conductive tool and gently break the adhesive holding it to the plastic tray.

Ubiquiti does not sell replacement batteries, instead asking you to spend $200 on a new Cloud Key. They also refused to issue an RMA for this spicy pillow, so into the e-waste bin this little fire hazard goes. Ubiquiti gave up on trying to fix the problem, instead removing the battery entirely from the latest revision of the Cloud Key Gen2 Plus:

=> https://community.ui.com/questions/Could-Key-Gen-2-Battery-DOA/7ccd440a-761f-40c4-8aea-1275f235639c#answer/8cbd5ae6-dca8-4235-8a09-84b78874f40d Source: UI-Glenn's comment in the Ubiquiti Community.

Image: The internal battery (swollen and failed), removed from the unit.

The Cloud Key is now fully disassembled. If you were reading this to remove the battery, congratulations! You're done. Reverse these steps to put this back together (hopefully with a working battery).

Unflashable Firmware?

In my case, this Cloud Key wouldn't boot. I booted it up in recovery mode and attempted to re-flash the firmware, but it refused to accept any firmware image; it refused to accept an image of the same version, 2.0.27, but it also refused to accept newer and older versions, too.

Since I already had this thing apart, I hooked up my 3.3V TTL serial adapter to the three-pin header located at port J22.

The internal serial port (J22, circled) inside the UniFi Cloud Key Gen2 Plus.

After getting the pinout right, I was greeted with a serial console!

Please press Enter to activate this console. 

Boottime: 4.52s

cloudkey-apq8053 login: ubnt
Password: 
Login incorrect
cloudkey-apq8053 login: root
Password: 
				.--.__
	______ __ .--(    ) )-.   __ __
	|      |  (._____.__.___)_|  |  |__ _____ __ __
	|   ---|  ||  _  |  |  |  _  |    <|  -__|  |  |
	|______|__||_____|_____|_____|__|__|_____|___  |
		(c) 2018 Ubiquiti Networks, Inc.  |_____|

		Welcome to the CloudKey Recovery!

Fortunately, the default usernames (ubnt and root) and password (ubnt) are well-known:

=> https://help.ui.com/hc/en-us/articles/204909374-UniFi-Login-with-SSH-Advanced- Source: Ubiquiti's list of default usernames and passwords.

Once I logged in, I began to browse the recovery filesystem. I checked the boot messages and `dmesg` output, but found nothing of interest.

Extra: the boot messages and `dmesg` output, if you're curious.

However, I found an app in the filesystem called `ubnt-tool`, which has a mode called `fwupdate`. I figured it'd be worth a shot. I grabbed the URL of the latest firmware blob, downloaded it to the device, and installed it.

=> https://www.ui.com/download/unifi/unifi-cloud-key-gen2/uck-g2-plus Ubiquiti Downloads

cloudkey-apq8053# cd /tmp
cloudkey-apq8053# wget https://fw-download.ubnt.com/data/unifi-cloudkey/6fac-UCKP-2.5.11-c5a57cf5d5344114a762782ab4d3a940.bin
cloudkey-apq8053# ubnt-tool fwupdate 6fac-UCKP-2.5.11-c5a57cf5d5344114a762782ab4d3a940.bin

There were a lot of unchanged blocks for being so many years behind on firmware updates, but one `reboot` later, my Cloud Key was back up and running!

=================================================================

Previous Blog: "SSHFP Records on Windows Server"

=================================================================

"Rescuing a UniFi Cloud Key Gen2 Plus" by Colin Cogle is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA).

https://creativecommons.org/licenses/by-sa/4.0/