kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Mar 08, 2020 12:15 am

Neither my Espotek Labrador board nor my Hantek 6022BL work on my up-to-date RPi4 (4GBRAM). The Labrador, at least, works fine on my 3B+. I have this from Chris Esposito of Espotek:

There is a known bug in the Linux kernel on the Raspberry Pi 4 that prevents Isochronous 12 Mbit/s devices that request greater than 450-ish kB/s of bandwidth from being detected. This affects the Labrador too, unfortunately.

https://github.com/EspoTek/Labrador/issues/93
https://github.com/raspberrypi/linux/issues/3136

There is also an issue open on the OpenHantek6022 Github:

https://github.com/OpenHantek/OpenHantek6022/issues/28

Does anyone know of a workaround or a kernel update in-the-making? I'm simply not developer enough to tackle this one. TIA

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Fri Apr 17, 2020 6:24 pm

Sorry, no help from me, but I ran into the same issue with my new Pi 4 under Buster (stable 4.19.97-v7l+ kernel).
I also tried the new 4.19.115-v7l+, but still the same libusb_claim_interface FAILED.

But my Labrador board also does not run smoothly on my older Pi 3B+ under Buster. I get errors with number -9:
unixUsbDriver::usbSendControl FAILED with error LIBUSB_ERROR_PIPE. After the errors start the UI gets all confused. 
Is your Pi 3 running Buster? I have not tried going back to Stretch.

On my MacBook Pro and my Win10 laptop the Labrador board and software run great.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 1:46 am

Yes, my Pi3B+ is running up2date Raspian Buster, and the Lab runs well on it. It has occasional hiccups, lags a bit sometimes like it needed a half-minute to catch its breath or something like that, but it's a useful tool rather than a quirky experiment. Do you perhaps have another USB device competing with the Labrador for bandwidth? The Pi3 has only USB2.

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 3:59 pm

I had the VNC server enabled and even though there was no connection (even no cable plugged in nor WiFi enabled) I was getting error -9.
Once I turned off the VNC server things looked good and stable, but as soon as I enabled WiFi error -9 was back and things went haywire.

I think there should be a note next to the Raspbian download link. That would have saved me some time. I will send Chris a note.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 5:59 pm

I've never fooled with VNC, but I always have wi-fi going. Do you have any other unusual servers or such running? Special services?

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 7:14 pm

I also had the SSH server running. Connecting to WiFi apparently woke it up and caused trouble.
Now with all interfaces disabled (except I2C for the RTC) I can even use the mouse's scroll wheel to change the display range of the Labrador display.

Would you know of a way to make the preferences stick?

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 11:02 pm

If you mean preferences as to range of the display, no, sorry I don't. AFAIK the GUI always opens to the same settings.

Reckon I need to check all my services and interfaces on my Pi4 to see if disabling them will allow the Labrador to work on it.

plugwash
Forum Moderator
Forum Moderator
Posts: 3766
Joined: Wed Dec 28, 2011 11:45 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 11:08 pm

A possible workaround might be to run the scope off the "old" USB controller, which is available on the USB C connector. IIRC you have to force it into host mode and you will have to rig up something to provide power but other than that it should be the same old controller you have used on the older Pi models.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat Apr 18, 2020 11:52 pm

Certainly worth investigating, thanks for the input! Any idea where I might look into forcing host mode?

plugwash
Forum Moderator
Forum Moderator
Posts: 3766
Joined: Wed Dec 28, 2011 11:45 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Apr 19, 2020 2:32 pm

According to viewtopic.php?t=246348 you need to add "dtoverlay=dwc2,dr_mode=host" to config.txt

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Apr 19, 2020 2:40 pm

How to put the USB-C hub into host mode is described here: viewtopic.php?t=246348.

So I powered my RPi 4 via the GPIO pins, added "dtoverlay=dwc2,dr_mode=host" to /boot/config.txt and rebooted.
The hub shows up now with lsusb -t and I can connect the Labrador board there! I am using a USB-A to USB-C adapter.
And no errors so far, even with the browser open!

