Skip to content

Commit

Permalink
more linux stuff cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
jankantert committed Jun 5, 2018
1 parent 0de1f66 commit f5e15e2
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 19 deletions.
26 changes: 26 additions & 0 deletions hardware/fast/connecting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,29 @@ Fast offers three different types of node boards:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: /hardware/images/fast-io-3208.png

On Linux: Add udev rules to ensure persistent device names
----------------------------------------------------------

If you have more than one ttyUSB device connected to your PC (e.g. the FAST
Nano and a FAST DMD) you can assign a name to your ports
based on the USB port they are connected to.

First identify the port of your FAST hardware. Usually it should be
``/dev/ttyUSB0`` or ``/dev/ttyUSB5``.

Then run ``udevadm info`` on your port:

.. code-block:: shell
udevadm inf /dev/ttyUSB0
This will show you the ``DEVPATH``. Now replace the last part ``ttyUSBX`` with
an asterisk and add an udev rules like this in ``/etc/udev/rules.d/fast.rules``:

::

SUBSYSTEM=="tty", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/*", SYMLINK+="ttyNET", GROUP="adm", MODE="0660"

After a reboot you should get a ``/dev/ttyNET`` device if you connect a FAST
device to that specific USB port. You can use that port in your config.
2 changes: 1 addition & 1 deletion hardware/multimorphic/connecting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Connect all your SW-16 boards to the switch bus and all your PD-16 and PD-8x8
boards to your driver bus. Use twisted wires but connect + to + and - to - on
all nodes.

.. image:: /hardware/images/multimorphic_p3_roc_wireing.png
.. image:: /hardware/images/multimorphic_p3_roc_wireing.jpg

SW-16
~~~~~
Expand Down
2 changes: 1 addition & 1 deletion hardware/multimorphic/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to install P-ROC / P3-ROC drivers on Linux

If you want to use MPF on a Debian-based version of Linux (which includes
Ubuntu), you can use our all-in-one Debian installer which is detailed in the
:doc:`/install/linux` guide.
:doc:`/install/linux/index` guide.

Note that when you run that installation script, it will ask you what type
of hardware you'll be using. If you choose the "P3 or P-ROC" option, then it
Expand Down
2 changes: 2 additions & 0 deletions hardware/opp/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ this: ``\\.\COM10`` ``\\.\COM11`` ``\\.\COM12``, etc. (It's a Windows
thing. Google it for details.) That said, it seems that Windows 10 can
just use the port names like normal: ``com10, com11, com12``, so try
that first and then try the alternate format if it doesn't work.
On Linux, the port usually is ``/dev/ttyACM0`` or ``/dev/ttyACM1``.
On Mac, look for some ``/dev/cu.modemXXXX`` device.

Changing the polling rate
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
47 changes: 47 additions & 0 deletions hardware/opp/connecting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Connecting OPP to your computer
===============================

Connect the OPP board to your computer via USB.
Make sure that your OPP chains do not get too long since the serial throughput
is limited per chain. You can connect multiple chains.

On Linux: Blacklist cytherm module
----------------------------------

If you are using OPP hardware on linux you should blacklist the cypress
thermometer because it conflicts with OPP.

In ``/etc/modprobe.d/blacklist.conf`` add:

::

blacklist cytherm

If blacklist.conf does not exist, just create a new empty file as root.
Afterwards, reboot your PC.

On Linux: Add udev rules to ensure persistent device names
----------------------------------------------------------

If you have more than one ttyACM connected to your PC (e.g. multiple OPP
chains or other USB-serial adapters) you can assign a name to your ports
based on the USB port they are connected to.

First identify the port of your OPP hardware. Usually it should be
``/dev/ttyACM0`` or ``/dev/ttyACM1``.

Then run ``udevadm info`` on your port:

.. code-block:: shell
udevadm inf /dev/ttyACM0
This will show you the ``DEVPATH``. Now replace the last part ``ttyACMX`` with
an asterisk and add an udev rules like this in ``/etc/udev/rules.d/opp.rules``:

::

SUBSYSTEM=="tty", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/*", SYMLINK+="ttyOPP1", GROUP="adm", MODE="0660"

After a reboot you should get a ``/dev/ttyOPP1`` device if you connect an OPP
device to that specific USB port. You can use that port in your config.
1 change: 1 addition & 0 deletions hardware/opp/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Hardware and electrical engineering stuff is documented at the

.. toctree::

connecting
config
switches
drivers
Expand Down
24 changes: 24 additions & 0 deletions hardware/smbus/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,27 @@ bus-address. If you only provide an address it will use bus 0. On Linux
bus 0 will ususally be /dev/i2c-0, 1 will be /dev/i2c-1 and so on.


6. Add udev rules if you have multiple i2c devices
--------------------------------------------------

If you have more than one i2c device connected to your PC via USB you can
assign a name to your ports based on the USB port they are connected to.

First identify the port of your I2C hardware. Usually it should be
``/dev/i2c0`` or ``/dev/i2c1``.

Then run ``udevadm info`` on your port:

.. code-block:: shell
udevadm inf /dev/i2c0
This will show you the ``DEVPATH``. Now replace the last part ``i2cX`` with
an asterisk and add an udev rules like this in ``/etc/udev/rules.d/i2c.rules``:

::

SUBSYSTEM=="i2c-dev", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/*", SYMLINK+="i2c-front", GROUP="adm", MODE="0660

After a reboot you should get a ``/dev/i2c-front`` device if you connect an i2c
device to that specific USB port. You can use that port in your config.
5 changes: 1 addition & 4 deletions install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ entire process. Select the OS you're using from the list below:

Windows <windows>
Mac <mac>
Debian / Ubuntu Linux <linux>
Xubuntu Linux <xubuntu>
Raspberry Pi <raspberry>
Pine64 <pine64>
Linux <linux/index>

.. note::
These guides just show you how to get MPF up and running. If you're using
Expand Down
29 changes: 29 additions & 0 deletions install/linux.rst → install/linux/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,32 @@ To downgrade (or install a specific release x.yy.z) run:
pip3 install mpf=x.yy.z
pip3 install mpf-mc=x.yy.z
Specific Hardware Devices
-------------------------

We got some write-ups for specific hardware platforms.
They follow the general linux installation schema but also cover some details
about that hardware.

.. toctree::
:maxdepth: 1

Raspberry Pi <raspberry>
Pine64 <pine64>


Specific Linux Distributions
----------------------------

Specifics about certain linux distributions.

.. toctree::
:maxdepth: 1

Xubuntu Linux <xubuntu>

Specific Linux Distributions
----------------------------

File renamed without changes.
14 changes: 1 addition & 13 deletions install/raspberry.rst → install/linux/raspberry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The standard /tmp "folder" is too small on pipaos, just type:
to get rid of it. (It will be created automatically if needed and will have the whole space afterwards)

Now run the :doc:`MPF Linux Debian installer </install/linux>`. It will install MPF, MPF-MC and all dependencies for
Now run the :doc:`MPF Linux Debian installer </install/linux/index>`. It will install MPF, MPF-MC and all dependencies for
you.

This will take some time as it may compile some drivers mpf-mc needs like the audio driver.
Expand Down Expand Up @@ -203,18 +203,6 @@ Do a reboot:
sudo reboot
OPP Hardware not found:
-----------------------
If you are using OPP Hardware you have to blacklist the Cypress Thermometer:
in /etc/modprobe.d/blacklist.conf add:

::

blacklist cytherm

If blacklist.conf does not exist, just create a new empty file as root.
The USB Enumerator thinks a Thermometer is plugged in but it is definitely not ;-)

Remote log in:
--------------
To log in from your development machine into your raspberry you can do it easily via ssh.
Expand Down
File renamed without changes.

0 comments on commit f5e15e2

Please sign in to comment.