Installing OpenAPS on RPI Zero W

 

4/1/2020

OpenAPS Docs:

Skipover the PI Bakery stuff - apparently obsolete!

https://openaps.readthedocs.io/en/latest/docs/Build%20Your%20Rig/pi-install.html

1. Flash SD card with Raspbian Buster Lite
https://www.raspberrypi.org/downloads/raspbian/

2. create file called: wpa_supplicant.conf file on card at root directory to point to my wifi access point

Put this into the file:

Use Notepad++ and under Edit, EOL, set to Unix then save to card.

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="MyWirelessNetwork"
psk="MyWirelessPassword"
}

3. Create empty file on flash card at root directory called "ssh"

4. Put card into RPI and power it up.

5. Used Google Play Android "Network Utilities" app and "IP Discover" function to find the IP of the Raspberry Pi on the

WIFI router.

6. Now I can SSH into the RPI with Putty and the IP address at port 22.

7. Could not get my Win7 32 bit PC to recognize the RPI with Putty SSH using raspberrypi.local ! \
Installed Apples Bonjour service.
https://support.apple.com/kb/DL999?locale=en_US
It works after a reboot of the PC!
Now I can get to the raspberry pi using raspberrypi.local instead of an IP address on port 22 via Putty via wifi!
Apparently this is not needed with a Windows 10 PC.

8. Getting access via the USB comm port --- THIS IS GOOD - as it works!
https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget

Reference this as well!
https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget

After a few repowers on the RPI zero it found the UART interface and loaded up and linked to the Windows 7 PC and

advertised a Gadget Serial v2.4 interface as shown in the Windows Device view.

Apparently Windows 10 has this driver available already - not so for Win 7.
Can get it here!
https://wtiknows.com/2018/04/23/windows-7-and-usb-gadget-2-4/

Note: Reboots on the RPI Zero are NOT the same as power off - ons!

_____________________________
Also, a very good quick start for RP Zero W:
https://cdn-learn.adafruit.com/downloads/pdf/raspberry-pi-zero-creation.pdf

Also Reference!
https://github.com/ct-Open-Source/tuya-convert/wiki/Using-Only-a-Stock-Raspberry-Pi-ZeroW-and-USB-Cable
_________________________

9. I then ran the install script from the Open APS page, to install master:

https://openaps.readthedocs.io/en/latest/docs/Build%20Your%20Rig/pi-install.html#run-openaps-install-sh

new host name: rpi1
new password: rpi
user is still: pi

And then I got this error:

>>>
Collecting mock (from openaps)
Downloading https://www.piwheels.org/simple/mock/mock-4.0.0-py2.py3-none-any.whl
mock requires Python '>=3.6' but the running Python is 2.7.16
Couldn't install openaps toolkit
root@raspberrypi:/home/pi#
<<<

10. I then ran these four commands, one at a time.

pip install -U pip
pip install --upgrade setuptools
pip install mock==3.0.5
pip install gitdb2==2.0.6

I then re-ran the script and the installation ran to completion.