Page 1 of 1

Reading a signal USB port only

Posted: Thu Oct 17, 2019 2:02 pm
by exile
Hi,

I'd like to read from a printer which is sending a usb signal and use it on the RPi3 with a Python script.

My printer is connected directly on the RPi3 on usb and I don't want to use Serial USB Converter.

Thanks for help

Best regards

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 9:06 am
by topguy
I'd like to read from a printer which is sending a usb signal and use it on the RPi3 with a Python script.
You should give more details about the printer, doing low-level USB communication is not easy.
What does the Pi say then you connect the printer with USB ? ( plug the printer in after boot and look at the last lines of the output from "dmesg" command )

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 9:34 am
by exile
Printer is CITIZEN S651.

When I connect the PI to printer, dmesg command say :

[ 206.952462] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[ 207.085926] usb 1-1.5: New USB device found, idVendor=1d90, idProduct=2028
[ 207.085944] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 207.085953] usb 1-1.5: Product: Thermal Printer
[ 207.085961] usb 1-1.5: Manufacturer: CITIZEN
[ 207.085972] usb 1-1.5: SerialNumber: 00000000
[ 207.132202] usblp 1-1.5:1.0: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x1D90 pid 0x2028
[ 207.133219] usbcore: registered new interface driver usblp
[ 208.736322] usblp0: removed
[ 208.743752] usblp 1-1.5:1.0: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x1D90 pid 0x2028
[ 208.757016] usblp0: removed

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 12:57 pm
by topguy
Its a little bit worrying that it reports:

Code: Select all

[ 208.736322] usblp0: removed
[ 208.743752] usblp 1-1.5:1.0: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x1D90 pid 0x2028
[ 208.757016] usblp0: removed
I'm assuming that you didnt yank the cable out again after inserting it..
Its interesting to run the "lsusb" command and "ls -l /dev/usblp*" to see if its still logically connected to the Pi.

I'd like to read from a printer which is sending a usb signal and use it on the RPi3 with a Python script.
But Ideally when the device is connected, you can read whatever the printer sends from "/dev/usblp0"
But since its a printer I would assume you would be more concerned with writing to it...

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 1:13 pm
by exile
Thanks for reply,

lsusb command :

Code: Select all

Bus 001 Device 007: ID 1d90:2028
Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls -l /dev/usblp* command :

Code: Select all

pi@raspberrypi:/BorneJeu $ ls -l /dev/usblp*
ls: impossible d'accéder à /dev/usblp*: Aucun fichier ou dossier de ce type
And I'm more concerned with read information from printer. The CITIZEN printer can detect end of paper and I need to retrieve this.

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 1:49 pm
by DougieLawson
The Linux kernel can't find a device driver for your Citizen 1d90:2028 device. So it may not be supported on ANY Linux systems ARM, AMD or Intel based.

Re: Reading a signal USB port only

Posted: Fri Oct 18, 2019 1:59 pm
by fruitoftheloom
exile wrote:
Fri Oct 18, 2019 1:13 pm
Thanks for reply,

lsusb command :

Code: Select all

Bus 001 Device 007: ID 1d90:2028
Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls -l /dev/usblp* command :

Code: Select all

pi@raspberrypi:/BorneJeu $ ls -l /dev/usblp*
ls: impossible d'accéder à /dev/usblp*: Aucun fichier ou dossier de ce type
And I'm more concerned with read information from printer. The CITIZEN printer can detect end of paper and I need to retrieve this.

If it is a CT-S651, Citizen list a driver:

https://www.citizen-systems.co.jp/engli ... index.html