Serial port times out after setup

Using the “Easy” setup instructions and the USB/CLI method, I configured my new Photon. Details to follow, but the result after particle setup wifi was Done! Your device should now restart. That didn’t seem to happen, but when I pressed reset, the Photon started blinking green. That’s all it would do. I waited several minutes, then pressed setup to make the led blink blue. While the Device Manager shows the Photon as COM42, when I try particle identify, the response is serial timed out. Putty also fails to connect to COM42.

Here is the TL;DR.
My system is 64 bit Windows 7.
All the Photon setup was done using the CLI.
When I first connected the Photon, it showed up in the Device Manager as a Teensy. I changed the driver to the Photon per your instructions, and the Photon showed up as expected.
I installed node.js and the CLI as instructed. I ran particle setup. Result was obtained magical secure claim code followed by Woops. Something went wrong connecting to your wifi network.
Scratched my head a little, read the forums some more, and tried particle serial wifi. Found my network, entered my password (a long string of hex digits) and got the results described at the start of this post.

So what now?? I can’t seem to find any info on this particular problem described in the forum. It’s likely I just missed it and I apologize if that’s the case. Thanks for any help.

On windows each and every time you reset the device you have to close and reopen your serial terminal program, maybe that is the problem.

Hi @doctek

Did you see this response from @corey about how your long hex password might be a problem depending on what security is being used. Blinking green means can connect to WiFi so that could the security or it could the be 2.4 vs 5 GHz problem. If you a dual-band router, renaming the SSID for the 5GHz side will prevent the Photon from connecting to it so it can only get to the correct 2.4GHz part.

1 Like

Thanks for your suggestion. I tried closing and reopening the cmd window that the CLI was run in (even though the CLI had closed) and I got a response to particle identify. Then I tried disconnecting the Photon, and reconnecting without closing the window. I tried particle identify again and got a response. So I don’t think I needed to close the cmd window. (I try to avoid superstitious behavior.) I’m not sure why I had the original problem.

Putty still won’t work, but as long as the CLI works, I don’t care.

Your suggestion is appreciated and noted. Thanks!

Thanks for your response!

Yes, I did see Corey’s prompt response. I’m not using a 5GHz router. Sounds like I’ll have to wait for a fix to the password problem.

How would I if there is a password problem? Is there any way to use the CLI to try to connect to the cloud once I get a flashy green led? The Photon no longer appears as a COM port.

Hi @doctek

The code on the device (your code or system code) has to explicitly turn the serial port on and use it. The serial port is not continuously available, it only works in certain modes like listening mode or when your code turns it on with a Serial.begin(baudRate); command.

Here is something that would work, but might be painful. Change your router security to not be WEP (WPA2 is good). Now use the CLI to setup your device for that new network (entering the SSID and new password) and try again.

The best process I have found to use Putty successfully while doing resets is to:

Start photon
Start putty
Close putty
Reset photon
Start putty

Each time you reset the photon it will destroy the connection to the Putty program. So even though the device manager will show the same com port number second time around you will not have a connection unless you followed the above sequence.

Thanks for your response! While reconfiguring my router is a good idea, that would break all the other things I have connected to it (that work fine). So not a viable option. I’ll wait for a proper fix.

@jfs what is the issue you are facing? We should be able to get it sorted out. :smile:

1 Like

Hi @jfs

I agree with @kennethlimcp – if you are having trouble with your Particle device, ask for specific help and we will help you get through it!

I had a WEP router and eventually got rid of it due to the 20-year old technology and the lack of security, so I speak from first-hand experience on that issue. My understanding is that WEP hex passwords are portable between different router brands but not the ASCII passwords since the WEP spec did not say how to convert passwords.

You can setup a Particle device with just a serial terminal emulator like PuTTY or CoolTerm, but you have to have some experience. The CLI and the other tools are designed to be easy to use but can be hard to install since everyone’s environment is different.

3 Likes

Kenneth/bko,

I deleted my previous highly frustrated rant…

My specific problem I had last night is that I finally had it connected so I could communicate with it from a command prompt, get all the way through logging in, scan for available networks, select my network, select WPA2, enter the password, then it told me:

“! Something went wrong: Serial timed out”

A second attempt caused it to completely lock up. I tried that multiple times, each time trying an endless sequence of button presses to get it back to the reset state with the blinking blue LED.

Tonight, I tried the exact same thing, and after I select the network, I get:

"! Something went wrong: [Error: Opening \.\COM5: File not found]

Roadblock after roadblock…I also am getting no response from their tech support trying to get this thing swapped out. I am assuming it MUST be the hardware. Nobody would release a production device that is this difficult to get working.

Bko, you had mentioned about setting it up through a terminal program. Like…the app doesn’t work, and the CLI method doesn’t work, so as a last resort, you can back-door it with a terminal program?? Is there any amplifying info out there on how to do that?

