Ali Hatami Tajik
1 year ago
1 changed files with 114 additions and 0 deletions
@ -0,0 +1,114 @@ |
|||
# Printer Configuration Manual |
|||
|
|||
## Preface & Disclaimer |
|||
This document is created as a guide manual for setup and configuration of the thermal printer (Sony UP-D898MD) installed on the ultrasound device. It's probable that steps mentioned in this document work for other models (e.g. X898MD or D898) but there is absolutely no guarantee that it will work. |
|||
|
|||
The complete process is described in the following two sections (Setup & Printer Configuration). |
|||
|
|||
## Setup |
|||
To install the drivers we will use [CUPS](https://www.cups.org/) (Common Unix Printing System) project and [Gutenprint](https://gimp-print.sourceforge.io/) project[$^1$](#1). |
|||
|
|||
There are several steps to install these: |
|||
1. Install `cups` |
|||
2. Make sure `cups-filters` and `cups-filters-common-driver` is installed |
|||
3. Install `libcups2-dev` |
|||
4. Install Gutenprint |
|||
5. Restart CUPS service |
|||
|
|||
### Install Cups |
|||
It's possible to install cups using `apt` package manager: |
|||
```bash |
|||
sudo apt install cups |
|||
``` |
|||
|
|||
This command will install the CUPS project and needed dependencies. In case of missing some, we will enter commands in the next section. |
|||
|
|||
### Dependencies |
|||
|
|||
To install dependencies for the cups and gutenprint enter the following command: |
|||
|
|||
```bash |
|||
sudo apt install cups-filters cups-filters-core-drivers libcups2-dev |
|||
``` |
|||
|
|||
### Install Gutenprint drivers |
|||
|
|||
After we installed required dependencies, we should install appropriate drivers. Support for this specific model is added in Gutenprint v5.3.4 and this is not provided by the package manager. To install this specific model first we should get the source code: |
|||
```bash |
|||
# you can get the archive's from the link provided for Gutenprint |
|||
wget https://downloads.sourceforge.net/gimp-print/gutenprint-5.3.4.tar.xz |
|||
``` |
|||
|
|||
After that we should decompress the archives (if the format is different than `tar.xz` you might want to use another command): |
|||
|
|||
```bash |
|||
tar -xvf gutenprint-5.3.4.tar.xz |
|||
``` |
|||
|
|||
And after that we should enter these commands to build and install the project: |
|||
|
|||
```bash |
|||
cd gutenprint-5.3.4/ |
|||
./configure && make |
|||
``` |
|||
|
|||
```bash |
|||
sudo make install |
|||
``` |
|||
|
|||
After the installation, we should restart the cups service to work properly with newly added drivers and backends: |
|||
|
|||
```bash |
|||
sudo systemctl restart cups |
|||
``` |
|||
|
|||
## Printer Configuration |
|||
|
|||
### Using web interface |
|||
After we setup CUPS and drivers, we can now add our printer. Follow these steps to add the printer[$^2$](#2): |
|||
1. Open //localhost:631 in a browser. It should bring CUPS dashboard. |
|||
2. Click on **"Administration"** tab. |
|||
3. Click on **"Add Printer"** button (It's located in printers section). It may prompt you for username and password. Enter the current user of the system (or any sudoer user) and it's password. |
|||
4. In front of **"Local Printers"** choose the printer (`Sony UP-D898MD_X898MD` or something similar)[$^3$](#3) and click **"Continue"**. |
|||
5. Choose name and description of the device on default and click **"Continue"**. (`Sony_UP-D898MD_X898MD` for both) [$^4$](#4). |
|||
6. From the **"Model"** list select the devices mode (i.e. `Sony UP-D898MD - CUPS+Gutenprint v5.3.4 (en)`). If the option is not available make sure manufacture is detected correctly (i.e. Sony) and you restarted CUPS service after you installed Gutenprint. Click **"Add Printer"**. |
|||
7. In the **"Set Printer Options"** page ***DO NOT CHANGE*** any setting and click on **"Set Default Options"**. |
|||
8. After a while you will be redirected to the printers page. To test the printer is set up correctly, under **"Maintenance"** dropdown click on **"Print Test Page"**. At this moment printer should start to print the test page. It'll look like [this](https://i.imgur.com/XCSypbH.png). |
|||
|
|||
### Using CLI |
|||
It is also possible to configure the printer using command-line. To add the printer using cli first we should find the driver and device uri. |
|||
|
|||
To find driver: |
|||
```bash |
|||
lpinfo -m | grep D898MD |
|||
``` |
|||
and the output is something like: |
|||
``` |
|||
gutenprint.5.3://sony-upd898md/expert Sony UP-D898MD - CUPS+Gutenprint v5.3.4 |
|||
``` |
|||
and note that we only will use the part `gutenprint.5.3://sony-upd898md/expert`. |
|||
|
|||
To find the device uri: |
|||
```bash |
|||
lpinfo -v | grep sony |
|||
``` |
|||
and the output is something like: |
|||
``` |
|||
direct gutenprint53+usb://sony-upd898/6063080 |
|||
``` |
|||
and note that we only will use the `gutenprint53+usb://sony-upd898/6063080` part without the `direct` (which is a information tag beside our device uri). |
|||
|
|||
Now we can add the printer (note that we use `Sony_UP-D898MD_X898MD` as the name of our device): |
|||
```bash |
|||
lpadmin -p Sony_UP-D898MD_X898MD -E -v gutenprint53+usb://sony-upd898/6063080 -m gutenprint.5.3://sony-upd898md/expert |
|||
``` |
|||
and this will add the printer to our system. |
|||
|
|||
## Footnotes |
|||
<a id="1">[1]</a> It's probable that Gutenprint project does not support a special manufacture/model. It's also probable that a special version of it doesn't provide the support (as our exact model support is added to the project since V5.3.4). |
|||
|
|||
<a id="2">[2]</a> These instructions are related to CUPS V2.4.X and the interface may has changed. |
|||
|
|||
<a id="3">[3]</a> If there is no option representing your printer, double check that the printer is ON and its cable is connected to the device (On connection of the USB cable the printer makes a beep sound). Also check if the printer say `READY` in its display and the the display background is green. |
|||
|
|||
<a id="4">[4]</a> As this document is being written, choosing printer in the software relied on the correct name of it and does not use `MID:PID` of the USB. Changing it to another thing make broke the functionality. |
Loading…
Reference in new issue