Install Canon EOS Utility 2.x

I purchased a Canon EOS 500D DSLR in 2010 as a reward to myself for graduating from university and being employed in my first full-time graduate engineering role.

Fourteen years later, I have taken the next step to upgrading my camera technology.

However I am curious what the shutter count is on the 500D. There are websites that read the shutter count from a photo taken with the camera, however it seems that the 500D does not embed this information into the images that it takes.

So how do I get the shutter count, through the Canon EOS Utility. However the only version I can download is an updater, and when I run the updater it says that it requires the original install files. However I was not able to locate the necessary install file.

One fairly quick Google search had a solution that seemed very plausible. Add something to the Windows Registry, and the EOS Utility updater becomes a full install.

To create a new install of the EOS Utility 2.x, run the following from the the command line as an Administrator.

REG ADD "HKLM\SOFTWARE\WOW6432Node\Canon\EOS Utility"

Afterwards run the EOS Utility updater and it will treat the file as the original install files.

Legacy Keyring Deprecated

In the process of setting up a new Raspberry Pi router, I discovered that I had a repository key stored in the wrong location on PiOS Bookworm.

The key is stored in an old location that has since been updated, however it is flagged as an issue when updating software through Apt.

Identifying the Error

After running the following:

sudo apt update

I received the following line saying that a key was deprecated.

41 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://raspbian.raspberrypi.com/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

The updating of software will still continue, but everytime I run the update command, I received the error.

Digging around the internet archives and numerous websites, I came across the following solution. While this isn’t my solution, I’m sharing here for when I need the solution in the future.

What is the problem?

Keys were previously stored in:

/etc/apt/trusted.gpg

They are now stored in:

/etc/apt/trusted.gpg.d/

In Bookworm, most of the keys have been migrated to the new location, however one key seems to remain in the old location.

Steps to Solve

Since the old location is only deprecated, it is still checked when running any of the apt commands. So we need to move the key to the new location, however if we simply copy it to the new location, then remove the key, both keys will be removed and we will be further behind than where we are.

Step One

We need to list the key so we know which one to copy.

sudo apt-key list | grep -A4 "trusted.gpg$"

you will receive something similar to the following:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa2048 2012-04-01 [SC]
      A0DA 38D0 D76E 8B5D 6388  7281 6591 938D FD90 EE2D
uid           [ unknown] Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <mpthompson@gmail.com>

We need to note down the last 8 hexadecimal characters of the key (in this instance FD90EE2D) for use in the next couple of commands.

Step Two

We copy the key to a temporary location to let us remove the original using appropriate commands.

sudo apt-key export FD90EE2D | sudo gpg --dearmor -o /tmp/raspi.gpg

Double check that the key has been copied:

file /tmp/raspi.gpg 

You should receive something similar to the following. If not, double check you typed the last 8 characters of the key correctly. I made this mistake first time. It is relatively easy to do if you type it out.

/tmp/raspi.gpg: OpenPGP Public Key Version 4, Created Sun Apr 1 21:02:33 2012, RSA (Encrypt or Sign, 2048 bits); User ID; Signature; OpenPGP Certificate

Now delete the old key:

sudo apt-key del FD90EE2D

Step Three

The third and final step is to move the exported key into the correct location.

sudo mv /tmp/raspi.gpg /etc/apt/trusted.gpg.d/

That’s all folks

Once you have completed all the above steps, I run the ”’apt update”’ command again to check that the key has been moved, and I am no longer reciving the ”’DEPRECATED”’ comments.

You should been good to go.

Install Driver for TP-Link TL-WN823N on Raspberry Pi OS

I’m looking to create a WiFi hotspot for when we travel. My current idea is to create a WiFi router using a Raspberry Pi as a bridge between our devices (Laptops, Phones, iPads, etc.) and the accomodation’s WiFi (especially where they have captive portals with number of device limitations).

I have a spare Raspberry Pi 2 V1.1 lying around at home, and looking to utilise that going forward. Clearly the RPi 2 does not have onboard WiFi, so a pair of USB dongles is required. However the number of dongles is broad and varied, and driver compatibility can be somewhat limited, finding suitable devices can be a challenge. Hence my search for a suitable dongle.

I have downloaded the latest version of Raspberry Pi OS, and updated with the following:

sudo apt update
sudo apt upgrade 

At the time of writing this article, RPi OS was reporting it was using version 6.1.24-v7+ of the Linux kernel.

The WiFi dongle that I purchased is a TP-Link TL-WN823N wireless USB adapter. I purchased it from Officeworks here in Australia.

The TL-WN823N wireless adapter is based on the RealTek rtl8192eu drivers. These are not present within the Linux kernel at present to my knowledge, and I had to compile them to get the dongle recognised by the operating system.

My first port of call was Google. There are clearly numerous sources, however they all point back to one main source of knowledge, a blog post from Junaid’s Blog.

My first attempt at the following the steps from Junaid’s Blog resulted in an install that was recognised, but I could not get a working connection. Junaid’s Blog points to a rtl8192eu linux driver that allegedly works with the kernel up to version 4.9.35. Clearly I am beyond that running version 6.1.24.

I thought I was shit out of luck at that point. However I did some further digging on a number of forums and found something a little more recent.

My searching directed me towards a Github repository containing a more recent rtl8192eu driver that works with the Linux Kernel up to version 6.4.

Now I followed the following steps to get the driver up and running, and actually working.

sudo apt install linux-headers-generic build-essential dkms git
cd ~
mkdir drivers && cd drivers
git clone https://github.com/clnhub/rtl8192eu-linux.git 
cd rtl8192eu-linux

Inside this folder is the file Makefile, we need to edit the contents of this for Raspberry Pi. We need to find the following line:

CONFIG_PLATFORM_I386_PC = y

and change it to

CONFIG_PLATFORM_I386_PC = n

Then find this line

CONFIG_PLATFORM_ARM_RPI = n

and change it to

CONFIG_PLATFORM_ARM_RPI = y

Now the easiest option from here is to run the included shell script file which does all the hard work for us. Run the following command:

./install-wifi.sh

Let the Raspberry Pi do its thing for a few minutes, and Hey Presto! you now have a working TL-WN823N USB dongle that can connect to any IEEE 802.11b/g/n network.

I am yet to test whether I can run a WiFi hotspot from it, and I am yet to install Pi-Hole as a local Domain Name Server to maintain some control over the kids and their devices, but they are the next steps in putting together a WiFi router for when we are travelling.