The only issue I have encountered is that there are spurious spikes on CH2 reporting the CH1 voltage even though I have CH2 grounded. They happen at full milliseconds. That must be a software bug, probably related to https://github.com/EspoTek/Labrador/issues/98
Last edited by sibir on Tue May 05, 2020 2:40 am, edited 2 times in total.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Apr 19, 2020 4:40 pm

Wow! I was just asking for a direction to look, and here you guys went and discovered the fountain of youth for me! Well, almost. My power situation will be a bit more complicated as my GPIO pins are taken up already by a case fan but I'll find some workaround for that. Thanks guys! I'll send a link to Chris Esposito, I'm sure he'll want to be aware of this.

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Apr 19, 2020 5:17 pm

My first hope was to use a power-through USB-C hub with USB-A ports. However, the one I have (VAVA VA-UC006) does not even register as a hub ( works fine on Mac and Dell) and also did not send the power through. But my RPi 4 is first gen, missing the 2nd resistor. Maybe it would work on the newer ones?

I wish the Espotek website had a forum on its own or the GitHub WiKi would be editable. (it is now!)
Last edited by sibir on Tue May 05, 2020 2:41 am, edited 1 time in total.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun Apr 26, 2020 10:05 pm

Yay, it works! After thinking of how we used to power the 1st-gen Pi with a cheap USB hub, not one with extra circuits for switching or overload protection, I thought I'd try this with a USB-C hub with a USB-C power delivery port, just hook the power to the "delivery" port. All plug-and-play and it worked fine (of course after enabling host mode as above). I used an iTeknic IK-UC003, US$15.99 from Amazon.
2020-04-25-161512_1920x1080_scrotSmall.png.jpg
2020-04-25-161512_1920x1080_scrotSmall.png.jpg (53.12 KiB) Viewed 3842 times
As you can see, there is still a problem with spurious spikes. @sibir has also let me know in a PM that he has the same, which makes it unlikely that it's a power supply problem, but I intend to try to run it off a battery anyway just to make sure. That means waiting for another package from Amazon; I guess that's why they call us hobbyists, you couldn't run a business this way for long! But while this is annoying, it doesn't seem to affect the operation. So assuming the problem remains under battery power, I intend to try another 'scope on the same hub (I should be able to run my LHT00SU1 on PulseView on the Pi) and go from there.
Whatever happens from here, I'd like to thank @sibir and @plugwash for their help!

Kevin

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Wed Apr 29, 2020 1:25 pm

As I mentioned, my power-through USB-C hub did not work and I wonder if the problem is the bad USB-C circuit of the Rev 1.1 RPi 4s, which shows the RPi 4 as an audio dongle to the USB-C port. (If you have lived under a rock see viewtopic.php?t=249975)
Kevin, is your RPi 4 newer with the corrected circuit? Mine is Rev 1.1 per cat /proc/cpuinfo

On the other subject: I only see single voltage values to be wrong and they are always on the full ms (trigger off). In the pcap-file it looks like these are always the last value in a 1 ms data frame. Attached are 2 examples:
ADC-ms-bug-0.png
ADC-ms-bug-0.png (32.01 KiB) Viewed 3784 times
2020-04-20-155643.png
2020-04-20-155643.png (21.78 KiB) Viewed 3784 times

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Fri May 01, 2020 9:34 pm

Yes, mine is also v1.1. I still have the spurious spikes, as I like to call them, running on battery. Mine are somewhat different from yours, though; most seem random, but I have one every 4ms. This of course plays hell if you try to set a trigger. I don't have any experience with 'scopes and digital systems, but it occurs to me--could we be looking at a serial data stream laid across or on top of our actual data?

Also, all mine are positive, no negative spikes at all.

Sorry about the pic, I need to get used to resizing pics on the Pi. I'll try to get another, I screwed this one up!
Attachments
2020-05-01-135853_1920x1080_scrot.png
2020-05-01-135853_1920x1080_scrot.png (214.35 KiB) Viewed 3758 times

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Fri May 01, 2020 10:53 pm

Hmm, also Rev 1.1 but the USB-C hub feeds through the power and attaches the Labrador. I have to get me one of those. My USB-C hub (VAVA) is fancier and does not work with my RPi.

