Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-03-12 Thread Emanuel Koczwara
Hi,

Dnia 2014-03-12, śro o godzinie 19:50 +0100, Johan Hovold pisze:
 On Mon, Feb 24, 2014 at 11:43:35AM +0100, Emanuel Koczwara wrote:
  W dniu 24.02.2014 11:25, Johan Hovold pisze:
 
This is likely an ftdi-device. Care to try the patch below?
  
 Thanks, I'll try.
 
 Have you tested the patch I sent? How did it go?
 
 As a quick test (which does not require rebuilding your kernel) you can
 just use sysfs to add the VID/PID to the ftdi_sio driver on a running
 system:
 
   echo 1a28 6010 /sys/bus/usb-serial/drivers/ftdi_sio/new_id
 
 Thanks,
 Johan

  Yes, it works. The device is recognized. I'm waiting for detailed
informations and logs, I'll post them here (I don't have the device
anymore). Thank you for your interest.

Regards,
Emanuel


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-24 Thread Emanuel Koczwara

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 majord...@vger.kernel.org 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.


Thanks,
Emanuel


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-24 Thread Emanuel Koczwara

Hi,

W dniu 24.02.2014 11:25, Johan Hovold pisze:
 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 majord...@vger.kernel.org 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?

  Thanks, I'll try.


 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


  Ok.

Thanks,
Emanuel

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-23 Thread Emanuel Koczwara

Hi,

W dniu 18.02.2014 10:36, Johan Hovold pisze:

On Sun, Feb 16, 2014 at 12:35:06PM +0100, Emanuel Koczwara wrote:

Hi,

I have a device (thermal printer) which communicates through rs232. It
has also usb adapter/converter build-in.

root@emanuel-laptop:/home/emanuel# lsusb
Bus 004 Device 004: ID 8086:0189 Intel Corp.
Bus 004 Device 008: ID 1a28:6010 -- here

Who is the manufacturer and what is the model?


http://www.novitus.pl/pl/produkty/systemy-fiskalne/bono-e.html

It is a fiscal printer used in Poland produced by NOVITUS. I have BONO E 
1.10.





Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0458:003a KYE Systems Corp. (Mouse Systems)
NetScroll+ Mini Traveler / Genius NetScroll 120
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 05ca:181f Ricoh Co., Ltd
Bus 001 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011
Fingerprint Reader
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@emanuel-laptop:/home/emanuel# lsusb -d 1a28:6010 -v
Bus 004 Device 008: ID 1a28:6010
Device Descriptor:
bLength18
bDescriptorType 1
bcdUSB   2.00
bDeviceClass0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor   0x1a28
idProduct  0x6010
bcdDevice5.00
iManufacturer   4 (error)
iProduct   14 (error)
iSerial 0
bNumConfigurations  1
Configuration Descriptor:
  bLength 9
  bDescriptorType 2
  wTotalLength   55
  bNumInterfaces  2
  bConfigurationValue 1
  iConfiguration  0
  bmAttributes 0x80
(Bus Powered)
  MaxPower   90mA
  Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber0
bAlternateSetting   0
bNumEndpoints   2
bInterfaceClass   255 Vendor Specific Class
bInterfaceSubClass255 Vendor Specific Subclass
bInterfaceProtocol255 Vendor Specific Protocol
iInterface 14 (error)
Endpoint Descriptor:
  bLength 7
  bDescriptorType 5
  bEndpointAddress 0x81  EP 1 IN
  bmAttributes2
Transfer TypeBulk
Synch Type   None
Usage Type   Data
  wMaxPacketSize 0x0040  1x 64 bytes
  bInterval   0
Endpoint Descriptor:
  bLength 7
  bDescriptorType 5
  bEndpointAddress 0x02  EP 2 OUT
  bmAttributes2
Transfer TypeBulk
Synch Type   None
Usage Type   Data
  wMaxPacketSize 0x0040  1x 64 bytes
  bInterval   0
  Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber1
bAlternateSetting   0
bNumEndpoints   2
bInterfaceClass   255 Vendor Specific Class
bInterfaceSubClass255 Vendor Specific Subclass
bInterfaceProtocol255 Vendor Specific Protocol
iInterface 14 (error)
Endpoint Descriptor:
  bLength 7
  bDescriptorType 5
  bEndpointAddress 0x83  EP 3 IN
  bmAttributes2
Transfer TypeBulk
Synch Type   None
Usage Type   Data
  wMaxPacketSize 0x0040  1x 64 bytes
  bInterval   0
Endpoint Descriptor:
  bLength 7
  bDescriptorType 5
  bEndpointAddress 0x04  EP 4 OUT
  bmAttributes2
