Skip to Content
Menu
This question has been flagged
5 Replies
6661 Views

I have followed the instructions at https://doc.odoo.com/trunk/hw_proxy/#start-the-local-openerp-installl to setup an order printer.

When I access http://192.168.0.100:8069/hw_proxy/status, I see:

Hardware Status

The list of enabled drivers and their status

escpos : disconnected

Printer Not Found

Connected Devices

The list of connected USB devices as seen by the posbox

0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

1d6b:0001 Linux Foundation 1.1 root hub

1d6b:0001 Linux Foundation 1.1 root hub

1d6b:0001 Linux Foundation 1.1 root hub

04b8:0202 Seiko Epson Corp. Receipt Printer M129C/TM-T70

1d6b:0001 Linux Foundation 1.1 root hub


I can see my printer in the list, but it still shows me "Printer disconnected". I added the ID to the supported_devices.py but no change.


What might I be doing wrong?

Avatar
Discard
Best Answer

Hello,

  Try to get the endpoint for your printer by using this command:

#lsusb -vvv -d VENDOR:PRODUCT | grep bEndpointAddress | grep OUT


example:


root@raspberrypi:~# lsusb

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.

Bus 001 Device 004: ID 1cbe:0002 Luminary Micro Inc.

Bus 001 Device 005: ID 046d:c31d Logitech, Inc.

root@raspberrypi:~# lsusb -vvv -d 1cbe:0002 | grep bEndpointAddress | grep OUT

        bEndpointAddress     0x03  EP 3 OUT


If your endpoint return other than 0x01 then a bit of code change required to get it to work.

I would recommend you to use version 13 that should work for alot of the standard printers (using default endpoints and interface). I have a patch that should work for non-standard printers (waiting for approval from Joren) for version 13. If you want I can send it to you to get your printer to work.

Avatar
Discard
Author Best Answer

Olá Axel,

ls /dev/* shows me:

agpgart loop6 sda1 tty22 tty55 ttyS3

autofs loop7 sda2 tty23 tty56 ttyS30

block mapper sda5 tty24 tty57 ttyS31

bsg mcelog sdb tty25 tty58 ttyS4

btrfs-control mem sdc tty26 tty59 ttyS5

bus memory_bandwidth sdd tty27 tty6 ttyS6

cdrom net sde tty28 tty60 ttyS7

char network_latency sg0 tty29 tty61 ttyS8

console network_throughput sg1 tty3 tty62 ttyS9

core null sg2 tty30 tty63 ttyprintk

cpu port sg3 tty31 tty7 uhid

cpu_dma_latency ppp sg4 tty32 tty8 uinput

cuse psaux sg5 tty33 tty9 urandom

disk ptmx shm tty34 ttyS0 usb

dri pts snapshot tty35 ttyS1 vcs

ecryptfs ram0 snd tty36 ttyS10 vcs1

fb0 ram1 sr0 tty37 ttyS11 vcs2

fd ram10 stderr tty38 ttyS12 vcs3

fd0 ram11 stdin tty39 ttyS13 vcs4

full ram12 stdout tty4 ttyS14 vcs5

fuse ram13 tty tty40 ttyS15 vcs6

hpet ram14 tty0 tty41 ttyS16 vcsa

i2c-0 ram15 tty1 tty42 ttyS17 vcsa1

i2c-1 ram2 tty10 tty43 ttyS18 vcsa2

i2c-2 ram3 tty11 tty44 ttyS19 vcsa3

i2c-3 ram4 tty12 tty45 ttyS2 vcsa4

input ram5 tty13 tty46 ttyS20 vcsa5

kmsg ram6 tty14 tty47 ttyS21 vcsa6

log ram7 tty15 tty48 ttyS22 vfio

loop-control ram8 tty16 tty49 ttyS23 vga_arbiter

loop0 ram9 tty17 tty5 ttyS24 vhci

loop1 random tty18 tty50 ttyS25 vhost-net

loop2 rfkill tty19 tty51 ttyS26 zero

loop3 rtc tty2 tty52 ttyS27

loop4 rtc0 tty20 tty53 ttyS28

loop5 sda tty21 tty54 ttyS29


which tty device should I be modifying

Avatar
Discard
Best Answer

Maybe you just need to add permissions to the printer device in the linux file. For example to test it

chmod 777 /dev/ttyUSB0

You just need to find what is the device path in your filesystem

Avatar
Discard
Author

Olá Axel, ls /dev/* shows me: agpgart loop6 sda1 tty22 tty55 ttyS3 autofs loop7 sda2 tty23 tty56 ttyS30 block mapper sda5 tty24 tty57 ttyS31 bsg mcelog sdb tty25 tty58 ttyS4 btrfs-control mem sdc tty26 tty59 ttyS5 bus memory_bandwidth sdd tty27 tty6 ttyS6 cdrom net sde tty28 tty60 ttyS7 char network_latency sg0 tty29 tty61 ttyS8 console network_throughput sg1 tty3 tty62 ttyS9 core null sg2 tty30 tty63 ttyprintk cpu port sg3 tty31 tty7 uhid cpu_dma_latency ppp sg4 tty32 tty8 uinput cuse psaux sg5 tty33 tty9 urandom disk ptmx shm tty34 ttyS0 usb dri pts snapshot tty35 ttyS1 vcs ecryptfs ram0 snd tty36 ttyS10 vcs1 fb0 ram1 sr0 tty37 ttyS11 vcs2 fd ram10 stderr tty38 ttyS12 vcs3 fd0 ram11 stdin tty39 ttyS13 vcs4 full ram12 stdout tty4 ttyS14 vcs5 fuse ram13 tty tty40 ttyS15 vcs6 hpet ram14 tty0 tty41 ttyS16 vcsa i2c-0 ram15 tty1 tty42 ttyS17 vcsa1 i2c-1 ram2 tty10 tty43 ttyS18 vcsa2 i2c-2 ram3 tty11 tty44 ttyS19 vcsa3 i2c-3 ram4 tty12 tty45 ttyS2 vcsa4 input ram5 tty13 tty46 ttyS20 vcsa5 kmsg ram6 tty14 tty47 ttyS21 vcsa6 log ram7 tty15 tty48 ttyS22 vfio loop-control ram8 tty16 tty49 ttyS23 vga_arbiter loop0 ram9 tty17 tty5 ttyS24 vhci loop1 random tty18 tty50 ttyS25 vhost-net loop2 rfkill tty19 tty51 ttyS26 zero loop3 rtc tty2 tty52 ttyS27 loop4 rtc0 tty20 tty53 ttyS28 loop5 sda tty21 tty54 ttyS29 which tty device should I be modifying?

Author

I found that the EPSON printer is /dev/lp0, added 777 permissions to it for the odoo user. I can use echo "test" > /dev/usb/lp0 and it prints fine, but hw_escpos still says "printer not found". I also added the printer to the supported_devices.py file in /odoo-server/addons/hw_escpos/escpos, but that didn't change anything. I'm at a loss for what I may be doing wrong.