Further configuration of the Raspberry Pi will take place over the network using SSH, not the keyboard and mouse. You also don't have access to the serial console so you can only use ssh or logging in over HDMI + Keyboard.
As you can probably figure by now, we have an in-depth SSH tutorial. In summary:
- The SSH server should already be enabled on the Raspberry Pi — this was done during the initial raspi-config setup.
- On Mac or Linux systems, you can use a Terminal or xterm window.
- For Windows systems, you can download PuTTY.
The terminal command to access the system would be either:
(If you changed the hostname in raspi-config, use that instead, e.g. iotp.local)
Or — if your computer can’t resolve the “.local” address — try the numeric IP address that you can get from your pi by typing in hostname -I
(Substitute the numeric IP address actually reported by the system during boot.)
You’ll be prompted for a password — either use the password that you set up from raspi-config, or “raspberry” if you left the default. Additionally, the first time connecting you may be prompted regarding a host key for security…enter Y (or click Yes) when prompted.
Once logged in, type the following at the command prompt (if logged in through ssh, you can copy-and-paste from this browser window to the terminal):
sudo apt-get update sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python-serial python-pil python-unidecode
The “update” step refreshes the list of available software packages and takes a couple of minutes.
The “install” step downloads and installs a number of packages…this may take 20 minutes or so.
The printer does not need to be connected yet. We can prepare the system the same regardless.
cd ~ git clone https://github.com/adafruit/zj-58 cd zj-58 make sudo ./install
Your thermal printer may have arrived with a test page in the box or the paper bay. If not, or if you threw that away, you can generate a new one by installing a roll of paper and holding the feed button while connecting power.
Look for the baud rate that’s printed near the bottom of the page. This is typically either 9600 or 19200 baud. This is important…you’ll need to know the correct value for your printer.
You can recreate the test page by holding down the feed button and then powering the printer.
To set up this printer as the system default, we’ll be typing two lines similar to the following (but not necessarily identical…read on)…
sudo lpadmin -p ZJ-58 -E -v serial:/dev/serial0?baud=19200 -m zjiang/ZJ-58.ppd sudo lpoptions -d ZJ-58
On the first line, change the “baud” value to 9600 or 19200 as required for your printer. The rest of the line should be typed exactly as it appears above. Likewise for the second line, which needs no changes.
Shut down the system. We'll work on the case and wiring next, then return to the final software configuration later.
sudo shutdown -h now
After about 30 seconds, you can disconnect the USB power cable.
Remove the SD card and WiFi adapter, and get your soldering iron ready…
Text editor powered by tinymce.