This is HOWTO for building a wireless print server for a AxiDraw v3 pen plotter.
- Raspberry Pi Zero W system board
- Power Supply
- Micro-USB to USB OTG adapter; connect the pen plotter's USB cable
- MicroSD card; minimum 8GB
- (optional) Case
-
Download latest Raspbian Jessie ISO image
-
Write the ISO onto the MicroSD card
-
Configure the Raspberry Pi boot image to connect to your wireless network by creating a new text file named
wpa_supplicant.conf
in the/boot
folder of the MicroSD card. Its contents should look something like this:
network={
ssid="YourNetworkSSID"
psk="Your Network's Passphrase"
key_mgmt=WPA-PSK
}
- Enable SSH access by creating an empty file named
ssh
in the/boot
folder of the MicroSD card
(These steps are Mac OS)
touch /Volumes/boot/ssh
-
Unmount the MicroSD card and insert it into the Raspberry Pi
-
Connect the Raspberry Pi to a power supply
-
Find out the IP address of the Raspberry Pi. One way is to look at your WiFi access point to find the IP address of a device named "raspberrypi". Another way is to connect the Raspberry Pi to an HDMI display, keyboard and mouse and use the Pixel GUI to find out its IP address.
-
Copy your SSH key to the Raspberry Pi
brew install ssh-copy-id
ssh-copy-id pi@<ip_address>
- Test the SSH login. You should not be prompted for the password.
ssh pi@<ip_address>
exit # from the SSH
These steps will finish the software installation onto the MicroSD now inserted in the Raspberry Pi.
- Clone this github repo
cd <work_dir>
git clone [email protected]:tjotala/weyland.git
cd weyland
- Install bundler
gem install bundler
- Install all the required gems
cd <work_dir>/weyland
bundle install
- Configure deployment to the target Raspberry Pi
nano config/deploy/staging.rb
# change IP address to match
- Prepare the Raspberry Pi for deployment (only needs to be done once)
cap staging deploy:prepare
- Deploy the code to the Raspberry Pi
cap staging deploy
-
Try the web UI by opening a browser window at
http://<ip_address>:4242
-
Read the web API documentation
public/weyland.conf
with Swagger Editor: https://editor.swagger.io/
These steps will let you run the software on a Mac OS X machine.
- Install nginx
brew install nginx
- Launch nginx (note this will not make it auto-launch at startup)
sudo nginx -c `pwd`/config/nginx.conf
- Launch the print server
./bin/run_local.sh