Go Down

Topic: DUE Native USB port never enumerates on Linux (Read 689 times) previous topic - next topic

carpysoft

I don't know what I'm doing wrong.  I've installed the latest Arduino IDE, the latest DUE Board software, and I'm trying the simplest of programs to use the SerialUSB over the Native USB...  and I'm doing this on Linux.

When I press ERASE/RESET, I get the USB to enumerate as it should:

Oct 12 22:58:35 box kernel: [131126.735259] usb 3-2: new high-speed USB device number 96 using xhci_hcd
Oct 12 22:58:35 box kernel: [131126.863810] usb 3-2: New USB device found, idVendor=03eb, idProduct=6124
Oct 12 22:58:35 box kernel: [131126.863815] usb 3-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Oct 12 22:58:35 box kernel: [131126.864378] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
Oct 12 22:59:14 box kernel: [131165.260038] usb 3-2: USB disconnect, device number 96


Once I flash the unit, unplug and replug in the Due, the serial port simply never enumerates:

Oct 12 22:59:14 box kernel: [131165.970599] usb 3-2: new high-speed USB device number 97 using xhci_hcd
Oct 12 22:59:20 box kernel: [131171.474530] usb 3-2: new high-speed USB device number 99 using xhci_hcd
Oct 12 22:59:25 box kernel: [131176.802568] usb 3-2: new high-speed USB device number 100 using xhci_hcd
Oct 12 22:59:31 box kernel: [131182.346500] usb 3-2: new high-speed USB device number 102 using xhci_hcd
Oct 12 22:59:36 box kernel: [131187.966484] usb 3-2: new high-speed USB device number 104 using xhci_hcd


I sniffed the USB traffic in Wireshark using the usbmon kernel module, and I see Linux requesting the DEVICE descriptor (which means it's showing up as a USB device) but the response is either nonexistent or really late and malformed.

Help?  What could I be doing wrong?  I've tried several sketches, but perhaps the simplest is this:

uint8_t counter;

void setup() {

  Serial.begin(115200);
  SerialUSB.begin(115200); // speed is irrelevant for native port
  counter = 0;
}

void loop() {

  Serial.print("Programming. Counter is at ");
  Serial.println( counter);

  SerialUSB.print("Native. Counter is at ");
  SerialUSB.println( counter);

  counter++;
  delay(500);
}
//stolen off the web

Thanks in advance.
Matt

carpysoft

I've tried this on two different DUE's.  It's not the board.  It's something in my build stack, configuration, or just me being catastrophically stupid (but consistently so).

I'm new to the DUE, but an old hack with AtMega Arduinos.

Thank you.

pjrc

Which version of the Arduino IDE are you using?

carpysoft


carpysoft

Wait...  I was just able to make it work... but it required that I plug in both ports.  Perhaps I'm seeing a power issue?  I don't get it.  How does everyone use Native USB?  How are you powering the board? 

And new I just plugged the DUE Native port into a desktop, and it powers correctly and enumerates, using only the Native USB port for power and USB. 

I'm confused.  Is the DUE not supposed to run off Laptop power?  I don't think my laptop is malfunctioning.

Go Up