from the previous version I have copied some bits off to reuse.
Basically to do with starting the subscriber.
----------------------------------------------------------
Fing shows RPi at 192.168.1.26
Had to change keygen, but then able to login via ssh.
sudo raspi-config to expand filessystem, and reboot.
https://raspberrytips.com/access-point-setup-raspberry-pi/
**sudo apt update,
**sudo apt-get install firmware-zd1211.
**and nmtui to configure Ethernet IP and Wifi
Ethernet 192.168.1.9/ 24 GW=192.168.1.1 ???
** Wifi rc-car Ashmeads Access Point 192.168.4.1/24 GW 192.168.4.254
Some of the commands I will need after re-initialising
/home/peterm/mqtt/subscriber.py
added in sudo nano /lib/systemd/system/subscriber.service
sudo apt-get install python3-pip
sudo apt install python3-paho-mqtt
Rebooted, and systemctl status for mosquitto and Subscriber.service showed both running.
sudo systemctl enable mosquitto started Mosquitto.
Tried to connect via WiFi with controller, Eventually it said "Attempting MQTT'
but nothing happened.
How do I tell if AP mode is done and DHCP is set?
https://raspberrytips.com/access-point-setup-raspberry-pi/ This looks pretty good. I shall run through it as If I hadn't already tried.
Set country GB
sudo nmcli con add con-name hotspot ifname wlan0 type wifi ssid "rc-car"
sudo nmcli con modify hotspot wifi-sec.key-mgmt wpa-psk
sudo nmcli con modify hotspot wifi-sec.psk "Ashmeads"
[Unit]
Description=MQTT Subscription Service
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/mqtt/subscription.py
[Install]
WantedBy=multi-user.target
showed that it failed because it could not find the file name. I had the wrong path, so I simplified it to /home/peterm/mqtt.'files' and then edited the subscriber.service file.
Loaded: loaded (/lib/systemd/system/subscriber.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2025-06-29 16:00:21 BST; 6s ago
Duration: 2.839s
Process: 1004 ExecStart=/usr/bin/python3 /home/peterm/mqtt/subscriber.py (code=exited, status=1/FAILURE)
Main PID: 1004 (code=exited, status=1/FAILURE)
CPU: 2.604s
Jun 29 16:00:20 raspberrypi python3[1004]: import RPi.GPIO as GPIO
Jun 29 16:00:20 raspberrypi python3[1004]: File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 927, in <module>
Jun 29 16:00:20 raspberrypi python3[1004]: RPI_INFO = _get_rpi_info()
Jun 29 16:00:20 raspberrypi python3[1004]: ^^^^^^^^^^^^^^^
Jun 29 16:00:20 raspberrypi python3[1004]: File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 428, in _get_rpi_info
Jun 29 16:00:20 raspberrypi python3[1004]: raise NotImplementedError(
Jun 29 16:00:20 raspberrypi python3[1004]: NotImplementedError: This module does not understand old-style revision codes
Jun 29 16:00:21 raspberrypi systemd[1]: subscriber.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 16:00:21 raspberrypi systemd[1]: subscriber.service: Failed with result 'exit-code'.
Jun 29 16:00:21 raspberrypi systemd[1]: subscriber.service: Consumed 2.604s CPU time.
~
× subscriber.service - MQTT Subscription Service
Loaded: loaded (/lib/systemd/system/subscriber.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2025-07-16 21:12:58 BST; 3min 55s ago
Duration: 1d 19h 12min 10.815s
Main PID: 375 (code=exited, status=1/FAILURE)
CPU: 2.463s
Jul 16 21:12:57 raspberrypi python3[375]: return socket.create_connection(addr, timeout=self._>
Jul 16 21:12:57 raspberrypi python3[375]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>
Jul 16 21:12:57 raspberrypi python3[375]: File "/usr/lib/python3.11/socket.py", line 851, in cre>
Jul 16 21:12:57 raspberrypi python3[375]: raise exceptions[0]
Jul 16 21:12:57 raspberrypi python3[375]: File "/usr/lib/python3.11/socket.py", line 836, in cre>
Jul 16 21:12:57 raspberrypi python3[375]: sock.connect(sa)
Jul 16 21:12:57 raspberrypi python3[375]: TimeoutError: timed out
Jul 16 21:12:58 raspberrypi systemd[1]: subscriber.service: Main process exited, code=exited, stat>
Jul 16 21:12:58 raspberrypi systemd[1]: subscriber.service: Failed with result 'exit-code'.
Jul 16 21:12:58 raspberrypi systemd[1]: subscriber.service: Consumed 2.463s CPU time.