Jump to content
  • 0

Waveforms on MacOS Issue


wlk

Question

Waveforms has yet to find one of my two Analog Discovery 2's.

I have attempted to use it with:

  • an Apple USB C to USB adapter
  • an Apple USB-C Digital AV Multiport Adapter
  • a CalDigit TS3 Plus (using a port which can supply 5V 1.5A).

I've rebooted many times and tried all combinations of interfaces, with 2 different USB cables and 2 different AD2's.

I have the following scenario:

macOS 10.14.6

Confirmed via System Report that the driver exists.

Digilent USB Device:

  Product ID:    0x6014
  Vendor ID:    0x0403  (Future Technology Devices International Limited)
  Version:    9.00
  Serial Number:    210321AD640C
  Speed:    Up to 480 Mb/sec
  Manufacturer:    Digilent
  Location ID:    0x14410000 / 8
  Current Available (mA):    500
  Current Required (mA):    0
  Extra Operating Current (mA):    0

I originally installed Waveforms digilent.waveforms_v3.12.2 with no success. Based on another users feedback, I deleted that version and installed digilent.waveforms_beta_v3.13.6, with no success. 

I've also confirmed FTDIUSBSerialDriver.kext 2.4.2 is in /Library/Extensions.

1. I'm at wit's end and am looking for more things to try. 

2. I also want to confirm that the unit doesn't require external power outside of the USB cable. I don't see a power LED indication on either unit.

 

Please advise.

Thanks,

Lief

 

Link to comment
Share on other sites

Recommended Posts

@Wayne Contello

Hi Wayne,

I just wanted to check and make sure that you tried what worked for me, which was to " delete the FTDIUSBSerialDriver.kext" per Attila's comment. I spent quite a bit of time trying to get the AD2 to connect and once I delete the driver, it worked immediately.  

It is maddening...

Lief

Link to comment
Share on other sites

And one more thing, which is obvious, however, it bit me today.

Check your cable. I was seeing a failure to connect, kept retrying until I realized I wasn't using the cable which specifically came with my AD2. Worked immediately.

What bit me was I know the "bad" cable works...it charges some devices, however that isn't the same thing as sending data. And many of us have USB cables lying around like...[fill in your thing you have a lot of but don't really need]

Lief

 

Link to comment
Share on other sites

You can try installing the KEXT that's included in the Waveforms dmg and see if it'll work on 10.14. It was designed for older versions of OSX but I do recall it loading and functioning correctly when I had 10.14 installed on the MBP that I have here. The probe function of the kext uses a control transfer to read the EEPROM attached to the FTDI and determine if it's not a Digilent device or if the VCP drivers are supposed to be loaded, and if so, then returns a probe score of 0, allowing any other serial driver to take control of the device interfaces. If it's a Digilent device and the VCP bit isn't set for the interface then a very high probe score will be returned, preventing other serial drivers from claiming the interface.

I don't think you actually need "FTDIUSBSerialDriver.kext" with 10.14 or newer to communicate with FTDI chips.

Link to comment
Share on other sites

It says "Operation not permitted" even though I entered my admin password

Proton:~ wayne$ sudo mv /System/Library/Extensions/AppleUSBFTDI.kext AppleUSBFTDI.kext.disabled

Password:

mv: rename /System/Library/Extensions/AppleUSBFTDI.kext to AppleUSBFTDI.kext.disabled: Operation not permitted

Link to comment
Share on other sites

@Wayne Contello

I see AppleUSBFTDI.kext listed. That's almost certainly what's preventing the FTDI driver from accessing your Analog Discovery. WHat's odd about that is I remember AppleUSBFTDI.kext being removed in 10.14 so I'm surprised that it's still on your system.

As a test can you please try the following:

  1. Disconnect AD2 from your MAC.
  2. Execute "sudo mv /System/Library/Extensions/AppleUSBFTDI.kext AppleUSBFTDI.kext.disabled"
  3. Reboot
  4. Connect AD2
  5. Run enumerate.py script
  6. Run Waveforms and see if AD2 is found

Thanks,
Michael

Link to comment
Share on other sites

I should mention that I am still on mac OS X 10.14.6

 

Here is transcript of script command:

Proton:~ wayne$ ls /System/Library/Extensions/ | grep USB

AppleMIDIUSBDriver.plugin

AppleOSXUSBNCM.kext

AppleUSBACM.kext

AppleUSBAudio.kext

AppleUSBCDC.kext

AppleUSBCHCOM.kext

AppleUSBCommon.kext

AppleUSBDMM.kext

AppleUSBDisplays.kext

AppleUSBECM.kext

AppleUSBEEM.kext

AppleUSBEthernet.kext

AppleUSBEthernetHost.kext

AppleUSBFTDI.kext

AppleUSBMultitouch.kext

AppleUSBNCM.kext

AppleUSBNetworking.kext

AppleUSBPLCOM.kext

AppleUSBRealtek8153Patcher.kext

AppleUSBSerial.kext

AppleUSBTopCase.kext

AppleUSBWCM.kext

AppleUSBiBridge.kext

ConnectUSB.kext

EPSONUSBPrintClass.kext

FTDIUSBSerialDriver.kext

IOUSBAttachedSCSI.kext

IOUSBFamily.kext

IOUSBHostFamily.kext

IOUSBMassStorageClass.kext

IOUSBMassStorageDriver.kext

M-AudioUSBMIDISupport.kext

RDUSB0037Dev.kext

Proton:~ wayne$

 

Link to comment
Share on other sites

@Wayne Contello

When everything is working correctly the output of the script should appear similar to the following:

Digilent FTDI Enumeration library loaded
Devices: 1
 1. SN:210321A805BB 'Digilent USB Device' flags: 0x0 type: 0x8 id: 0x4036014 locid: 0x141a0

FTDI Version: 0x10416
Devices: 1
 1. SN:210321A805BB Digilent USB Device flags: 0x2 type: 0x8 id: 0x4036014 locid: 0x141a

DMGR Version: 2.8.4
Devices: 1
 1. SN:210321A805BB Analog Discovery 2 PDID: 0x40300360

DWF Version: 3.12.2
Devices: 1
 1. SN:210321A805BB Analog Discovery 2

In your case it looks like our internal library, which is only used for low level enumeration and not for data transfer, is able to access the device. At that level all we are doing is performing simple control transfers on the control endpoint and not actually claiming an interface or transferring any data with the bulk endpoints. The FTDI driver gets used for everything else and something on your system seems to be preventing it from accessing the USB interfaces of the Analog Discovery 2. The serial port driver (AppleUSBFTDI.kext) that Apple included in older versions of OSX used to claim the USB interfaces and prevent the FTDI driver (libd2xx) from accessing the interfaces. In order to use the AD2 when AppleUSBFTDI.kext was prevent it was necessary to unload the kext, delete the kext, or use a custom kext that we wrote to prevent AppleUSBFTDI.kext from claiming the interfaces of the AD2. All of these issues should have gone away with Mojave (10.14) and newer, as Apple overhauled their serial drivers, and there should not longer be a need for a custom kext to prevent an Apple driver from claiming the interfaces.

Can you execute "ls /System/Library/Extensions/ | grep USB" and paste the results so that I can see if there's anything different on your system that I have on mine.

Thanks,
Michael

Link to comment
Share on other sites

thank you for this.  I think the script changes only address the issue of this particular python script impeding our ability to debug .  I still cannot actually use my DA2 because the device is not found by Waveforms even though System Information does show it.

 

 

Of course, if there are particular tests you would like me to run, please le me know and I will try them as soon as a can.

 

Best,

Wayne

 

 

Link to comment
Share on other sites

Hi @Wayne Contello,

I wanted to let you know you have posted your question where @attila will be able to see it; what I do not know is when they will be able to respond with some more specific advice. The country their office is in was put into a state of emergency for COVID-19 and I do not know if he has access to macOS at home or not.

I am not familiar with macOS and getting the WaveForms software installed on it, so unfortunately I do not have any direct advice for you. I'm sorry I could not be of more help.

Thanks,
JColvin

Link to comment
Share on other sites

@attila

Two things:

1) I had not been able to test the second AD2 (the one that wouldn't connect) on a Windows box as I haven't been in the Lab since...  That said, I thought I would attempt to power it up this morning and it connect with no issues. I also made sure my original new AD2 connects and it does. Net, net...both work and I'm excited about using them. I also want to thank you for your excellent support.

2) I too had to make Wayne's changes above to the "...enumerate" program in order for it to run. I'd recommend changing the program or documenting how to do it. It appears from both Wayne's message and me, we're fairly conversant in python, thus for us seeing the error and fixing it was minor. Others might not be able to do it.

 

Thank you both,

Lief

 

Link to comment
Share on other sites

In the script I changed:

        print(" "+str(i+1)+". SN:"+sn.value+" '"+name.value+"'"+" flags: "+hex(flags.value)+" type: "+hex(type.value)+" id: "+hex(pdid.value)+" locid: "+hex(locid.value))
 

to

        print(" "+str(i+1)+". SN:"+str(sn.value)+" '"+str(name.value)+"'"+" flags: "+hex(flags.value)+" type: "+hex(type.value)+" id: "+hex(pdid.value)+" locid: "+hex(locid.value))
 

I get the result:

Proton:~ wayne$ python /Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate\ WLC\ Modified.py

 

Digilent FTDI Enumeration library loaded

Devices: 1

1. SN:b'210321A68459' 'b'Digilent USB Device'' flags: 0x0 type: 0x8 id: 0x4036014 locid: 0x14060

 

FTDI Version: 0x10416

Devices: 1

1. SN:b'' b'' flags: 0x1 type: 0x3 id: 0x0 locid: 0x0

 

DMGR Version: b'2.8.4'

Devices: 0

 

DWF Version: b'3.12.2'

Devices: 0

Proton:~ wayne$

Link to comment
Share on other sites

I am having trouble on Mac OS X (10.14.6) with an AD2 with Waveforms 3.12.2 QT6.5.3.

Model Name: MacBook Pro

  Model Identifier: MacBookPro9,1

  Processor Name: Intel Core i7

  Processor Speed: 2.3 GHz

  Number of Processors: 1

  Total Number of Cores: 4

  L2 Cache (per Core): 256 KB

  L3 Cache: 6 MB

  Hyper-Threading Technology: Enabled

  Memory: 16 GB

 

the AD2 shows up in the System Information:

1975819507_ScreenShot2020-03-14at16_31_37.png.85dc2730af2ba97cb3a21616f67d031a.png

 

I deleted the FTDIUSBSerialDriver.kext 2.4.2

 

and deleted Waveforms, downloaded a new copy, dragged the App to the Applications folder, dragged the extension to the aliased folder, then restarted with the AD2 unplugged.

 

When I try to run the python script:

python /Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate.py

 

I get errors:

Proton:~ wayne$ python /Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate.py

 

Digilent FTDI Enumeration library loaded

Devices: 1

Traceback (most recent call last):

  File "/Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate.py", line 61, in <module>

    print(" "+str(i+1)+". SN:"+sn.value+" '"+name.value+"'"+" flags: "+hex(flags.value)+" type: "+hex(type.value)+" id: "+hex(pdid.value)+" locid: "+hex(locid.value))

TypeError: must be str, not bytes

 

So I modified the script and found that sn.value and name.value make the script unhappy. 

 

the code I was able to run is:

       aString = " "+str(i+1)
        aString += ". SN:"
        sn.value
        aString += " '"
        name.value
        aString += "'"+" flags: "+hex(flags.value)
        aString += " type: "+hex(type.value)
        aString +=  " id: "+hex(pdid.value)   
        aString += " locid: "+hex(locid.value)
        print(aString)
        
 #       print(" "+str(i+1)+". SN:"+sn.value+" '"+name.value+"'"+" flags: "+hex(flags.value)+" type: "+hex(type.value)+" id: "+hex(pdid.value)+" locid: "+hex(locid.value))

 

 

and results in output:

Proton:~ wayne$ python /Applications/WaveForms.app/Contents/Resources/SDK/samples/py/Enumerate\ WLC\ Modified.py

 

Digilent FTDI Enumeration library loaded

Devices: 1

1. SN: '' flags: 0x0 type: 0x8 id: 0x4036014 locid: 0x14040

 

FTDI Version: 0x10416

Devices: 1

1. SN:b'' b'' flags: 0x1 type: 0x3 id: 0x0 locid: 0x0

 

DMGR Version: b'2.8.4'

Devices: 0

 

DWF Version: b'3.12.2'

Devices: 0

 

 

I will mess around with the script more later.  Hopefully someone can help.

 

Link to comment
Share on other sites

Yay!!! @attila

I went and ate breakfast and thought I'd try the "other" AD 2 along with a different adapter. Once I did that I was successful!

I went back and retested all interfaces, all work. However, my older AD2 which I had as part of my class lab equipment still won't connect. I'm not going to worry about it..for now. I can do some real work which is what I started out to do...

 

Thanks for your help

Link to comment
Share on other sites

Thank you @attila,

I deleted the driver and ran Enumerate.py with this result:


Digilent FTDI Enumeration library loaded
Devices: 0

FTDI Version: 0x10416
Devices: 0

DMGR Version: b'2.8.4'
Devices: 0

DWF Version: b'3.13.6'
Devices: 0

 

Thanks,

Lief

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...