Photon V0.5.0 Listening Mode exit command problem

I have noticed a change in the operation of the listening mode within the last couple of firmware releases.
I am upgrading my Photons with older firmware by reflashing my code - which initiates a firmware upgrade.

Plug in USB to PC
Hold down setup for 3 secs
flashes blue

sudo screen -L /dev/ttyACM0 9600

press v for version
0.4.8

re-flash my original code which starts firmware upgrade
Now holding down the setup button for 3 secs no longer goes blue.
If I do :

sudo screen -L /dev/ttyACM0 9600

And then hold down the setup button for 3 secs it will now change to blue
press v for version
0.5.0

After more experimenting it seems to not enter listening mode when the usb on the photon is plugged into my pc.
If I power the circuit using the usb on my pc but not into the photons port it will enter listening mode.
if I power the photon using a psu in the photons port it will go into listening mode.

Its a small change in the way it works but is kinda confusing because it works differently when plugged into the PC than at other times.

I have noticed this same difference in 3 devices I have now upgraded.

I’m not aware of any change that would cause this and I can’t replicate that behaviour either.

Can you see how the devices behave with just tinker flashed and without any extra circuitry?

BTW: Why are you passing 9600 when opening the port? USB serial will ignore that setting (just as the device will not care with Serial.begin(WHATEVERHERE)), but there are special baudrates that cause the device to enter some special modes (e.g. YModem or DFU).

Ok I found a Photon which I got July last year, not in a circuit. I just connected it to my wifi only back then.
It went into listening mode connected to usb but I wasnt able to see the firmware using the usual method,
I guess it is from before that feature.

Anyway I upgraded it and the same thing - it wont go into listening mode when connected to my usb.

So I tried putting it into listening mode on another laptop and it always worked fine from that one -
five times in a row no problem.
Both machines are running linux mint cinnamon 17.3

The machine where it doesnt work right you can see that it usually flashes at least once with the blue led, but
then either immediately or after a few seconds it will not stay in listening mode. This is whether my code is on
the photon or tinker - same issue.

Perhaps it only happens on PCs with particular USB chips.

My half-baked theory: What if the Linux machine that’s not allowing listening mode is seeing a serial port come on line, since the Photon is in listening mode, and doing something to it, probably having something to do with thinking it’s a Linux serial console or dial-in device or dial-out device or something, and that’s triggering listening mode to exit? I’m not even sure that’s possible - just throwing it out there as something that crossed my mind. I have absolutely no proof that’s what’s happening.

Possibly - I don’t know how to check for such a thing.
I am getting an external drive for backup so I will see if I can install windows on it and try it from inside windows.

Might be ModemManager. I uninstalled it on my laptop and it’s been better for it. I used to get spurious characters sent from the laptop to my Core, especially just after it was plugged in. I generally use Minicom for diagnostics using the USB serial.

See whether modemmanager is running on both machines.

ps aux | grep -i modem

shows as /usr/sbin/ModemManager

Stop using: service modemmanager stop

As I said in my previous post, having it running causes problems. It sends characters (“AT” etc) down the serial line when I connect my Core to my Linux Centos7 laptop.

1 Like

Thanks @timx - I checked and modemmanager was running.
I stopped the service and tried again and I can put the device into listening mode now.

Strange how the behaviour changed between firmware versions though.

I’m not sure if it was there before but Listening mode has an exit command now to leave without having to reset the device.
But as I said there wasn’t any change that prevented the device from entering Listening mode, I never thought (or got the impression by your original description) that it entered but exited immediately again.