Your bad voltages do look different from mine. My initial hope was a bug in the UI software. So I captured the USB data and plotted them myself. Since I still saw spurious voltages I figured the problem must be with the board and not the UI software.

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sat May 02, 2020 1:33 am

Well, I don't see the problem on my Pi3b+, using the same Labrador board. It's altogether too possible that the two simply aren't compatible. Maybe the Pi4 lacks a filter on the usb-c power line? At this point all I can do is guess. And since I now have my Hantek 6022BL up and running on the Pi4 I'm not honestly that concerned, I have the luxury of using the Pi4 with the Hantek and the Pi3 (my tablet project) with the Labrador, and the unicorns drinking from my dog's water bowl too! Allright, maybe that's a slight exaggeration. But anyway I'm about fresh out of ideas, only hoping for somebody to add some.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2688
Joined: Thu Jul 11, 2013 2:37 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun May 03, 2020 7:17 pm

The spikes you are seeing are entirely unrelated to supply voltages. For one thing, bandwidth-limited analogue signals cannot have an instantaneous change in that manner. They are caused by missing or corrupt data from the scope.

Please post a full sudo lsusb -v output.
Rockets are loud.
https://astro-pi.org

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun May 03, 2020 8:14 pm

Code: Select all

sudo lsusb -v
[sudo] password for kevin: 

Bus 003 Device 004: ID 03eb:ba94 Atmel Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x03eb Atmel Corp.
  idProduct          0xba94 
  bcdDevice            2.00
  iManufacturer           1 EspoTek
  iProduct                2 Labrador
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x03ff  1x 1023 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Bus 003 Device 003: ID 2109:0102 VIA Labs, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass           17 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2109 VIA Labs, Inc.
  idProduct          0x0102 
  bcdDevice            8.36
  iManufacturer           1 VIA Technologies Inc.         
  iProduct                2 USB 2.0 BILLBOARD             
  iSerial                 3 0000000000000001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0012
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 http://help.vesa.org/dp-usb-type-c/
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        17 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              4 http://help.vesa.org/dp-usb-type-c/
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0051
  bNumDeviceCaps          3
  Container ID Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType      4
    bReserved               0
    ContainerID             {00000000-0000-0000-0000-000000000000}
  Billboard Capability:
    bLength                    48
    bDescriptorType            16
    bDevCapabilityType         13
    iAddtionalInfoURL           4 http://help.vesa.org/dp-usb-type-c/
    bNumberOfAlternateModes     1
    bPreferredAlternateMode     0
    VCONN Power                 1 1.5W
    bmConfigured                01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    bcdVersion               1.21
    bAdditionalFailureInfo      0
    bReserved                   0
    Alternate Modes supported by Device Container:
    Alternate Mode 0 : Alternate Mode configuration not attempted
      wSVID[0]                    0xFF01
      bAlternateMode[0]           0
      iAlternateModeString[0]     4 http://help.vesa.org/dp-usb-type-c/
  ** UNRECOGNIZED:  08 10 0f 00 00 00 00 00
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Bus 003 Device 002: ID 2109:2210 VIA Labs, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x2109 VIA Labs, Inc.
  idProduct          0x2210 
  bcdDevice            7.33
  iManufacturer           1 VIA Labs, Inc.         
  iProduct                2 USB2.0 Hub             
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x00e9
    Per-port power switching
    Per-port overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood      175 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0503 highspeed power enable connect
   Port 3: 0000.0103 power enable connect
   Port 4: 0000.0100 power
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000006
      BESL Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           4 micro seconds
    bU2DevExitLat         231 micro seconds
  Container ID Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType      4
    bReserved               0
    ContainerID             {bfa5f5ba-3ef4-4ce3-944c-7ac156d81805}
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.19
  iManufacturer           3 Linux 4.19.97-v7l+ dwc2_hsotg
  iProduct                2 DWC OTG Controller
  iSerial                 1 fe980000.usb
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0008
    Ganged power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         3 
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            4.19
  iManufacturer           3 Linux 4.19.97-v7l+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001f
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
        bMaxBurst               0
