It seems like if the code flashes, but it doesn't

Hi everyone,

I have 4 photons,2 of them work fine and I can flash OTA new codes (iieeeiii), but the other 2 (those I’ve being using more) used to received any code and then…they only received the Tinker code and I couldn’t get them to take any new code (so far). They are all in the new version 0.4.7…yes I checked if the right device was selected on the Web IDE (just in case you were wondering).

I put them in safe mode and upload the code, it seems to uploaded (blinking magenta), but nothing.
By the way, I’ve being using the page of @Moors7 that i’ve found very usefull: http://jordymoors.nl/interface/

Then I tried to see the device with putty, but now I can’t see the port.

So I try to do it using DFU. I am not an expert using DFU, but the computer detects all the photons when they are in the DFU mode. When I run the command windows and give dfu-util -l it doesn’t detect any of the 4 photons so I know I am doing something wrong here too. See next image;

I am using Windows 7 x64 and the only thing I see is that the antenna of the failing photon says “1” and the working photon says “2”, do you know what this is for?

I tried in so different ways to install the CLI and It was impossible for me to do it. If you can help to resolve this the easy way (if exist) I appreciate it, if you can help me with guidance to install the CLI also good (maybe even better as I walked trough several discussions and it seems like the best way to fix something).

Thank you very much in advance.

One of the easiest ways to install CLI in Windows can be found here
Toolchain for Windows Installer

Ups, just seen you’ve been there already.
But the installer has worked for me on Win 7/8.1/10 Pro 64bit too.
Maybe you need to clean up your PATH not to have Windows choose the wrong instance of an installed prg.

1 Like

Glad to hear you find the page to be useful, that’s why I made it :smile:
@ScruffR beat me to it, but I can also wholeheartedly recommend that installer, it’s been working great for me so far :smile:!

1 Like

Hi guys,

Thanks for the support. I installed the Toolchain for Windows again and then I put the latest libraries at the folder “Particle”. The I put the photon in dfu mode (yellow light) and checked in the computer for it…it actually says “Photon DFU mode”…so we are ok to go.

I opened a command window, I go to the folder Particle and to see the devices I type:

dfu-util -l

but it doesn’t show anything :sweat: , I guess it should show me the photon, ¿doesn’t it?

So I decided to go ahead and try to put the firmaware anyways with no luck. :weary:

¿what should I do?

Thank you!!

Have you used zadig to install the libsubK DFU drivers?

Your device manager should show the Photon like this

I see a libsub-win32 branch in your DevMgr tree, but obviously your Photon does not get recognized as such. I’ve had best results with libsusbK

I just did and it shows as you said, with the libusbK. Then I went to the command windows and this is what shows:

I try to put the firmware anyways and it shows me this:

PS: The DFU driver was updated with zadig 2.1.2.

How do your other two device behave when you do the same thing?

Try using a different USB port.
Windows used to have seperate driver settings for the individual USB ports. Swapping from one to another sometimes helped.

Try a different USB cable.

What does DevMgr tell you when looking at the device properties?

You could also try tor remove all Particle drivers from DevMgr and reinstall them.
For this you might want to add an system environment variable DEVMGR_SHOW_NONPRESENT_DEVICES and set the value to 1.
Then reopen DevMgr and tick “View” - “Show hidden devices”.
Then you can search the tree for any Particle devices and delete them (also tick the “Remove from harddrive” checkbox if present)

It happens the same for all the devices. I even switch to the other USB port (the computer only has two) and happens the same thing. I am not using any usb hub… I also make an exception in the folder so the antivirus doesn’t get in the way… :confused: Any other idea we can discard? If it is the computer (what else?) how could I fix this?

Are you running as admin on that machine?
Have you tried removing all drivers that might get in the way?
What do the device properties (ersp. details) say?
Is the device registered with the correct vendor/product ID? (USB\VID_2B04&PID_D006)
Are you using USB 2.0 or 3.0 ports?

Have you got access to another computer to try it there?

I am running as admin.
I don’t know how to remove the drivers and I don’t know which ones might be in the way.

The device properties say:

