LINUX.ORG.RU

ubuntu-10.04 + принтер BTP-2002NP


0

1

1) Чековый принтер Orient BTP-2002NP
2) uname -a — Linux 2.6.32-24-generic
3) Версию дистрибутива — ubuntu-10.04-desktop-i386
4) lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 154f:1001
Bus 002 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
5) dmesg | tail -n 50
[ 2676.088142] usb 1-2: USB disconnect, address 3
[ 2682.032074] usb 1-2: new full speed USB device using uhci_hcd and address 4
[ 2682.177199] usb 1-2: configuration #1 chosen from 1 choice
[ 2683.528151] usb 1-2: USB disconnect, address 4
[ 2759.656140] usb 1-2: new full speed USB device using uhci_hcd and address 5
[ 2759.804189] usb 1-2: configuration #1 chosen from 1 choice
[ 4066.872155] usb 1-2: USB disconnect, address 5
[ 4068.848090] usb 1-2: new full speed USB device using uhci_hcd and address 6
[ 4068.988363] usb 1-2: configuration #1 chosen from 1 choice

По идеи он должен появится в /dev/usb/lp0 но его там нет, и /dev/ttyUSB тоже нету. Виден тока в /dev/bus/usb/001/003 но при каждом вкл/выкл принтера меняется место расположение 004,005,006……
Прошу помочь как заставить рабоать данный принтер под ubuntu.

Попробуйте зайти на http://localhost:631/ (специальный интерфейс для настройки принтера на вашем компьютере) и добавить в нём принтер.

Если есть возможность, поищите ту же модель, но с LPT- или Ethernet-интерфейсом, они должны работать без проблем.

AITap ★★★★★ ()
Ответ на: комментарий от AITap

