Skip to content

Commit

Permalink
Added a bunch of documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffeb3 committed Apr 7, 2018
1 parent 3c14bad commit 74b9d61
Show file tree
Hide file tree
Showing 12 changed files with 280 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# V1PI

Use your raspberry pi to control your V1Engineering machine.

Please, read the documentation here:

http://v1pi.readthedocs.io/en/latest/

Download:

https://github.com/jeffeb3/v1pi/releases

Documentation again, in case you were skimming :)

http://v1pi.readthedocs.io/en/latest/

Binary file added doc/img/cncjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/octoprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/v1pi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/windows_boot_partition.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/windows_dont_format.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/windows_open_with.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/windows_wpa_after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/windows_wpa_before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

#############
V1PI
#############

What is it?
===========

It's an image for a raspberry pi, where I've configured as much as possible to help you get started
quickly making things with your v1engineering.com machines.

.. image:: img/v1pi.png

Safety Notice
=============

Please be safe. CNC routers, even small ones, with tiny bits can make mistakes, and quickly end up
in a dangerous situation, causing a fire that can quickly grow to serious damage. Don't leave your
machine unattended. I am not responsible for anything you do, but I really don't want to hear about
any tragedies from someone using my software.

Set Up
======

Here are the short instructions:

* Flash the SD with the `image <https://github.com/jeffeb3/v1pi/releases>`_
* Edit the v1pi-wpa-supplicant.txt (not with notepad.exe)
* Put it in a pi, and go to `http://v1pi.local <http://v1pi.local>`_

The longer instructions, including auto wifi hotspot, and a bunch more detail are here:

:doc:`setup`


More Information
================

Enjoy! Check out some of octoprint's plugins, load up some gcode from your desktop computer, attach
a webcam, etc.

Be sure to look at the (much more detailed) documentation from OctoPi, OctoPrint, and CNC.js:

* OctoPi: https://octopi.octoprint.org/
* OctoPrint: https://octoprint.org/
* CNC.js: https://cnc.js.org/

131 changes: 131 additions & 0 deletions doc/setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@

######
Set Up
######

Let's Do It
===========

Great, let's flash an SD card with the image and get to making dust in the shop!

Step 1: Download the image
==========================

Download the most recent stable release from github: https://github.com/jeffeb3/v1pi/releases

Step 2: Copy the data to the SD card
====================================

The most general option is Etcher: `Get Etcher <https://etcher.io/>`_

More details: `Burn SD cards with Etcher <https://www.raspberrypi.org/magpi/pi-sd-etcher/>`_

Step 3: Configure WiFi (Optional)
=================================

If you don't want to connect this pi to your home WiFi network, then continue to the next step. If
you're not sure, or you want to connect to your home WiFi, look at :doc:`wifi-setup`. Then come right back.


Step 4: Start it for the first time
===================================

Safely remove your SD card, or call umount/sync on Linux, and put the card in the pi. Connect the
printer and power it up.

The first time the pi boots, it will do some work to expand the filesystem to the full SD card size,
and generally setting things up. This takes a few minutes.

