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 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?
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html