Я его и подключал через Cups.Также устанавливал драйвера согласно тех инструкций которые были в них.
************************
New BeiYang Co., Ltd.
Copyright 2008
************************
CUPS Driver Only Installation and Configuration instructions
------------------------------------------------------------
This document contains instructions on how to install and
configure the BeiYang CUPS (Common Unix Printing System)
drivers into an existing CUPS installation.
** Version: 3.10
Please reference this version number for all related issues.
** Requirements:
1. CUPS system 1.1.10 or higher
** Installation Procedure:
a. copy file rastertoby2002npp to /usr/lib/cups/filter
b. copy file by2002npp.ppd to /usr/share/cups/model
Note:
This procedure assumes that CUPS was installed as per its default
script. If CUPS was installed otherwise, the directory paths
may vary slightly.
** Configuration Procedure:
a. Navigate to http://localhost:631 via Netscape Navigator
b. Click on the link that reads «Manage Printers»
c. Click on the link that reads «Add Printer»
d. When prompted for the User ID and Password, enter a User ID
for the Linux system that has administrative rights (or root
if no other user).
e. Fill in the Name, Location, and Description fields as desired.
The text entered into the name field is used to reference the
printer being configured from various applications (such as the
lpr command).
Click on the link that reads «Continue»
f. Choose the port that the printer is connected to from the
choice box (typically usb Port #1)
Click on the link that reads «Continue»
Note: Instructions for USB usage
To use the BeiYang printer with the optional USB interface and CUPS
perform the following steps on your system.
1. Modify the file /etc/modules.conf (or /etc/conf.modules) to include
the following lines
alias usb-controller usb-uhci
post-install usb-uhci modprobe printer
2. Reboot the computer with the BeiYang printer connected via a USB port
3. Repeat the above procedure from step a. and choose the USB port
(USB Printer #1 (BeiYang USB Printer))
The procedure for supporting USB printers can vary from one Linux distribution
to the next. Refer to your distributions support material if the above
procedure does not work.
g. Select «beiyang» from the Make box.
Click on the link that reads «Continue»
h. Choose the model of printer being installed (by2002npp(usb))
Click on the link that reads «Continue»
i. Click on the link that reads «Printers»
j. All installed printers will now be listed. Find the printer
just installed and click on the link that reads «Configure Printer».
k. Click on the link that reads «Continue».
This saves all aspects of configuration, applying them to all subsequent print requests.
n. Use driver to achieve print out.

shonsu ()
Ответ на: комментарий от AITap

После процедуры установки согласно инструкции принтер так и не печатает.
cat /var/log/cups/error_log
E [18/Aug/2010:09:44:48 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:31:39 +0300] [cups-driverd] Unable to open PPD directory «/usr/share/cups/model»: Not a directory
E [18/Aug/2010:12:31:39 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:12:33:13 +0300] Unable to execute /usr/lib/cups/filter/rastertoby2002npp: no execute permissions (0100644)
E [18/Aug/2010:12:33:13 +0300] [Job 1] Unable to start filter «rastertoby2002npp» - Operation not permitted.
E [18/Aug/2010:12:33:13 +0300] [Job 1] Stopping job because the scheduler could not execute a filter.
E [18/Aug/2010:12:36:58 +0300] Unable to execute /usr/lib/cups/filter/rastertoby2002npp: no execute permissions (0100644)
E [18/Aug/2010:12:36:58 +0300] [Job 2] Unable to start filter «rastertoby2002npp» - Operation not permitted.
E [18/Aug/2010:12:36:58 +0300] [Job 2] Stopping job because the scheduler could not execute a filter.
E [18/Aug/2010:12:39:29 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:42:53 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:48:18 +0300] [Job 3] Aborting job because it has no files.
E [18/Aug/2010:12:49:16 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:52:14 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:13:10:22 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:13:29:56 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:13:34:54 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!

Права на эти директории и файлы были выданы такие
chown -R root /usr/lib/cups/filter && chmod +x /usr/lib/cups/filter/rastertoby2002npp, потом перезапускаю cups.

shonsu ()
Ответ на: комментарий от AITap

исправил
cat /var/log/cups/error_log
E [18/Aug/2010:09:44:48 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:31:39 +0300] [cups-driverd] Unable to open PPD directory «/usr/share/cups/model»: Not a directory
E [18/Aug/2010:12:31:39 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:12:33:13 +0300] Unable to execute /usr/lib/cups/filter/rastertoby2002npp: no execute permissions (0100644)
E [18/Aug/2010:12:33:13 +0300] [Job 1] Unable to start filter «rastertoby2002npp» - Operation not permitted.
E [18/Aug/2010:12:33:13 +0300] [Job 1] Stopping job because the scheduler could not execute a filter.
E [18/Aug/2010:12:36:58 +0300] Unable to execute /usr/lib/cups/filter/rastertoby2002npp: no execute permissions (0100644)
E [18/Aug/2010:12:36:58 +0300] [Job 2] Unable to start filter «rastertoby2002npp» - Operation not permitted.
E [18/Aug/2010:12:36:58 +0300] [Job 2] Stopping job because the scheduler could not execute a filter.
E [18/Aug/2010:12:39:29 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:42:53 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:48:18 +0300] [Job 3] Aborting job because it has no files.
E [18/Aug/2010:12:49:16 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:12:52:14 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:13:10:22 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:13:29:56 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:13:34:54 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:13:40:31 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [18/Aug/2010:13:52:32 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [18/Aug/2010:14:55:31 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory

shonsu ()
Ответ на: комментарий от shonsu

root@s51men06:/home/administrator# lpq
2002 is ready and printing
Rank Owner Job File(s) Total Size
1st adminis 6 Test Page 1024 bytes
active anonymo 7 Test Page 1024 bytes
root@s51men06:/home/administrator# dmesg
[ 2.218996] usbcore: registered new interface driver hiddev
[ 2.233457] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:11.2/usb1/1-1/1-1:1.0/input/input4
[ 2.234518] generic-usb 0003:046D:C018.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:11.2-1/input0
[ 2.234634] usbcore: registered new interface driver usbhid
[ 2.235082] usbhid: v2.6:USB HID core driver
[ 2.808251] EXT4-fs (sda4): mounted filesystem with ordered data mode
[ 11.892661] Adding 2635768k swap on /dev/sda1. Priority:-1 extents:1 across:2635768k

shonsu ()
Ответ на: комментарий от shonsu

> E [18/Aug/2010:13:40:31 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
sudo rm -rvi /var/spool/cups/tmp/.hplip

E [18/Aug/2010:13:52:32 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!

Что в файле?

Печать ведётся?

AITap ★★★★★ ()
Ответ на: комментарий от AITap

/dev# dmesg | tail -20
[ 9008.024150] usb 1-2: USB disconnect, address 3
[ 9010.248128] usb 1-2: new full speed USB device using uhci_hcd and address 4
[ 9010.392445] usb 1-2: configuration #1 chosen from 1 choice
[ 9016.952120] usb 1-2: USB disconnect, address 4
[ 9018.680076] usb 1-2: new full speed USB device using uhci_hcd and address 5
[ 9018.825252] usb 1-2: configuration #1 chosen from 1 choice

root@s51men06:/sys/devices/pci0000:00# ls -l /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-08-18 14:55 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 1 2010-08-18 14:55 /dev/bus/usb/001/002
crw-rw-r-- 1 root root 189, 128 2010-08-18 14:55 /dev/bus/usb/002/001
root@s51men06:/sys/devices/pci0000:00# ls -l /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 2010-08-18 14:55 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189, 1 2010-08-18 14:55 /dev/bus/usb/001/002
crw-rw-r-- 1 root root 189, 6 2010-08-18 17:39 /dev/bus/usb/001/007
crw-rw-r-- 1 root root 189, 128 2010-08-18 14:55 /dev/bus/usb/002/001

Здесь он тусуется. :(



shonsu ()
Ответ на: комментарий от shonsu

Докопался до вот этого что дальше делать? :(
udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1282142591.054723] remove /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0 (usb)
KERNEL[1282142591.054843] remove /devices/pci0000:00/0000:00:11.2/usb1/1-2 (usb)
UDEV [1282142591.060481] remove /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0 (usb)
UDEV [1282142591.064562] remove /devices/pci0000:00/0000:00:11.2/usb1/1-2 (usb)
KERNEL[1282142594.170467] add /devices/pci0000:00/0000:00:11.2/usb1/1-2 (usb)
KERNEL[1282142594.172587] add /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0 (usb)
UDEV [1282142594.186248] add /devices/pci0000:00/0000:00:11.2/usb1/1-2 (usb)
UDEV [1282142594.212790] add /devices/pci0000:00/0000:00:11.2/usb1/1-2/1-2:1.0 (usb)

shonsu ()
Ответ на: комментарий от AITap

Вот что в логах
lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 154f:1001
Bus 001 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hu

cat /var/log/cups/error_log
E [19/Aug/2010:12:16:56 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [19/Aug/2010:12:51:32 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!

dmesg | tail -20
[ 1730.704087] usb 1-2: new full speed USB device using uhci_hcd and address 3
[ 1730.849658] usb 1-2: configuration #1 chosen from 1 choice
[ 1823.960137] usb 1-2: USB disconnect, address 3
[ 1825.688087] usb 1-2: new full speed USB device using uhci_hcd and address 4
[ 1825.838055] usb 1-2: configuration #1 chosen from 1 choice


shonsu ()
Ответ на: комментарий от shonsu

Попробуйте dpkg-reconfigure cups и настроить принтер заново. У меня файл sample.drv тоже в наличии (debian testing), но на него никто не ругается.

AITap ★★★★★ ()
Ответ на: комментарий от AITap

cat /var/log/cups/error_log
E [19/Aug/2010:12:16:56 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [19/Aug/2010:12:51:32 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [19/Aug/2010:13:50:26 +0300] Unable to remove temporary file «/var/spool/cups/tmp/.hplip» - Is a directory
E [19/Aug/2010:13:50:27 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!
E [19/Aug/2010:13:51:04 +0300] [cups-driverd] Bad driver information file «/usr/share/cups/drv/sample.drv»!

shonsu ()
Ответ на: комментарий от AITap

как можно посмотреть куда монтируется принтер?
У меня был похожий принтер он монтировался /dev/usb/lp0 ы нормально печатал. А этот чорный плащ блин.

shonsu ()
Ответ на: комментарий от shonsu

Он никуда не монтируется. Ядро не знает, какой модуль для него подгружать, а, следовательно, нет смысла создавать пустой node.

AITap ★★★★★ ()
Ответ на: комментарий от shonsu

Для начала нужно изучить язык C и научиться писать модули ядра. Вы проделали все инструкции из того списка? Этого должно было хватить для того, чтобы CUPS'овый драйвер заработал.

AITap ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.