If you are using the pi as a hotspot (it's not connected to your WiFi) then the WiFi network may not
show up on the first boot (I'm not sure why, but in my tests, it wasn't coming up the first time).
Wait a few minutes (literally 5 minutes is fine) and cycle power. Then wait a few more minutes
and it should show up.

Step 5: Connecting
==================

Connect to Hot Spot
-------------------

* The Hot Spot will show up with an ssid of ``v1pi`` and a connection password of ``raspberry``.
* Your computer might complain that you don't have an Internet connection. That's normal. The pi
doesn't have Internet.
* If you connect with this method, the pi's ip address is ``192.168.50.1``
* Open `http://192.168.50.1 <http://192.168.50.1>`_

Connect Through Your WiFi
-------------------------

* The pi will get it's IP address from your router. If you know how to find the IP address from your
router, then you can do that, and put ``http://<the ip address>`` in your browser's address bar.
* The pi will also advertise it's address via `http://v1pi.local <http://v1pi.local>`_

* Macs: Just go there.
* Linux (including other pi's): Install avahi-daemon, and then go there.
* Windows: Check out Adafruit's guide `Here <https://learn.adafruit.com/bonjour-zeroconf-networking-for-windows-and-linux/overview>`_
* Android: I haven't got a good way to do this from android, so I would ``ping v1pi.local`` from a
computer, and see what address it's pinging, and put that in my android address bar.

* As a last resort, you can connect a monitor and keyboard. The pi will boot up to a login prompt.
The prompt will print the different addresses that will let you connect to the pi.

Step 6: Use it
==============

The landing page will give you a few sparse links to information about this image, and two options:

* Octoprint: Very mature server for 3D printers. There are a lot of great features, and plugins, but
it's use case is 99% 3D printing.

.. image:: img/octoprint.png

* CNC.js: Simple, CNC interface. The Marlin support is especially new, but I've been using it with
grbl for a long time, and I love how simple and effective it is.

.. image:: img/cncjs.png

Step 7: Change the Passwords
============================

The default login password is raspberry, which the whole world knows. Even if you don't know how to
use the command line, other people do, and they can do nasty things to you. There are many many
things to do to improve security, but number one is to change the passwords.

Changing the SSH password
-------------------------

You'll need to log into the pi to change the password.

* Connecting with an ssh client is the easiest way, after you know the ip address.

* Windows: putty.exe is an oldie and a goodie.
* Mac/Linux: ``ssh pi@v1pi.local``

* If you can't get ssh to work, you can also log in using a keyboard and monitor.
* The default username is ``pi`` and the default password is ``raspberry``
* Change the password by running the ``passwd`` command.
* There is no root password set, so you don't have to change it. Any super user actions can be done
as pi with the ``sudo`` command.

Changing the Hot Spot Password
------------------------------

The hot spot *default* password is ``raspberry``. Any device within range can connect, and find your
pi, or the web interface, and control your pi, and your CNC machine. It gets worse if you think
about an infected device being in range, and not just a panel van with an antenna on it.

Changing the password is easy, and will help you sleep at night. OK, maybe not, but writing this
will help me sleep at night.

The password is stored on the root file system in ``/etc/hostapd/hostapd.conf``. Log into the pi
through ssh, or you can edit the file on the sd card from your computer (but not in notepad, use
notepad++)

``sudo nano /etc/hostapd/hostapd.conf``

Go down to where it says: ``wpa_passphrase=raspberry`` and change the word raspberry to something
you want. Save the file (in nano, it's [Ctrl+x], y, enter).

That's it
=========

86 changes: 86 additions & 0 deletions doc/wifi-setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
##########
WiFi Setup
##########

Overview
========

v1pi has two ways to set up the WiFi:

* Client: The pi will connect to your wifi router, get access to the Internet, and be accessible
from any device on your WiFi network
* Hot Spot: The pi will create an access point which your devices can connect to.


Auto Hot Spot
=============

The Auto Hot Spot feature will create a Hot Spot when there is no client connection.

* You don't have to do anything to set it up.

* The default ssid is ``v1pi``
* The default passphrase is ``raspberry``. See the setup instructions for how to change it.

* If your machine is in a location without WiFi coverage, this is a good option.
* The pi will not have any access to the Internet, so updates and installing plugins will not be
possible. You will have to connect to the Internet to get updates or plugins.
* The IP Address of the machine will be ``192.168.50.1``. The bonjour hostname ``v1pi.local`` is
also available.
* Since there is no Internet connection, it is more protected from attacks.

Client Connection
=================

If the pi can connect to your house's WiFi, there are several benefits:

* The machine can install plugins, and get updates because it's connected to the Internet.
* No need to switch your computer between WiFi connections to get the Internet.
* No need to worry about devices connecting to the Hot Spot of your CNC machine.

Configure the Client Connection
-------------------------------

The Client WiFi connection is controlled from ``v1pi-wpa-supplicant.txt``
in the boot filesystem on the SD card. I prefer to edit the file before the first bootup.

The file contains instructions on how to edit it. For example, here are the parts I changed in
my configuration (the names have been changed to protect the innocent):

.. code-block:: c
network={
ssid="Ryan"
psk="Seacrest"
}
country=US
Edit wpa-supplicant in Windows
------------------------------

To edit the file in windows, after you've flashed the image using Etcher:

1. Don't reformat the drives you just flash, cancel this box:

.. image:: img/windows_dont_format.jpg

2. Find the Boot partition.

.. image:: img/windows_boot_partition.jpg

3. Find the v1pi-wpa-supplicant.txt and edit it with an advanced text editor like notepad++ or atom.
**Do not edit the file in Notepad**

.. image:: img/windows_open_with.jpg

4. Change the lines for your network setup.

* From:

.. image:: img/windows_wpa_before.png

* To:

.. image:: img/windows_wpa_after.png

1 comment on commit 74b9d61

@houmar
Copy link

@houmar houmar commented on 74b9d61 Jun 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello jeff,

I install the image on raspberry pi 3B+ and i'm having a strange problem. I can home the shapeoko cnc, i can set the zero and the camera is working. The problem is went i upload a file to cut the cnc stop and doesn't do the job. The server raspberry still running. I'm on mac and sending the file by WIFI.

did i miss something, by the way is it possible to work by ethernet.

Thanx

Please sign in to comment.