update doc-page on Raspi
This commit is contained in:
parent
211e7db22c
commit
bd57c01794
|
@ -2,16 +2,28 @@
|
||||||
Raspberry Pi
|
Raspberry Pi
|
||||||
************
|
************
|
||||||
|
|
||||||
This instructions were tested on Raspbian.
|
:Last Reviewed: 2016-12-07
|
||||||
|
|
||||||
Unless you have done any distro with libusb-1.0 on the Raspberry Pi, the
|
This instructions were tested on Raspbian.
|
||||||
following instructions should works fine on your raspberry distro.
|
|
||||||
|
|
||||||
.. warning:: You should **never** directly connect an printer with RS232-interface (serial port) directly to
|
.. warning:: You should **never** directly connect an printer with RS232-interface (serial port) directly to
|
||||||
a Raspberry PI or similar interface (e.g. those simple USB-sticks without encasing). Those interfaces are
|
a Raspberry PI or similar interface (e.g. those simple USB-sticks without encasing). Those interfaces are
|
||||||
based on 5V- or 3,3V-logic (the latter in the case of Raspberry PI). Classical RS232 uses 12V-logic and would
|
based on 5V- or 3,3V-logic (the latter in the case of Raspberry PI). Classical RS232 uses 12V-logic and would
|
||||||
**thus destroy your interface**. Connect both systems with an appropriate *level shifter*.
|
**thus destroy your interface**. Connect both systems with an appropriate *level shifter*.
|
||||||
|
|
||||||
|
Normal installation
|
||||||
|
-------------------
|
||||||
|
Normally you should be able to install the library just like on any other
|
||||||
|
Linux distribution. Please be reminded that the newer versions are not in Debian
|
||||||
|
and thus not in Raspbian.
|
||||||
|
However, you can just install with `pip`. For more details on this
|
||||||
|
check the :doc:`installation-manual <installation>`.
|
||||||
|
|
||||||
|
If this works for you, you don't need to continue reading this part.
|
||||||
|
If not, please check if the rest might help you.
|
||||||
|
Should you have any problems, do not hesitate to contact the maintainer, since you
|
||||||
|
might have found a bug in the code or documentation.
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -19,13 +31,15 @@ First, install the packages available on Raspbian.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# apt-get install python-imaging python-serial python-setuptools
|
apt-get install python-imaging python-serial python-setuptools
|
||||||
|
|
||||||
PyUSB
|
PyUSB
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
|
.. todo:: The freshness of this part is not verified. Please take it with a grain of salt or help updating it.
|
||||||
|
|
||||||
PyUSB 1.0 is not available on Ubuntu, so you have to download and
|
PyUSB 1.0 is not available on Ubuntu, so you have to download and
|
||||||
install it manually
|
install it manually.
|
||||||
|
|
||||||
1. Download the latest tarball from
|
1. Download the latest tarball from
|
||||||
`Sourceforge <http://sourceforge.net/projects/pyusb/files/>`__
|
`Sourceforge <http://sourceforge.net/projects/pyusb/files/>`__
|
||||||
|
@ -35,23 +49,32 @@ install it manually
|
||||||
::
|
::
|
||||||
|
|
||||||
# wget ...
|
# wget ...
|
||||||
# unzip pyusb*.zip
|
unzip pyusb*.zip
|
||||||
# cd pyusb*
|
cd pyusb*
|
||||||
# python setup.py build
|
python setup.py build
|
||||||
# sudo python setup.py install
|
sudo python setup.py install
|
||||||
|
|
||||||
python-qrcode
|
python-qrcode
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can install qrcode just from pip with
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo pip install qrcode
|
||||||
|
|
||||||
|
Otherwise you can install it manually. If in doubt please check the documentation of the
|
||||||
|
`python-qrcode`-project.
|
||||||
|
|
||||||
1. Checkout the code from github
|
1. Checkout the code from github
|
||||||
2. Install the library
|
2. Install the library
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# git clone https://github.com/lincolnloop/python-qrcode
|
git clone https://github.com/lincolnloop/python-qrcode
|
||||||
# cd python-qrcode
|
cd python-qrcode
|
||||||
# python setup.py build
|
python setup.py build
|
||||||
# sudo python setup.py install
|
sudo python setup.py install
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -64,10 +87,10 @@ If you have installed pyusb for libusb-1.0 then you need to:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# git clone --recursive https://github.com/manpaz/python-escpos.git
|
git clone --recursive https://github.com/python-escpos/python-escpos.git
|
||||||
# cd python-escpos
|
cd python-escpos
|
||||||
# python setup.py build
|
python setup.py build
|
||||||
# sudo python setup.py install
|
sudo python setup.py install
|
||||||
|
|
||||||
Now you can attach your printer and and test it with the example code in
|
Now you can attach your printer and and test it with the example code in
|
||||||
the project's `home <https://github.com/manpaz/python-escpos>`__
|
the project's set of examples. You can find that in the `project-repository <https://github.com/python-escpos/python-escpos>`__.
|
||||||
|
|
Loading…
Reference in New Issue