Wednesday, 5 June 2024

How to get the UCTRONICS OLED working on your Raspberry Pi rack mounts.

Step 1. "sudo raspi-config" then choose Interface Options and Enable "i2c"

Step 2. git clone https://github.com/UCTRONICS/U6143_ssd1306.git

Step 3. cd U6143_ssd1306/C

Step 4. sudo make clean && sudo make

Step 5. sudo ./display

Step 6. Next 2 steps are to ensure this runs at start up every time. If you skip these then it will look like the display is working after a reboot but the second line will be stuck on one stat (mine was stuck on Mem for example) 

 "sudo nano /etc/rc.local" 

Step 7. Add the following below fi: 

cd /home/pi/U6143_ssd1306/C

sudo make clean

sudo make

sudo ./display &


(https://github.com/UCTRONICS/U6143_ssd1306) 

Tuesday, 4 June 2024

Flash image using Balena Etcher

 What a pain! PITA!

Got there in the end. This was me trying to flash a Raspberry Pi Lite image to a Samsung Pro Plus Micro SD card via an Orico USB to SD card adaptor. Brand new card and brand new adaptor as my old one was reading incorrect sizes on old SD cards.

Step 1. Disable Protected folder access in Windows Security settings. It was not enough for me to add a program-specific exception to the list. (Remember to turn this back on when finished!)

    

Step 2. If you have a half-baked failed etch written to your SD card, open up disk manager (start\run "diskmgmt.msc" and delete any partitions that are there - 

    
This might have been the crucial step?

Step 3. Reboot your machine. Not sure if this helped or not but my machine locked up completely and after I powered it down and back on again (and followed the previous 2 steps) I got a working etch so who knows!?



Step 4. Change your USB port to a decent one. I was using one on the top of my case. Not sure if that one was 1,2 or 3 but I didnt trust it so I used a blue USB 2.0 port on the back of the case, directly attached to the Motherboard, and this might have also helped. (this was actually what caused my PC to lock up and need a reboot in step 3 above... Worried I might have some dicky hardware now!?!)

Step 5. Turn Windows Protected Folder access back to "on". You need this! I need this. Everyone needs this!



Certutil - Built-in Windows utility to calculate file hashes

Run command C:\> certUtil -hashfile <PATH_TO_FILE> <HASH_ALGORITHM>


e.g.

 C:\Users\[user]>certutil -hashfile "c:\Users\[user]\Desktop\2024-03-15-raspios-bookworm-armhf-lite.img.xz" sha256

SHA256 hash of c:\Users\[user]\Desktop\2024-03-15-raspios-bookworm-armhf-lite.img.xz:

4fa99737265ac338a9ed0643f502246b97b928e5dfffa92939242e26e290638d

Monday, 3 June 2024

How to remove Hyper V boot "Files" from the Boot order (under "Firmware" menu in Settings)

(Courtesy of https://sandyzeng.com/hyper-v-remove-firmware-file-bootmgfw-efi/) 


Here is the simple way delete all the bootmgfw.efi file at once. Use powershell.

$VMName = "Your virtual machine name"
Get-VMFirmware -VMName $VMName |ForEach-Object {Set-VMFirmware -BootOrder ($_.Bootorder | Where-Object {$_.BootType -ne 'File'}) $_ }