Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Teensy 4.1 USB host ERROR Followup

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    15

    Teensy 4.1 USB host ERROR Followup

    Hi,
    I have an enumeration issue when I plug a Boss Katana amplifier to the USB host of my Teensy 4.1

    Code:
    USB2 PLL running
     reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Ready
    port change: 14001403
        connect
      begin reset
    port change: 14001005
      port enabled
      end recovery
    new_Device: 1.5 Mbit/sec
    new_Pipe
    ERROR Followup
        remove from followup list
        stray halted 200034C0
      qtd: 20003480, token=80080180, next=200034C0
      qtd: 200034C0, token=80008080, next=20003500
      dummy halt: 20003500
    enumeration:
        remain on followup list
        remain on followup list
        remain on followup list
    Here's some info from Linux on this device :
    Code:
    [  167.356085] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
    [  167.488353] usb 1-1.3: New USB device found, idVendor=0582, idProduct=01d8, bcdDevice= 0.00
    [  167.488439] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  167.488465] usb 1-1.3: Product: KATANA
    [  167.488487] usb 1-1.3: Manufacturer: BOSS
    
    pi@raspberrypi:~ $ lsusb -v -d 0582:01d8
    Bus 001 Device 005: ID 0582:01d8 Roland Corp.
    Couldn't open device, some information will be missing
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass          255 Vendor Specific Class
      bDeviceSubClass         0
      bDeviceProtocol       255
      bMaxPacketSize0        64
      idVendor           0x0582 Roland Corp.
      idProduct          0x01d8
      bcdDevice            0.00
      iManufacturer           1
      iProduct                2
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x00bc
        bNumInterfaces          4
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xc0
          Self Powered
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           0
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass    255 Vendor Specific Subclass
          bInterfaceProtocol      0
          iInterface              0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           0
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      2
          bInterfaceProtocol      2
          iInterface              0
          ** UNRECOGNIZED:  06 24 f1 01 00 00
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       1
          bNumEndpoints           1
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      2
          bInterfaceProtocol      2
          iInterface              0
          ** UNRECOGNIZED:  07 24 01 01 00 01 00
          ** UNRECOGNIZED:  0b 24 02 01 04 04 18 01 44 ac 00
          ** UNRECOGNIZED:  06 24 f1 04 16 00
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x0d  EP 13 OUT
            bmAttributes            5
              Transfer Type            Isochronous
              Synch Type               Asynchronous
              Usage Type               Data
            wMaxPacketSize     0x0070  1x 112 bytes
            bInterval               1
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       0
          bNumEndpoints           0
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      2
          bInterfaceProtocol      1
          iInterface              0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       1
          bNumEndpoints           1
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      2
          bInterfaceProtocol      1
          iInterface              0
          ** UNRECOGNIZED:  07 24 01 07 00 01 00
          ** UNRECOGNIZED:  0b 24 02 01 04 04 18 01 44 ac 00
          ** UNRECOGNIZED:  06 24 f1 04 16 00
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x8e  EP 14 IN
            bmAttributes           37
              Transfer Type            Isochronous
              Synch Type               Asynchronous
              Usage Type               Implicit feedback Data
            wMaxPacketSize     0x0070  1x 112 bytes
            bInterval               1
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        3
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      3
          bInterfaceProtocol      0
          iInterface              0
          ** UNRECOGNIZED:  06 24 f1 02 03 03
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        3
          bAlternateSetting       1
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      3
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               4
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x85  EP 5 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               4
    I know this is not class compliant, I'll be dealing with that later, for now I just want Teensy to enumerate it correctly before I work on a custom driver for it.

    What could be causing this "ERROR Followup", and where should I look to debug this ? Is there more debug print in the library I can enable to get more details on this ?


    Thanks

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,658
    Looks like everything about this USB device is vendor specific...

    You already turned on the main debug output code.

    But: many of the source files have debug code commented out. As being too verbose...

    If it were me, I would probably go into enumeration.cpp And uncomment the few that are there...

    Likewise in ehci.cpp especially when that file has the print for ERROR Followup.

    Also what sketch are you running? Which USB devices have you added? Reason I ask is if none are added maybe there are not any resources like transfers and the like that can be allocated?

    I would probably go into: USBHost::new_Device and add some more prints to see where it is erroring out?
    And then localize down to what is failing.

  3. #3
    Junior Member
    Join Date
    Jul 2020
    Posts
    15
    Thanks for the advice, I'll give that a go.

    Here's the code I use :
    Code:
    #include "USBHost_t36.h"
    
    USBHost myusb;
    USBHub hub1(myusb);
    USBHub hub2(myusb);
    MIDIDevice midi1(myusb);
    
    void setup() {
      Serial.begin(115200);
      delay(1500);
      myusb.begin();
      Serial.println("Ready");
    }
    
    void loop() {
      myusb.Task();
      midi1.read();
    }
    I noticed that I get different results with different cables.

    One cable gives me :
    Code:
    USB2 PLL running
    begin ehci reset reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Ready
    port change: 10001803
        connect
    timer0
      begin reset
    port change: 10001005
      port enabled
    timer0
      end recovery
    new_Device: 12 Mbit/sec
    new_Pipe
      first in async list
    new_Control_Transfer
    setup address 200033B0
    Transfer Followup List 20003540 to 200034C0
        forward:
        20003540 OUT 0
        20003480 IN 8
        200034C0 OUT 0
        backward:
        200034C0 OUT 0
        20003480 IN 8
        20003540 OUT 0
    While 2 other cables give me :
    Code:
    USB2 PLL running
    begin ehci reset reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Ready
    port change: 14001403
        connect
    timer0
      begin reset
    port change: 14001005
      port enabled
    timer0
      end recovery
    new_Device: 1.5 Mbit/sec
    new_Pipe
      first in async list
    new_Control_Transfer
    setup address 200033B0
    Transfer Followup List 20003540 to 200034C0
        forward:
        20003540 OUT 0
        20003480 IN 8
        200034C0 OUT 0
        backward:
        200034C0 OUT 0
        20003480 IN 8
        20003540 OUT 0
    ERROR Followup
      Followup 20003540    token=80259
        completed
        remove from followup list
        stray halted 200034C0
      qtd: 20003480, token=80080180, next=200034C0
      qtd: 200034C0, token=80008080, next=20003500
      dummy halt: 20003500
    enumeration:
    00 00 00 00 00 00 00 00 
    Transfer @ 200034C0
       next:  20003500
       anext: 1
       token: 800080C0
       bufs:  0,1000,2000,3000,4000
    new_Control_Transfer
    setup address 200033B0
    Transfer Followup List 20003500 to 200022E0
        forward:
        20003500 OUT 0
        200022E0 IN 0
        backward:
        200022E0 IN 0
        20003500 OUT 0
      Followup 20003480    token=80080180
        remain on followup list
      Followup 20003500    token=80280
        remain on followup list
      Followup 200022E0    token=80008180
        remain on followup list
    I suspect that the first cable is bad, but let me know what you think.

    I'll add some more debug print in the library and keep you posted.
    Last edited by Xantra; 09-17-2020 at 03:05 PM.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,658
    I am not sure if it would help much, but I do have a sketch I posted about yesterday (with a PR to add to hopefully next release of Teensyduino), that prints out a lot of information about device when plugged in. Mainly for HID devices, but some of the top level stuff might be useful. And would at least see if it enumerates the devices properly...

    You might try running it and see if it at least shows the enumeration being called and if it makes it to enumeration of Interfaces...
    Attached Files Attached Files

  5. #5
    Junior Member
    Join Date
    Jul 2020
    Posts
    15
    Sweet, thanks, unfortunately it doesn't print anything when I plug the device in, so as I suspected I'm not completing enumeration at all. It will be handy later though once I solved the enumeration issue.

  6. #6
    Junior Member
    Join Date
    Jul 2020
    Posts
    15
    Right, I think I found the problem, I'm an idiot. I soldered my usb socket back to front... Good thing I didn't blow up the Teensy nor the Amp .
    I now have enumeration :
    Code:
    USB2 PLL running
     reset waited 6
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 20003000
    periodictable = 20003000
    Ready
    port change: 10001803
        connect
      begin reset
    port change: 18001205
      port enabled
      end recovery
    new_Device: 480 Mbit/sec
    new_Pipe
    enumeration:
    enumeration:
    enumeration:
    Device Descriptor:
      12 01 00 02 FF 00 FF 40 82 05 D8 01 00 00 01 02 00 01 
        VendorID = 0582, ProductID = 01D8, Version = 0000
        Class/Subclass/Protocol = 255 / 0 / 255
        Number of Configurations = 1
    enumeration:
    enumeration:
    Manufacturer: BOSS
    enumeration:
    Product: KATANA
    enumeration:
    Config data length = 188
    enumeration:
    Configuration Descriptor:
      09 02 BC 00 04 01 00 C0 00 
        NumInterfaces = 4
        ConfigurationValue = 1
      09 04 00 00 00 FF FF 00 00 
        Interface = 0
        Number of endpoints = 0
        Class/Subclass/Protocol = 255 / 255 / 0
      09 04 01 00 00 FF 02 02 00 
        Interface = 1
        Number of endpoints = 0
        Class/Subclass/Protocol = 255 / 2 / 2
      06 24 F1 01 00 00 
      09 04 01 01 01 FF 02 02 00 
        Interface = 1
        Number of endpoints = 1
        Class/Subclass/Protocol = 255 / 2 / 2
      07 24 01 01 00 01 00 
      0B 24 02 01 04 04 18 01 44 AC 00 
      06 24 F1 04 16 00 
      07 05 0D 05 70 00 01 
        Endpoint = 13 OUT
        Type = Isochronous
        Max Size = 112
        Polling Interval = 1
      07 25 01 00 00 00 00 
      09 04 02 00 00 FF 02 01 00 
        Interface = 2
        Number of endpoints = 0
        Class/Subclass/Protocol = 255 / 2 / 1
      09 04 02 01 01 FF 02 01 00 
        Interface = 2
        Number of endpoints = 1
        Class/Subclass/Protocol = 255 / 2 / 1
      07 24 01 07 00 01 00 
      0B 24 02 01 04 04 18 01 44 AC 00 
      06 24 F1 04 16 00 
      07 05 8E 25 70 00 01 
        Endpoint = 14 IN
        Type = Isochronous
        Max Size = 112
        Polling Interval = 1
      07 25 01 00 00 00 00 
      09 04 03 00 02 FF 03 00 00 
        Interface = 3
        Number of endpoints = 2
        Class/Subclass/Protocol = 255 / 3 / 0
      06 24 F1 02 03 03 
      07 05 03 02 00 02 01 
        Endpoint = 3 OUT
        Type = Bulk
        Max Size = 512
        Polling Interval = 1
      07 05 84 02 00 02 00 
        Endpoint = 4 IN
        Type = Bulk
        Max Size = 512
        Polling Interval = 0
      09 04 03 01 02 FF 03 00 00 
        Interface = 3
        Number of endpoints = 2
        Class/Subclass/Protocol = 255 / 3 / 0
      07 05 03 03 00 02 04 
        Endpoint = 3 OUT
        Type = Interrupt
        Max Size = 512
        Polling Interval = 4
      07 05 85 03 00 02 04 
        Endpoint = 5 IN
        Type = Interrupt
        Max Size = 512
        Polling Interval = 4
    enumeration:
    USBHub memory usage = 960
    USBHub claim_device this=200023A0
    USBHub memory usage = 960
    USBHub claim_device this=20002760
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 179
      Interface is unknown (might be Yahama)
    type: 4, len: 9
    This interface is not MIDI
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 170
      Interface is unknown (might be Yahama)
    type: 36, len: 6
        Unknown MIDI CS_INTERFACE descriptor!
    Descriptor 36 =  ???
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 155
      Interface is unknown (might be Yahama)
    type: 36, len: 7
        MIDI Header (ignored)
    type: 36, len: 11
        MIDI IN Jack (ignored)
    type: 36, len: 6
        Unknown MIDI CS_INTERFACE descriptor!
    Descriptor 36 =  ???
    Descriptor 36 =  ???
    Descriptor 36 =  ???
    Descriptor 5 = ENDPOINT
    Descriptor 37 =  ???
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 108
      Interface is unknown (might be Yahama)
    type: 4, len: 9
    This interface is not MIDI
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 99
      Interface is unknown (might be Yahama)
    type: 36, len: 7
        MIDI Header (ignored)
    type: 36, len: 11
        MIDI IN Jack (ignored)
    type: 36, len: 6
        Unknown MIDI CS_INTERFACE descriptor!
    Descriptor 36 =  ???
    Descriptor 36 =  ???
    Descriptor 36 =  ???
    Descriptor 5 = ENDPOINT
    Descriptor 37 =  ???
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 52
      Interface is unknown (might be Yahama)
    type: 36, len: 6
        Roland vendor-specific (ignored)
    type: 5, len: 7
        MIDI Endpoint: 3
          tx_size = 512
    type: 5, len: 7
        MIDI Endpoint: 84
          rx_size = 512
    type: 4, len: 9
    Descriptor 36 =  ???
    Descriptor 5 = ENDPOINT
    Descriptor 5 = ENDPOINT
    Descriptor 4 = INTERFACE
    MIDIDevice claim this=20001CC0
    len = 23
      Interface is unknown (might be Yahama)
    type: 5, len: 7
        MIDI Endpoint: 3
          tx_size = 512
    type: 5, len: 7
        MIDI Endpoint: 85
          rx_size = 512
    This interface is not MIDI
    Descriptor 5 = ENDPOINT
    Descriptor 5 = ENDPOINT
    I will now be working on a MIDI driver for this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •