On Mon, Feb 24, 2014 at 10:28:05AM +0100, Emanuel Koczwara wrote: > Hi, > > W dniu 24.02.2014 09:30, Johan Hovold pisze: > > On Mon, Feb 24, 2014 at 01:46:59AM +0100, Emanuel Koczwara wrote: > >> Hi, > >> > >> W dniu 23.02.2014 21:21, Johan Hovold pisze: > >>> You might need to mount debugfs: mount -t debugfs none > >>> /sys/kernel/debug and make sure your kernel is compiled with > >>> CONFIG_DYNAMIC_DEBUG (and CONFIG_DEBUG_FS) enabled. Johan -- To > >>> unsubscribe from this list: send the line "unsubscribe linux-usb" in > >>> the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info > >>> at http://vger.kernel.org/majordomo-info.html > >> Here is my debug output: http://nopaste.info/50a31e9ca7.html > >> > >> This is interesting: > >> > >> usb_serial_generic_read_bulk_callback - urb 0, len 2 > >> usb_serial_generic_read_bulk_callback - length = 2, data = 31 60 > >> > >> I'm getting this 31 60 as 1` when I read from /dev/ttyUSB0. > > Yes, that was expected. The printer is returning what appears to be empty > > status-messages every 110ms. I also wanted to make sure that all bulk > > data had this two-byte header. Is that also the case for /dev/ttyUSB1? > > Yes. > > > The printer has a serial interface as well? Which behaves exactly the > > same but does not return any "1`"? > > I will check it. I don't have a computer with rs232 at this moment. > > > I can write up a small driver which strips the header from incoming data > > for you to test, but it would be nice to know what the header actually > > is (and if it ever changes). There are no hints in the (Polish) manual? > > > What kind of header? Some low level bytes? Manual contains only > application level protocol description. There are 2 kinds of messages > incoming from the printer: 1) single byte status 2) message starting > with 0x1b 0x50 and it ends with 0x1b 0x5c. To recognize these 2 types of > messages I need that 0x1b 0x50 header. Yes, I meant the lower-level two-byte "1`" (0x31 0x60) that starts every bulk-in message. Hey, wait a minute. This looks like one of those ftdi_sio bulk-in headers: 0x31: DSR, CTS 0x60: Transmitter Empty, Transmitter Holding Register Empty This is likely an ftdi-device. Care to try the patch below? You probably also want to unset the low_latency-flag (e.g. using setserial) to avoid having the printer sending these status messages every millisecond when using the ftdi_driver. You can then increase the latency timer through sysfs to what appears to be your device's default of 110ms (or up to 255ms it seems): echo 110 >/sys/bus/usb-serial/devices/ttyUSB0/latency_timer Thanks, Johan >From 19e5289d621e062b8aa49a7c9dbaa7120f3d57dc Mon Sep 17 00:00:00 2001 From: Johan Hovold <jhovold@xxxxxxxxx> Date: Mon, 24 Feb 2014 11:20:15 +0100 Subject: [PATCH] USB: ftdi_sio: add support for NOVITUS Bono E thermal printer Add device id for NOVITUS Bono E thermal printer. --- drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index ee1f00f03c43..255f4756c08d 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -735,6 +735,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, + { USB_DEVICE(NOVITUS_VID, NOVITUS_BONO_E_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_S03_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_59_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_USB_57A_PID) }, diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 1e2d369df86e..049c1d75ea30 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h @@ -820,6 +820,12 @@ #define TELLDUS_TELLSTICK_PID 0x0C30 /* RF control dongle 433 MHz using FT232RL */ /* + * NOVITUS printers + */ +#define NOVITUS_VID 0x1a28 +#define NOVITUS_BONO_E_PID 0x6010 + +/* * RT Systems programming cables for various ham radios */ #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html