[Solved] Serial Monitor stopped working AGAIN

I’ve been happily working for days now using the serial monitor to render data.

My code came to the point where I needed to start thinking about power management, and in a recent post, someone mentioned that the sleep function did not work all that great in firmware 0.6.0. I checked my firmware version and I had 0.6.0 so I went looking as to how to upgrade, thinking I was out of date.

I came across the Firmware Manager topic on the Guide and decided to install it as it was advertised as it was the app that would indicate if I was out-of-date or current.

I ran the application install with admin privileges, and I was presented with an empty dialog. A few seconds later I get a tiny dialog entitled Fatal Error! with the content of Win error -1.

I close down the failed install and just decide to proceed as planned with learning/integrating sleep() into my program.

In my loop I put this
Serial.println("Night Night");
System.sleep(5); // sleep 5 seconds
Serial.println("Wakey Wakey");

I flash my photon and the light breaths white, and does not wake up…

I put the photon in Safe Mode, take out the 3 new lines, and flash.
The photon is now breathing blue again.

The problem is now

  • The serial monitor does not work at all.
  • Clicking connect does nothing. The Enter String to Send text field flashed with a blue border for a slight second, but nothing else
  • I was using COM4 for days and now COM5 is only available.
  • If I change the Baud Rate field, I get a popup dialog in the upper right corner stating Uncaught TypeError: Invalid "baudRate" must be a number got: 4800

I have:

  • rebooted
  • unplugged - replugged
  • changed usb ports
    *…

Help please

Here is my Device Manager.

Got it working… I had to manually change the COM port from 5 to 4 in the Device Manager. COM4 did however say it was in use but I went ahead in the change thinking that the firmware install was the one responsible for the mess up. I can now view the serial monitor output on COM4 in the IDE

I think it should be possible to lock the assigned COM Port for your Photon devices with a Registry hack. Anybody who makes a lot of something with an FTDI chip in for example will quickly grow tired of a machine that ends up with 200+ com ports assigned. The fix is detailed in an FTDI application note (and elsewhere) and one would assume you can do the same for the Photon when equiped with the correct Vid and Uid codes.