Hub Descriptor:
  bLength              12
  bDescriptorType      42
  nNbrPorts             4
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  bHubDecLat          0.0 micro seconds
  wHubDelay             0 nano seconds
  DeviceRemovable    0x00
 Hub Port Status:
   Port 1: 0000.02a0 5Gbps power Rx.Detect
   Port 2: 0000.02a0 5Gbps power Rx.Detect
   Port 3: 0000.02a0 5Gbps power Rx.Detect
   Port 4: 0000.02a0 5Gbps power Rx.Detect
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x000f
  bNumDeviceCaps          1
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x02
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x0008
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   3
      Lowest fully-functional device speed is SuperSpeed (5Gbps)
    bU1DevExitLat           4 micro seconds
    bU2DevExitLat         231 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Bus 001 Device 005: ID 05ac:024f Apple, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x024f 
  bcdDevice            1.21
  iManufacturer           1 SONiX
  iProduct                2 USB DEVICE
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      89
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      81
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 004: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x00cb Basic Optical Mouse v2.0
  bcdDevice            1.00
  iManufacturer           1 PixArt
  iProduct                2 Microsoft USB Optical Mouse
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      52
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              10
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x2109 VIA Labs, Inc.
  idProduct          0x3431 Hub
  bcdDevice            4.21
  iManufacturer           0 
  iProduct                1 USB2.0 Hub
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x00e0
    Ganged power switching
    Ganged overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0303 lowspeed power enable connect
   Port 4: 0000.0103 power enable connect
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      HIRD Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           4 micro seconds
    bU2DevExitLat         231 micro seconds
  Container ID Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType      4
    bReserved               0
    ContainerID             {30eef35c-07d5-2549-b001-802d79434c30}
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.19
  iManufacturer           3 Linux 4.19.97-v7l+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered
kevin@raspberrypi:~ $ 
The Atmel chip is the core of the Labrador board. For some reason today the spikes are only 0.1V rather than the 1.7 I've been seeing. One second....
Now this is news! Yesterday I had the ch1 input hooked to the signal generator output which was set to 0V. Today I just plugged in the USB and started up the software, no probes or anything. Just now I hooked a probe up, no change. Touched it to the signal generator output--there are the spikes! Touched it to a ground (all functions on the board share common ground) and the spikes are back, right around 1.7V. Why in the world ?

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Sun May 03, 2020 8:44 pm

This is what it looks like connected to an external signal generator:
Image
Note the spikes are now negative, probably because the generator puts out a large DC component.
Attachments
2020-05-03-133240_1920x1080_scrot.png
2020-05-03-133240_1920x1080_scrot.png (145.03 KiB) Viewed 3650 times

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2688
Joined: Thu Jul 11, 2013 2:37 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Mon May 04, 2020 9:28 am

Again, the discontinuous data you are seeing is not a value that has been measured by your oscilloscope. It is a result of the dwc2 driver not scheduling full-speed split isochronous transactions correctly.

Try using the dwc_otg overlay instead - "dtoverlay=dwc_otg" in config.txt.
Rockets are loud.
https://astro-pi.org

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Mon May 04, 2020 12:24 pm

OK, I'll do that ASAP, probably this evening (gotta pay the piper today). I assume I still need "dr_mode=host" also? Thanks for the boost here!

--Kevin

kevinthefixer
Posts: 105
Joined: Sun Jun 02, 2013 10:36 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Tue May 05, 2020 2:11 am

No joy there. With or without the trailing dr_mode statement, I just get the same old "device not connected" error, even though "lsusb" sees it. I'm beginning to think this was not to be...

sibir
Posts: 18
Joined: Mon Dec 11, 2017 4:29 pm

Re: RPi4 won't run PC-based oscilloscopes, kernel bug?

Tue May 05, 2020 2:49 am

@Kevin, I suspect what you are seeing is related to https://github.com/EspoTek/Labrador/issues/98.
The bad voltages may belong to channel 2. Turn on the second channel and check.

But then I do not see the issue on a Mac or PC...

The dwc2 driver has been working very reliably for me.
Last edited by sibir on Wed May 06, 2020 3:24 pm, edited 1 time in total.

Return to “Troubleshooting”