Auto-connecting external / internal LoRa antenna

We are using RAKBox-B2 enclosures with RAK4631 Core for LoRa transmission. We have an N-Type antenna mount on the enclosure for an external LoRa antenna, and also an internal LoRa antenna. Each has a U.FL pigtail. Currently we have to physically disconnect the U.FL connector to change which antenna the RAK4631 uses. Does anyone know of a product that will sit between these 3 components, and automatically connect the internal antenna when there is no external antenna connected? (thus saving the need to open the box and do “microsurgery”, when finding that the internal antenna won’t reach the gateway from a temporary location…)


You could use an antenna switch and control it with a GPIO, but I don’t have a solution or schematic for it.

I don’t see how you could detect that an external antenna is connected without further modifications.