Initialization
- Use “Raspberry PI Imager” to install Rasbian onto the sd card
- Create a file called
sshat the root to start ssh for the next boot - Create a file called
wpa_supplicant.confat the root to set wifi password with the following contents: (Note: the pi zero w does not support 5ghz)ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=<Insert country code here, i.e. us> network={ ssid="<Name of your WiFi>" psk="<Password for your WiFi>" } - After turning on the pi, use the router to assign a permanent ip address
- When connecting to the pi for the first time, use
sudo raspi-configto enable ssh permanently, under the “Interfacing options”.
Note: Placing a new wpa_supplicant.conf will allow resetting the wifi to a new network. Still will need to assign a permanent ip address, and update below.
SSH connection
router reserved ip address: 192.168.1.70
user: pi
password: raspberry
Print server setup
Mostly taken from This post
sudo apt-get updatesudo apt-get upgradesudo apt-get install vimsudo apt-get install cupssudo rebootsudo vim /etc/cups/cupsd.confedit to read as follows by addingAllow @Local# Restrict access to the server… <Location /> Order allow,deny Allow @Local </Location> # Restrict access to the admin pages… <Location /admin> Order allow,deny Allow @Local </Location> # Restrict access to configuration files... <Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny Allow @Local </Location>sudo usermod -a -G lpadmin pisudo cupsctl --remote-anysudo /etc/init.d/cups restart- To enable printing from windows:
sudo apt-get install sambasudo vim /etc/samba/smb.conf- edit print section to
guest ok = yes - edit printer driver section to
read only = no
- edit print section to
sudo /etc/init.d/samba restart
- Add the printer to cups via the admin interface in a web browser
http://192.168.0.10:631, see post for details, remember printer name for next step. (Note: If the printer does not show in the list, drivers may be needed.)sudo apt-get install printer-driver-hpijs- download hl1250 from
https://www.openprinting.org/printer/Brother/Brother-HL-2240 - use that file as the PPD when adding the printer
lpadmin -p <printer name> -o usb-no-reattach-default=truesudo reboot
Print wirelessly
Now, the printer should show up in add printer lists on various platforms! On windows, it had to be added in system preferences. On mac, it just showed up in the printer list.