Transfer TypeBulk
Synch Type   None
Usage Type   Data
  wMaxPacketSize 0x0040  1x 64 bytes
  bInterval   0
Device Status: 0x0001
Self Powered

After 'modprobe usbserial vendor=0x1a28 product=0x6010' the device is
working, /dev/ttyUSB0 pops out. I can read and write to /dev/ttyUSB0 and
it responds.

[34449.932999] usb 4-1.3: new full-speed USB device number 8 using ehci-pci
[34450.029508] usb 4-1.3: string descriptor 0 read error: -32
[34450.029521] usb 4-1.3: New USB device found, idVendor=1a28,
idProduct=6010
[34450.029526] usb 4-1.3: New USB device strings: Mfr=4, Product=14,
SerialNumber=0

Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-23 Thread Emanuel Koczwara

Hi,

W dniu 23.02.2014 18:58, Johan Hovold pisze:
Perhaps the printer is sending some status bytes that we shouldn't 
pass to user space. Could you provide a log from when you send a 
command and get a response while running with debugging enabled? You 
can enable debugging with echo module usbserial +p 
/sys/kernel/debug/dynamic_debug/control 


root@emanuel-laptop:/home/emanuel# echo module usbserial +p  
/sys/kernel/debug/dynamic_debug/control

bash: /sys/kernel/debug/dynamic_debug/control: No such file or directory

How can I enable it?

Thanks,
Emanuel
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-23 Thread Emanuel Koczwara

Hi,

W dniu 23.02.2014 21:10, Emanuel Koczwara pisze:

Hi,

W dniu 23.02.2014 18:58, Johan Hovold pisze:
Perhaps the printer is sending some status bytes that we shouldn't 
pass to user space. Could you provide a log from when you send a 
command and get a response while running with debugging enabled? You 
can enable debugging with echo module usbserial +p 
/sys/kernel/debug/dynamic_debug/control 


root@emanuel-laptop:/home/emanuel# echo module usbserial +p  
/sys/kernel/debug/dynamic_debug/control

bash: /sys/kernel/debug/dynamic_debug/control: No such file or directory



It looks like I need to enable CONFIG_DYNAMIC_DEBUG in my kernel first. 
This will take a while.


Thanks,
Emanuel

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-23 Thread Emanuel Koczwara

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 majord...@vger.kernel.org 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.

Thanks,
Emanuel

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


usbserial_generic, idVendor=1a28, idProduct=6010

2014-02-16 Thread Emanuel Koczwara

Hi,

I have a device (thermal printer) which communicates through rs232. It 
has also usb adapter/converter build-in.


root@emanuel-laptop:/home/emanuel# lsusb
Bus 004 Device 004: ID 8086:0189 Intel Corp.
Bus 004 Device 008: ID 1a28:6010 -- here
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 0458:003a KYE Systems Corp. (Mouse Systems) 
NetScroll+ Mini Traveler / Genius NetScroll 120

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 05ca:181f Ricoh Co., Ltd
Bus 001 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 
Fingerprint Reader

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@emanuel-laptop:/home/emanuel# lsusb -d 1a28:6010 -v
Bus 004 Device 008: ID 1a28:6010
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor   0x1a28
  idProduct  0x6010
  bcdDevice5.00
  iManufacturer   4 (error)
  iProduct   14 (error)
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   55
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0
bmAttributes 0x80
  (Bus Powered)
MaxPower   90mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface 14 (error)
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber1
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface 14 (error)
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83  EP 3 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04  EP 4 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   0
Device Status: 0x0001
  Self Powered

After 'modprobe usbserial vendor=0x1a28 product=0x6010' the device is 
working, /dev/ttyUSB0 pops out. I can read and write to /dev/ttyUSB0 and 
it responds.


[34449.932999] usb 4-1.3: new full-speed USB device number 8 using ehci-pci
[34450.029508] usb 4-1.3: string descriptor 0 read error: -32
[34450.029521] usb 4-1.3: New USB device found, idVendor=1a28, 
idProduct=6010
[34450.029526] usb 4-1.3: New USB device strings: Mfr=4, Product=14, 
SerialNumber=0
[34450.029927] usbserial_generic 4-1.3:1.0: The generic usb-serial 
driver is only for testing and one-off prototypes.
[34450.029932] usbserial_generic 4-1.3:1.0: Tell 
linux-usb@vger.kernel.orgto add your device to a proper driver.

[34450.029936] usbserial_generic 4-1.3:1.0: generic converter detected
[34450.030331] usb 4-1.3: generic converter now attached to ttyUSB0
[34450.030410] usbserial_generic 4-1.3:1.1: The generic usb-serial 
driver is only for testing and