Hi @jfs

It sounds like you are on a PC which is great, but you need a driver for the CLI I believe. That’s the one platform I don’t use, so perhaps @kennethlimcp knows for sure.

You can setup a Photon or Core using just a terminal emulator like PuTTY on a PC. When the device is in listening mode with slow flashing deep blue LED, it is also connected to USB serial.

When you open up a terminal for the correct COM port, and type “v”, you should get a response like “system firmware version: 0.4.4”. If you don’t, something is wrong with your terminal program setup.

Then type a “w” to start the setup process. You enter your SSID (WiFi name) and security mode and password. There is a bug on Photon in 0.4.4 that you have to push the reset button after you get the " Spark <3 you!" message–this is already fixed in the next release.

This process was doc’ed for Cores but Photon has the more convenient for most SoftAP mode to setup and I didn’t see it in the Photon doc.

@jfs,

try what @bko mentioned. Place the Photon? in Listening mode and use a terminal to send v after that try w

bko,

Unsurprisingly, that doesn’t work either. I connected the photon using TerraTerm. Typing V does nothing. Typing W does start the setup process, so the terminal is working properly. I get through typing in the password, it blinks green for a couple of cycles, tells me “Thanks! Wait while I save those credentials…”, then it goes back to blinking blue.

It freezes and doesn’t respond to any other terminal requests. Tried resetting and doing the process 3 times with the same result.

Hi @jfs

If the “v” command does not work, you are running an older version of the two-part system firmware. The CLI would be the easiest way to update that I know you have had install trouble.

Can you run dfu-util? If you can make that it work, you can get your device up to the latest level. See the releases page here:

Note that dfu-util produces a “bogus” error at the end about getting status after downloading–you can ignore that and it is fixed in 0.4.5.

bko,

I truly appreciate your help…thanks!

I have CLI up and running. I can do particle login from a command prompt, get logged in to my account and all, but then I try the “EASY” method according to:

and type in “sudo npm update -g particle-cli && particle update” per the instructions, and it tells me “sudo is not recognized…”

And I try putting it in DFU mode with the blinking yellow led, and type in: “dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.5-photon.bin” per the instructions, and I get “dfu-util is not recognized…”

Do you think I’ve got a bum version of CLI? I just downloaded it a few days ago…

Ok, now I’m finding out that I have to install a 7th program/software suite, Zadig, to try and get the photon to work on a Windows machine.

No, really…seven. Open SSL, Visual Studio, Git, .net, Python, the CLI package, and now Zadig. I’ve been an EE for 18 years, and have never seen the likes of having to install 7 things on my computer to get a device to work. kenneth, I found your tutorial at:

Thanks for posting that tutorial. You yourself said “instructions for installing the DFU-driver is a little vague”. I would have used “non existent”:

From: https://github.com/spark/firmware/releases:

“The local DFU-UTIL method can be applied to offline devices locally over USB using dfu-util
-Put the device in DFU mode (flashing yellow LED)
-open a terminal window, change to the directory where you downloaded the files above, and run these commands…”

No mention of the DFU-UTIL install process that you kindly spelled out. I’ll give that a shot tomorrow if I can muster the willpower to fight with this thing any more.

I actually just got an email from Particle saying a new unit has been shipped. Here’s a thought: Maybe it’ll have run-able firmware on it!! After all, the one I have IS a week old…

@jfs,

to really do a fix via DFU-util, you just need to download the driver + DFU-utility. Or maybe Zadig and you will be good to go!

Kenneth/BKO,

I’m back…I’ve got my replacement photon, and I had a fleeting glimmer of hope. I used the app, and all went well. It “completed setup successfully”, it blinked magenta for a while, so I thought all was well and it was updating the firmware as advertised, then eventually it flashed cyan, then went to “breathing” cyan. I was overcome with joy…for about 10 seconds.

Then it went back to flashing green. So I figured it had to reconnect or something. I let it sit for about 15 minutes flashing green. I tried cycling power, and it still just flashed green.

So then I tried going through all of it again. The site https://docs.particle.io/guide/getting-started/start/core/ says to “hold down the mode button” to get it back to blinking blue. There is no mode button! A few weeks ago, I dismissed that as a typo on the web site, but it’s still there. Does anyone QC the documentation?? I have learned if you hold down the reset, then the setup button, then maybe the reset again, eventually some random combination gets it back to blinking blue.

Once I got it back to listening mode, I went back through the setup process through the app, and it once again said “setup completed successfully”. But now, after setup completes, it just flashes blue at me. I select “set up a photon” in the app again, and it shows up again. I tried it 4 times, and each time it says “setup completed successfully”, and then it just goes back to blinking blue.

I tried pulling it up on a terminal and typing “v” as suggested in earlier posts. That does nothing again.

Any ideas?