Can't Install Photon USB Driver in Windows Vista

No problem - I know these posts get chatty. I think the only way I’m going to start to make progress is if I can figure out how to get the serial port (usb) driver installed. I continue to scour for a solution. Now every time I try and install the Photon USB driver I get

That does in deed look bodged.

Maybe something got jammed at some point.

Maybe you need to remove all drivers previously tried.
For that you might need to create a environment variable DEVMGR_SHOW_NONPRESENT_DEVICES set its value to 1and restart Windows.
Then go back to DevMgr and tick View - Show hidden devices and delete/uninstall anything that might be in connection with the Photon Com Port (not the DFU drivers tho’).

Then restart and try again.


http://websistent.com/windows-devmgr_show_nonpresent_devices/

Yes that is a problem... however there is another workaround you can try. Entering your credentials manually in an app, and flashing that app over DFU USB.

WiFi.setCredentials() Test App

#include "application.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
	// for hidden and offline networks on the Photon, the security cipher is also needed
	// Security options are: WEP, WPA, WPA2
	// Cipher options are: WLAN_CIPHER_AES, WLAN_CIPHER_TKIP and WLAN_CIPHER_AES_TKIP
	Serial.begin(9600);
	Serial.printlnf("hasCredentials?: %s", (WiFi.hasCredentials())?"yes":"no");
	WiFi.on(); // turn on module, or creds will not be saved
	WiFi.setCredentials("myssid", "mypassword", WPA2, WLAN_CIPHER_AES);
	WiFiAccessPoint ap[5];
	int found = WiFi.getCredentials(ap, 5);
	Serial.printlnf("Stored Credentials: %d", found);
	for (int i = 0; i < found; i++) {
	    Serial.print("ssid: ");
	    Serial.println(ap[i].ssid);
	    // security is one of WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA, WLAN_SEC_WPA2
	    Serial.print("security: ");
	    Serial.println(ap[i].security);
	    // cipher is one of WLAN_CIPHER_AES, WLAN_CIPHER_TKIP, WLAN_CIPHER_AES_TKIP
	    Serial.print("cipher: ");
	    Serial.println(ap[i].cipher);
	}
	Serial.printlnf("hasCredentials?: %s", (WiFi.hasCredentials())?"yes":"no");
	Particle.connect();
}

After you connect, your credentials will be saved in non-volatile memory so you won't need to include this code every time.

1 Like

Ok, here is an update. After screwing around with trying to install/uninstall/reinstall the Photon USB driver, I enabled verbose logging in the SetupAPI Loglevel and discovered some weirdness where the windows setup was trying to copy the usbser/serenum.sys driver files from the c:\windows\inf directory or else the c:\windows\system32\driverstore\filerepository\photon.inf_“whatever” directory - which one depending on whether update or re-install driver was being used. The key to debugging this was “file not found” each time the install failed.

I suspect the behavior I’ve been experiencing is related to how the Photon INF file interacts with the Vista device install process (I was looking at include=mdmcpq.inf, but lost interest), at least on my machine.

I copied those 2 drivers to the c:\windows\system32\driverstore\filerepository\photon.inf_“whatever”
directory and performed a “Re-install drive” and lo and behold it worked. See screenshots:

And now I can run particle:

Thanks for all the help so far from all. Next step is to try and get the device working. Look for another troubleshooting topic coming your way soon … :slight_smile:

3 Likes

Glad to hear it @allegrojm thanks for being persistent!

I'd like to document this fix as a note for Vista users, in case this pops up again. After you copied the files, I'm thinking that instead of "Re-install drive" you mean right-click on the device and "Update Driver Software..."? If so did you let it "Search Automatically for Updated Driver Software" then?

Yeah, the good news is I got the USB working but my frustration with this thing continues, See Multiple Issues Trying to get First Photon Connected for my continued travails.

As far as what I did to get the USB working, after I copied the files I did do a Re-install driver and not Update driver, and I did do a Browse for the Photon USB driver to where I had unzipped it.

Through trial and error and reviewing the SetupAPI and SetupAPIDev logs I figured the setup behavior (code flow) was different in that the the Update Driver way of doing it would not work correctly i.e. it would not find usbser and serenum files correctly I seem to recall.

When a device is first installed, a directory is created in c:\windows\system32\driverstore\filerepository\ and all the driver’s files are copied there, so a subsequent re-install will retrieve the files from there. So when I copied the files and did a re-install, it picked up the files correctly from there where I copied them. I believe the Update driver will behave similarly to an original Install process (in that it will look for the driver files in the c:\windows\inf directory) and fail. So by doing the Install process first, and letting it fail with “can’t find file” or whatever the message was, and then copying the drivers from the c:\windows\system32\drivers to the c:\windows\system32\driverstore\filerepository\photon.inf_“whatever” directory and doing a re-install got it working for me.

Maybe copying the files to c:\windows\inf might have worked for the Install or Update process but I didn’t want driver files in a location they shouldn’t be.

These are my recollections of a pretty messy affair, but if you or someone else with this issue (on Vista or any other version of windows should it be the same issue) wants to test this, I’d recommend turning on the setup api loglevel to it’s most verbose level. See here https://msdn.microsoft.com/en-us/library/windows/hardware/ff550845(v=vs.85).aspx

1 Like