Re: Linux USB-Serial and DSR flow control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 27, 2017 at 03:49:00AM +0200, Zaerc wrote:
> Thanks Johan!
> 
> TL;DR: I'm delighted to report that it *does* work with 4.12.0-rc7

I'm glad to hear that.

> Below I've tried to answer your questions best as I could, probably moot 
> now but it's the least I can do for wasting your time on something that 
> was already fixed.  And if you think it could be useful, I'd be more 
> then happy to send you one of my little boards (for testing or 
> whatever), they're intended as an alternative for FTDI cables.

Sure, thanks. I'll send you my address. I assume the firmware is free
software?

> On 2017-06-26 10:31, Johan Hovold wrote:
> > On Sun, Jun 25, 2017 at 08:44:02PM +0200, Zaerc wrote:
> >> Hello everyone,
> >> 
> >> Sorry to bother you, I'll try to keep it brief.  I am making an
> >> USB-serial adapter using an Atmel (Microchip) ATMega16u2 with a LUFA
> >> based firmware, which gives me a nice working ttyACM0 device.
> >> 
> >> However I am running into some trouble implementing DSR/DTR hardware
> >> flow control.  The DTR signal (output) can be set and cleared, no
> >> problem there.  The DSR signal (input) however does not seem to get
> >> reported back eventhough with usbmon I can see the device sending it 
> >> to
> >> the host.
> > 
> > Please provide the relevant bits from such a trace (e.g. an interrupt
> > message with some context).
> > 
> 
> I hope this is what you mean:
> 
> DSR ready (going low):
> 
> ffff98e6cfd6e900 435591757 C Ii:4:003:2 0:128 8 = a1200000 00000200
> ffff98e6cfd6e900 435591786 S Ii:4:003:2 -115:128 8 <
> ffff98e6cfd6e900 435623754 C Ii:4:003:2 0:128 2 = 0200
> ffff98e6cfd6e900 435623776 S Ii:4:003:2 -115:128 8 <
> 
> DSR not ready (going high):
> 
> ffff98e6cfd6e900 444007755 C Ii:4:003:2 0:128 8 = a1200000 00000200
> ffff98e6cfd6e900 444007778 S Ii:4:003:2 -115:128 8 <
> ffff98e6cfd6e900 444039758 C Ii:4:003:2 0:128 2 = 0000
> ffff98e6cfd6e900 444039779 S Ii:4:003:2 -115:128 8 <

Yes, this shows the notification being split up in two transfers (due to
the endpoint size of 8 bytes), something which wasn't supported by the
driver before 4.12.

> > Also what is the lsusb -v output for your device?

>      Interface Descriptor:
>        bLength                 9
>        bDescriptorType         4
>        bInterfaceNumber        0
>        bAlternateSetting       0
>        bNumEndpoints           1
>        bInterfaceClass         2 Communications
>        bInterfaceSubClass      2 Abstract (modem)
>        bInterfaceProtocol      1 AT-commands (v.25ter)
>        iInterface              0
>        CDC Header:
>          bcdCDC               1.10
>        CDC ACM:
>          bmCapabilities       0x06
>            sends break
>            line coding and serial state
>        CDC Union:
>          bMasterInterface        0
>          bSlaveInterface         1
>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x82  EP 2 IN
>          bmAttributes            3
>            Transfer Type            Interrupt
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0008  1x 8 bytes

So here's the source of the issue.

>          bInterval             255

> > Thanks,
> > Johan
> 
> No way, thank you and all the other developers for your hard work!

You're welcome.

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux