Jump to content
  • 0

Device Enum Failing in Cygwin



I'm trying to use the Adept SDK on cygwin and am having trouble enumerating the connected devices. I have a JtagHs2 device plugged into a USB port on my Windows box.

When I call the DmgrEnumDevices function in my app, it tells me that it found 0 devices attached to the system.

However, if I run the Adept app it can find the device and show its details (SN, etc.)  If I leave Adept running, my program will then report that it finds the device I have plugged into the USB.

If I then quit Adept and run my app again, my app will not be able to find the device.

The dadutil app can find the device with or without Adept running.

Clearly, my app is missing something that Adept and dadutil is doing. What am I missing?

Here's a bit of my code:

	// report some admin stats
	if (!DmgrGetVersion(dmgrVersion)) {
		cout << "Could not get the Dmgr version"
				 << endl;
	cout << "Using Adept Dmgr version "
			 << dmgrVersion
			 << endl;

	// see how many Digilent things are here
	if (1) {
		int numDevices;

		if (!DmgrEnumDevices(&numDevices)) {
			cout << "Could not enum devices"
					 << endl;

		cout << "Found "
				 << numDevices
				 << " Digilent devices"
				 << endl;

The code will get the Dmgr version just fine, so I can call functions in the sdk, but DmgrEnumDevices behaves differently depending on whether Adept is running. Help!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hi algae,

Sorry for the late response. Have you tried to use this code in the GetInforDemo.cpp from the digilent.adept.sdk_v2.3.1\samples\dmgr\GetInfoDemo.

bool FFindDvc(char * szDev, DVC * pdvc) {

    int        idvc;
    int        cdvc;
    bool    fRes;
    /* Find the device to use to run the test.
    fRes = fFalse;

    // DMGR API Call: DmgrEnumDevices

    for (idvc = 0; idvc < cdvc; idvc++) {
        // DMGR API Call: DmgrGetDvc
        DmgrGetDvc(idvc, pdvc);
        if (strcmp(pdvc->szName, szDev) == 0) {
            fRes = fTrue;
    // DMGR API Call: DmgrFreeDvcEnum
    return fRes;

thank you,


Link to comment
Share on other sites


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

  • Create New...