Should Photon auto select external antenna when not specified?

Hi,

I have a Photon with latest firmware that once an external antenna was connected automatically switched to the external antenna (observed by the fact that before connecting it the connection about 20% of packets on the nRF24 module was received, 100% received after the external antenna was connected). THIS photon NEVER had an antenna preference specified (DEFAULT state).

The performance is the same as a 2nd Photon that had ANT_EXTERNAL specified and uses an external antenna.

The auto change of antenna in default state contradicts what the reference documentation state:
“If no antenna has been previously selected, the ANT_INTERNAL antenna will be chosen by default.” from https://docs.particle.io/reference/firmware/photon/#wifi
And what was discussed in Auto Antenna selection Photon.

Thoughts? Is the automatic switching in default state the latest behavior?

My understanding is that the antenna should be automatically selected by default. @mohit is this still the default behavior?

Thanks @will

From the documentation my understanding is that INTERNAL is automatically selected by default although it appeared that it may have switched automatically to EXTERNAL operation instead.

I’ll add that while the Photon in question is no longer in the default state, I’ve variously tested by setting the antenna to INTERNAL and then setting it to EXTERNAL. Overall I’ve had inconsistent results. Example, while setting it to INTERNAL and it was operating fine I unscrewed the external antenna and broadcasts started failing and then started working again when I screwed it in. But with later tests I couldn’t reliably reproduce the issue so there may be a different aspect in play with an external antenna screwed in regardless whether it is actually in use.

It may be that the antenna is selected at startup based on the strength of connection reported back to the MCU. In that case, it might not switch dynamically if you unplug or re-plug the external antenna after startup. That being said, I really ought to defer to one of our Embedded specialists here. @BDub and @mdma might also know.

OK, I like to have the reference documentation accurate for developers (and myself). However, I don’t foresee that it will be an actual problem for production. I can set ANT_AUTO to get the switching behavior (I assume the fast switching is based on signal strength if I need.