Photon DFU Mode
Hardware ID:
USB/VID_2B04&PID_D006&REV_0200
USB/VID_2B04&PID_D006
service:
libusbK
Provider:
Undefined Vendor
Controller ensamble date:
2014/29/11 7pm
Controller ensamble versión:
3.0.7.0
....a lot more....

3.0 ports

Any other computer.

Your details look OK.

If you haven’t got a USB 2.0 port, you can’t help it, they sometimes play up.

To remove the drivers you first add the environment variable DEVMGR_SHOW_NONPRESENT_DEVICES with value 1 (how to)
Then got to device manager and tick in the menu “View” the item “Show hidden devices”.
Then just browse through the DevMgr branches (anything with USB, Ports, libusb-Win32, libsubK).
If you see any mention of Particle/Spark Core/Photon/Electron (be careful with core :wink: ) just activate it and press delete.
If the popping up dialog features a checkbox “remove from harddrive” (or so) check this and proceede with OK.
Do this for all suspicious devices.
Then restart your computer and reinstall the libsubK driver.

Ok, I did delete some drivers (even more than I should, but it’s ok now), restart the computer and installed the libusbK and nothing.

I’ve being having this popups when I start my computer, I don’t know if this have something to do with the problem:

Have you ever googled this error?

http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/unable-to-load-jit-compiler-mscorjitdll-file-may/2d1a0851-fecc-4fe8-a58c-22acbddf0f76

Both programs relying on mscorjit.dll are non-essential parts of Dell DataSafe Local Backup.

Thank you @ScruffR, this started a couple of days ago, and I’ve being trying to update the photon with DFU longer than that, that is why I don’t believe is this. But I will solve this and see what happens.

Thanks.

I changed the computer after making a full diagnostics it appears that a sector of the hard drive is damaged :weary: . I supposed that this is the problem as I didn’t find anything else.

So, what I did:

  1. Download and install the Toolchain.

  2. Download the latest firmware from: https://github.com/spark/firmware/releases

  3. Download and run Zadig

  4. Put the photon in the DFU mode (yellow light).

  5. Install the driver libusbK with Zadig

  6. open a command window and put dfu-util -l, and this time shows:

  7. Follow the instructions of this forum thanks to @HardWater .

  8. I installed part 1 and part 2, and at the end of part2 shows an error: Error during download get-status, but I understand this is a common error and I should ignore it.

I only have one question, in the link of @HardWater says

dfu-util -d 0x2B04:0xD006 -a 0 -s 0x8020000 -D c:\photon\system\system-part1-0.4.2-photon.bin

And in the firmware releases:

dfu-util -d 2b04:d008 -a 0 -s 0x8020000 -D system-part1-0.4.7-p1.bin

These two seems to point at different addresses in the microcontroller, so ¿wich one is it?. Also, ¿Could somebody explain what does this command specificaly means?

Thanx.

Sorry, I just realized that the first address is fine because it is used for the photon. The second one is for the P1 module…sorry :sweat_smile:

Sorry you’re maybe doing this already, but just to be sure:

Even if your user is an admin, the command prompt needs to be run in “Administrator Mode”, right click / “run as admin” etc.

Thanks!
David

Hi @Dave,

thank you very much for your reply. I am in Administrator Mode.

Now I have a new problem and is that I have access to the dashboard and I registered 2 of my photons with an old firmware. I haven’t being able to delete the photons from the list of the dashboard (I am already asking for this to the group through the feedback at the dashboard), and when I try to flash new codes through the page build.particle.io, it does flash the new code, but then after a couple of minutes the code from the dashboard flashes too.

¿Any ideas how should I work with these 2 photon while the problem of deleting the photons from the dashboard is solved?

Hi @brayanarias,

The dashboard / organization mechanism that decides to update your products is keyed off the cloud recognizing your devices as being your product, and having a version of firmware registered for those products. Either removing the firmware, changing the rollback setting to be more permissive and bumping your app version forward, or making your devices not those products anymore will help.

I’ll check with the dashboard team and see if they’ve had a chance to look into this yet.

Thanks!
David

Thank you very much @Dave,

I uploaded a video showing how the photon flashes back to tinker…the strange thing is that it doesn’t blink magenta…¿Could you give me instructions about this? :neutral_face:

(sorry for the vertical format).