Tuesday, October 17, 2023

Raspberry Pi Collection

cat /sys/firmware/devicetree/base/model
  1. Raspberry Pi Model B Rev 2
  2. Raspberry Pi 2 Model B Rev 1.1
  3. Raspberry Pi 3 Model B Rev 1.2
  4. Raspberry Pi Model A Plus Rev 1.1
  5. Raspberry Pi Zero Rev 1.2
  6. Raspberry Pi Zero W Rev 1.1
  7. Raspberry Pi Zero W Rev 1.1

https://en.wikipedia.org/wiki/Raspberry_Pi

https://www.raspberrypi.com/products/

Saturday, December 24, 2022

Downloading iPhone Photos...

There appear to be three main ways:

Adobe Photoshop

  • Can be downloaded into sub-folders by date, but these are incorrect
  • Live photos are downloaded as a jpeg and 2 second .mov file with the same root name (e.g. IMG_6920.JPG/ IMG_6920.MOV)
  • Edited photos are downloaded as the original (e.g. IMG_8372.JPG), and an edited version (e.g. IMG_E8372.JPG)
  • Instagram photos are downloaded with a 8 char UID, e.g. CHSP3732.JPG

Download from iCloud

  • Downloaded as a zip file extracting to a single folder
  • Live photos are downloaded as a jpeg and 2 second .mov file with the same root name
  • Edited Photos are downloaded as the edited version only, with a .JPEG extension (rather than the usual .JPG)
  • Instagram photos are downloaded with a UUID name (e.g. 5815967B-18C8-4CB8-8550-B7C2147F7187.jpg)

Copy from DCIM directory

  • Stored in directories according to month, e.g. 202110_
  • Live photos are downloaded as a jpeg and 2 second .mov file with the same root name
  • Edited photos are downloaded as the original (e.g. IMG_8372.JPG), an edited version (e.g. IMG_E8372.JPG), and the AAE metadata (e.g. IMG_8372.AAE)
  • Instagram photos are downloaded with a 8 char UID, e.g. CHSP3732.JPG

In short, using Photoshop is probably the best way to download images from an iPhone, although they must be on the device, not stored on iCloud with smaller versions downloaded kept on the phone...

Sunday, November 06, 2022

Raspberry Pi Gadget Mode

 As the USB to UART doesn't appear to work with Windows 11, an alternative is to connect the RPi direct to the laptop. A tutorial on how to do this can be found here.

Sunday, September 11, 2022

Installing Android apps on a Kindle

There are instructions on how to install Google Play on oa Kndle at howtogeek.com.

However, it is also possible to simply download the APK file from apkmirror.com.

It is easiest to copy the .apk file to a micro SD card to transfer it to the kindle. The app is installed through simply selecting it in the Files app on the kindle.

Saturday, January 01, 2022

Git Remote Repositories

To manage remote repositories in Git:

# to view current remotes
git remote -v

# to update the URL
git remote set-url 

Saturday, December 18, 2021

SSH Lag on RPi...

On a new install, there was a strange lag in SSH, where it would repeatedly freeze...

The solution appears to be to update /etc/ssh/sshd_config to set:

   ClientAliveInterval 60
   ClientAliveCountMax 10

and or in /etc/ssh/ssh_config:
   ServerAliveInterval 60
   ServerAliveCountMax 10

The server is the host that receives the connection...

These are taken from here...

Sunday, March 21, 2021

Pi4j Releases

Note that Pi4j v1.4 relies on Java 11, whcih will cause issues with older models of Raspberry Pis.

Therefore, mosly best to stick to v1.3, and disable the repo in /etc/apt/sources.list.d/pi4j.list

Pi4j v2.0 is next..

Saturday, March 20, 2021

VS Code and Raspberry Pi Zero WH

VS Code Remote Development is fantastic, but it doesn't support the Raspberry Pi Zero as the armv6l isn't supported.

However, this it is possible to mount /home/pi as a Samba share and amend files locally, which will perform similarly (for Python development anyway).

This is described here. Install Samba with:

sudo apt install -y samba

Then add the following to /etc/samba/smb.conf as follows:

[PiShare]
 comment=Pi Share
 path=/home/pi
 browseable=yes
 writeable=yes
 only guest=no
 create mask=0740
 directory mask=0750
 public=no

Note that the Samba configuration file can be checked with the testparm command.

Finally, set a password with sudo smbpasswd -a pi. This will create the Samba user pi.

This can be accessed from another computer on the network as \\hostname\share

Friday, February 05, 2021

Raspberry Pi Package Management

APT (Advanced Packaging Tool) is a set of tools that was developed for Debian Linux platform as an easy command line interface for the dpkg utility

apt update
apt upgrade
apt install python3
apt install ./pi4j-1.3.deb # install local package
apt show python3
apt remove python3
apt list # lists all available packages
apt list --installed # lists installed packages
apt list python3 # also shows if package is installed
apt search python3

# list all files contained in the package
dpkg -L python3

# find which package contains a file
dpkg -S /usr/bin/python3

Sunday, January 31, 2021

Configuring a Headless RPi

  • Install the OS Using the Raspberry Pi Imager.
  • Mount the SD card again in the Windows environment
  • To enable SSH, create an empty file named 'ssh' in the root of the SD card
  • To configure WiFi, create the wpa_supplicant.conf file in the root of the SD card
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=GB
    
    network={
            ssid="ssid"
            psk="psk"
    }
    
  • Boot the RPi with the card and run raspi-config to set hostname, interfaces etc.
  • Install Java with:
    sudo apt install default-jdk
      
    # or for older RPi mmodels
    sudo apt install openjdk-8-jdk liblog4j2-java wiringpi libmysql-java
    

Edit: turns out these can now be set up with the Raspberry Pi Imager v1.6, which is a lot easier...