• 0
Torfey

Analog Discovery 2 on Linux - usb disconnect

Question

I'm trying to use an Analog Discovery 2 on linux Debian 8.5 (jessie). I recently upgraded from 7.9 (wheezy) because I couldn't get the AD2 usb to work reliably.  But I seem to have the same trouble here.

$ dpkg-query -l 'digilent*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version             Architecture        Description
+++-============================-===================-===================-==========================
ii  digilent.adept.runtime       2.16.5              i386                Digilent Adept Runtime
ii  digilent.adept.utilities     2.2.1               i386                Digilent Adept Utilities
ii  digilent.waveforms           3.3.7               i386                Digilent WaveForms

 

In particular, the AD2 is not found at boot time, but unplugging and then replugging the usb cable causes it to be detected. Once the os knows the device is there, 'dadutil enum' will answer back a device and serial number. But eventually (haven't found a pattern yet but current max is 26 minutes, min < 2 minutes) the device disconnects from the usb. After that 'dadutil enum' says 'No devices found'.  Using 'lsusb' shows the device is gone.  Physically unplugging and replugging usb brings the device back for a while. 'waveforms' will work for a while, but I believe the usb disconnect makes it die.

E.g. from /var/log/messages, grepping for 'usb.*2-2'

Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.156045] usb 2-2: new high-speed USB device number 8 using ehci-pci
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.293336] usb 2-2: New USB device found, idVendor=0403, idProduct=6014
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.293345] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.293351] usb 2-2: Product: Digilent USB Device
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.293356] usb 2-2: Manufacturer: Digilent
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.293361] usb 2-2: SerialNumber: 210321A1A55D
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296225] usb 2-2: Detected FT232H
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296234] usb 2-2: Number of endpoints 2
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296242] usb 2-2: Endpoint 1 MaxPacketSize 512
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296249] usb 2-2: Endpoint 2 MaxPacketSize 512
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296255] usb 2-2: Setting MaxPacketSize 512
Sep  6 16:27:29 deb85-Iguana kernel: [ 7974.296752] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0
Sep  6 16:27:29 deb85-Iguana mtp-probe: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2"
Sep  6 16:34:32 deb85-Iguana kernel: [ 8398.020689] usb 2-2: USB disconnect, device number 8

My system info:

$ uname -a
Linux deb85-Iguana 3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) i686 GNU/Linux

All of this happens to be on a VersaLogic Iguana board.

Thanks for any help.

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
8 hours ago, attila said:

Hello,

This seems to be a linux system issue.
Searching for similar problems, some people recommend removing/disabling the libmtp to solve such disconnect problems, like: http://forums.fedoraforum.org/showthread.php?t=282593

Thanks for the idea!

I tried removing the mtp packages:

# aptget remove libmtp-runtime libmtp-common
The following packages will be REMOVED:
  libmtp-runtime libmtp-common libmtp9

So mtp-probe doesn't run now. But seem to be getting the same behavior.

Searching for 'usb*3-2' now in /var/log/messages:

Sep  7 11:02:54 deb85-Iguana kernel: [  210.112037] usb 3-2: new high-speed USB device number 4 using ehci-pci
Sep  7 11:02:54 deb85-Iguana kernel: [  210.249286] usb 3-2: New USB device found, idVendor=0403, idProduct=6014
Sep  7 11:02:54 deb85-Iguana kernel: [  210.249295] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep  7 11:02:54 deb85-Iguana kernel: [  210.249301] usb 3-2: Product: Digilent USB Device
Sep  7 11:02:54 deb85-Iguana kernel: [  210.249306] usb 3-2: Manufacturer: Digilent
Sep  7 11:02:54 deb85-Iguana kernel: [  210.249311] usb 3-2: SerialNumber: 210321A1A55D
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330143] usb 3-2: Detected FT232H
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330151] usb 3-2: Number of endpoints 2
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330160] usb 3-2: Endpoint 1 MaxPacketSize 512
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330168] usb 3-2: Endpoint 2 MaxPacketSize 512
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330175] usb 3-2: Setting MaxPacketSize 512
Sep  7 11:02:55 deb85-Iguana kernel: [  211.330628] usb 3-2: FTDI USB Serial Device converter now attached to ttyUSB0
Sep  7 11:09:39 deb85-Iguana kernel: [  615.942544] usb 3-2: USB disconnect, device number 4

And the popup I get when it dies in waveforms is:

Screenshot-WaveForms.png

 

I believe the same as before.

 

Share this post


Link to post
Share on other sites
  • 0

This seems to me a system problem, but I've never run into such disconnect issue and have no real ideas what could be wrong.
You might try to use external USB hub, to supply the device with 5V supply, try a different USB cable in case there is a contact issue...

Could you try using the AD2 with another not Atom computer to make sure the problem is not with the device?

Share this post


Link to post
Share on other sites
  • 0

Device itself still seems alive on a different box.  I guess I'm going to bail on this cpu board and try something different. Maybe an Intel NUC.  Thanks for your ideas.

Share this post


Link to post
Share on other sites
  • 0

I have exactly the same problem with my Gentoo Linux distro on a Intel iCore7 system. I don't believe the problem is with the CPU. There is something else with the USB setup at my opinion.

I installed adept and waveforms manually. My Analog Discovery is working on my Windows system (another hardware box).

In the WaveForms gui in the Device Manager panel, the serial number of my Analog Discovery is properly shown and in the bottom section in the Wavegen column I have a message: Device not supported.

Edited by AchilleTalon

Share this post


Link to post
Share on other sites
  • 0

I ended up ordering an Intel NUC NUC5i5RYH on Sept 8. Installed a fresh Debian 8.5 3.16.0-4-amd64 x86_64 (as opposed to the 'upgraded' 32bit os I was using on the old VersaLogic Iguana board).  So far it seems to be working.

In my hunting for a solution before, I came across posts (not about AD2, but, say, cameras) about people having problems with various usb chips. I didn't try to track any of that down. So it was a roll of the dice whether this NUC setup would work. I believe the NUC only has usb 3 ports.  I chose the 5i5 instead of the newer 6i5 because I wasn't sure if the 'stable' Debian would support the newer video.

I'm very frustrated with all my experience with usb attached devices. It always seems to be iffy and the suggested solution on other forums to 'unplug and replug' a device isn't very helpful when you're trying to write code that will take data uninterrupted for months at a time.

On the other hand, all my work with ethernet connected devices has gone very well and been stable. I would really like it if the Digilent made the Analog Discovery 2 available with a native ethernet connection to it instead of just usb.

 

For what it's worth, the messages I got on the fresh build on the Intel NUC are below. Note that here it's using the xhci_hcd driver vs the ehci_hcd driver on the previous board.

My new system info:

$ uname -a
Linux deb-nuc5i5 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux

Attach same Analog Discovery 2 to usb port. It was found by usb system and reported in /var/log/messages:

Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.510732] usb 1-2: new high-speed USB device number 5 using xhci_hcd
Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.643726] usb 1-2: New USB device found, idVendor=0403, idProduct=6014
Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.643734] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.643738] usb 1-2: Product: Digilent USB Device
Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.643742] usb 1-2: Manufacturer: Digilent
Sep 13 11:56:50 deb-nuc5i5 kernel: [67138.643745] usb 1-2: SerialNumber: 210321A1A55D
Sep 13 11:56:50 deb-nuc5i5 mtp-probe: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"
Sep 13 11:56:50 deb-nuc5i5 mtp-probe: bus: 1, device: 5 was not an MTP device
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.674342] usbcore: registered new interface driver usbserial
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.674353] usbcore: registered new interface driver usbserial_generic
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.674362] usbserial: USB Serial support registered for generic
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675541] usbcore: registered new interface driver ftdi_sio
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675564] usbserial: USB Serial support registered for FTDI USB Serial Device
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675642] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675668] usb 1-2: Detected FT232H
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675670] usb 1-2: Number of endpoints 2
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675671] usb 1-2: Endpoint 1 MaxPacketSize 512
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675672] usb 1-2: Endpoint 2 MaxPacketSize 512
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675673] usb 1-2: Setting MaxPacketSize 512
Sep 13 11:56:51 deb-nuc5i5 kernel: [67139.675767] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

 

Start waveforms program. It successfully finds device. But then message to /var/log/messages after:

Sep 13 11:57:36 deb-nuc5i5 kernel: [67183.913434] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
Sep 13 11:57:36 deb-nuc5i5 kernel: [67183.913446] ftdi_sio 1-2:1.0: device disconnected

Though waveforms is still connected and running. This was different from what I saw on the VersaLogic Iguana board.

So, many things changed and I can't tell what one made the difference: different usb chip on motherboard, causing different driver selection, or 64bit vs 32 bit os.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now