Am 28.10.2010 17:33, schrieb Greg KH: > On Thu, Oct 28, 2010 at 03:54:00PM +0200, Sven KÃhler wrote: >> Hi, >> >> recently, I noticed that I wasn't able to flash my Lego NXT brick >> anymore. As soon as the device is plugged in, cdc_acm claims the usb >> device and provides a ttyACM*-device. >> >> Now I could rewrite some bits of our software and use the ttyACM*-device >> to talk to the NXT. But this seems wrong to more for several reasons: >> >> If the Lego NXT is in firmware update mode, the SAM-BA program is run by >> the arm CPU. It's part of the CPU, non-changeable, and it doesn't >> understand any AT commands at all. So it is not a modem, and as far as I >> understand, the policy is that device should be blacklisted. > > Then why is it showing up to the host as a cdc-acm device? Is it lying? > If so, why? It seems like someone went through a lot of work to get it > to look like a cdc-acm device, why not operate it that way? Attached you find the output of lsusb for the device. Yes, it does claim to be a CDC device. In dmesg, cdc_acm correctly remarks that this device is not a modem. But out of interest, I would like to investigate the reason for why cdc_acm now claims that device. It definitely didn't do so in the past. I tested a livecd with kernel 2.6.32. cdc_acm was showing no interest in that device. The decision, whether cdc_acm claims a device, is made in drivers/usb/class/cdc_acm.c, right? Is anybody aware of changes that caused this change in behaviour of cdc_acm? I can confirm, that the device works. I had too trick the official Atmel SAM-BA software into using a ttyACM* device (it only looks for ttyUSB* devices) but everything seemed to work fine. (Except that modem-manager was probing the device) Regards, Sven
Bus 002 Device 007: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x03eb Atmel Corp. idProduct 0x6124 at91sam SAMBA bootloader bcdDevice 1.10 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 67 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 None iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x00 CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Call Management: bmCapabilities 0x00 bDataInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 255 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered)
Attachment:
signature.asc
Description: OpenPGP digital signature