Close and Re-open USB Serial connection without Photon restart?

Am sure that everyone has this issue, wondering if there is a solution.

Here is a description of the problem as a timeline:

  • PC starts
  • Photon with USB Serial output starts
  • Open terminal - can connect to serial port and see output
  • Close terminal
  • Attempt to re-open terminal - cannot connect to USB Serial port (bad, but expected)
  • Reset Photon
  • Open terminal - can connect to serial port and see output (good)

Would be real neat if there was some trick within the Photon application that could be deployed to overcome this.

What terminal program are you using on the PC?

On the Mac side, I can connect, disconnect and reconnect and still see serial output.

@cermak,

Forgot to mention, Windows 7 PC. The terminal program it PuTTy.

Have not doubt that there is no issue on a Mac!

This thread mentioned something about Windows and serial ports but for an unrelated issue.

@cermak,

That was me, @umd !!

1 Like

Ok. Do you have the CLI tools installed?

@cermak,

Yes, particle-cli installed. Am updating now.

See if particle serial monitor --follow works using the CLI.

@cermak, my particle-cli is completely broken for some reason… all commands bar help come back with replies similar to:

 particle: Unknown command: "login"

What is it that you are want me to test?

I was hoping the CLI command worked. If it did that would rule out the Particle device as the problem and point to Putty doing something odd when it closed down the connection. I am thinking it still might point back to a Windows driver issue.

EDIT: So, the deal with particle serial monitor --follow is you can start this command and it should start and restart the serial output if you pull out and put back in the USB port.

1 Like

@cermak,

Good line of reasoning. This prompted me to test again. Guess what?

PC starts
Photon with USB Serial output starts
Open terminal - can connect to serial port and see output (good)
Close terminal
Re-open terminal - can connect to serial port and see output (good)
Close terminal
Re-open terminal - can connect to serial port and see output (good)
Reset Photon
Open terminal - can connect to serial port and see output (good)

So, the problem has *mysteriously gone away… *

Thanks for assistance.

Let’s call this case closed!

Nope, I haven’t got this problem after closing/reopening PuTTY - only when resetting the device while the port is still open since Windows will assign a new port number.

Win7, 8.1 & 10, but since my Win7 is old it was heavily tweaked via Regedit over its lifetime, so that might be the reason why it works for me :wink: