Cannot flash Photon from Visual Studio Code

photon
Tags: #<Tag:0x00007fe21ec65ae0>

#1

Greetings, all. Problem: After several successful flashes of code from Visual Studio Code to my first two Photons, I bought several more & registered them. But whenever I flash code to the new ones (using the same computer & USB cable), I get this message:

Unable to open USB device: LIBUSB_ERROR_NOT_SUPPORTED

I tried flashing an original Photon & that worked. But when I tried re-flashing it, I got:

:::: PUTTING DEVICE INFO DFU MODE
Request timeout

I was really looking forward to developing applications, so this is incredibly frustrating. Does anyone have any suggestions for flashing these beasts successfully?


#2

USB control commands are only supported four a relatively short time now, so I guess your Photons need a device OS update first.
For that put the device in DFU mode manually and run

particle update

then try again


#3

Thank you - that solved the problem! (Though sometimes I still have to put the Photon into DFU mode manually for some reason, but at least now I know to do that.)

A small suggestion for the Visual Studio Code / Particle interface: Why not add a helpful suggestion to the

“Unable to open USB device: LIBUSB_ERROR_NOT_SUPPORTED”

message, such as your reply to my question? I did Google the problem & didn’t find anything helpful. Reason: I’m (like many people) in a rush project & need to choose a new microcontroller quickly. If I hadn’t received your reply today I would have returned my Photons to Amazon and moved on to another microcontroller family.

Just a thought.