
Many ESP32 boards, LoRa and cellular modules and some radar modules come in a version with a tiny U.FL (also sold as IPEX) socket instead of an antenna printed on the board. That socket is for an external antenna: one outside a metal case, on a longer cable, or simply bigger than a board trace. A short U.FL to SMA pigtail turns the socket into a standard SMA connector, and the right antenna or adapter goes on from there. This guide covers what to buy, how the connector genders work out, what the pigtail costs in loss, and how to treat the fragile U.FL end.
When an external antenna helps
- The board sits in a metal case, which blocks a PCB antenna.
- The device needs more range, and a larger antenna or one mounted higher helps.
- You want to compare antennas, or measure the module’s output on an SDR or spectrum analyzer through an attenuator.
- The antenna has to point somewhere specific, as with a directional antenna for a fixed link.
Check before you start which socket the module has and which antenna port the firmware uses. Some modules have both a printed antenna and a U.FL socket with a selector; many module families are sold as separate versions with one or the other.
Getting the genders right
A typical pigtail has a U.FL plug on one end, which snaps onto the socket on the module, and an SMA male on the other: a coupling nut with a centre pin. That plugs straight into anything with an SMA female port, such as many antennas for test use, SDRs and spectrum analyzers (N-type inputs via an N to SMA adapter). Most screw-on antennas sold for routers and modules have an SMA male or an RP-SMA male base instead; for an SMA male antenna, add an SMA female–female barrel.
RP-SMA is the trap. It uses the same thread but swaps the centre pin and socket, so an SMA female and an RP-SMA male screw together with no centre contact (socket against socket), and an SMA male on an RP-SMA female puts two pins against each other. An RP-SMA antenna will not screw onto this pigtail at all, and on an SMA female–female barrel it screws on but makes no contact. Use an SMA female to RP-SMA female adapter. Look into the antenna base before connecting; our SMA vs RP-SMA adapter guide shows how to tell them apart.
What the pigtail costs

RG178 is thin, so it loses more per metre than thicker cable, but a pigtail is short. The datasheet gives at most 0.28 dB at 1 GHz and 0.52 dB at 3 GHz for 10 cm, and 0.45 and 0.83 dB for 20 cm; 30 cm is not listed and falls between the 20 and 50 cm values. 2.4 GHz Wi-Fi and Bluetooth sit between the 1 and 3 GHz columns. The pigtail sits in both directions of a two-way link, cutting what the module sends and what it hears by the same amount, and if the other end also has a cable, its loss adds too, so keep the pigtail as short as the case allows and use thicker cable for any longer run (see our coax loss explainer).
The assembly is specified at VSWR 1.50, a return loss of about 14 dB, rated for DC–6 GHz. The antenna’s own match usually matters more; our VSWR explainer shows what the numbers mean.
Treat the U.FL end gently
- U.FL connectors are made to be mated a small number of times. Plug the pigtail on once, during assembly, and leave it.
- Press straight down over the socket until it clicks; do not rock it on at an angle.
- To remove it, lift straight up at the connector body with a U.FL removal tool, never by pulling the cable.
- Fix the cable to the board or case near the plug, so the weight of the SMA end and the antenna does not pull on the socket.
- Do all repeated plugging at the SMA end, which is made for it.
Certification and output power
Radio modules sold for products are certified with particular antennas. Swapping in a different antenna, especially one with higher gain, can take a finished product outside what that certification covers. On the bench you are still responsible for staying within the local radiated power limit, so with a higher-gain antenna you may need to lower the module’s transmit power; for a product, check the module’s certification documents for the approved antenna types and gains before you choose one. When you connect the SMA end to test equipment instead of an antenna, put an attenuator in front of the instrument input.
Formula sheet
Every formula and key number from this page on one A4 sheet, to print or keep next to the bench: download the formula sheet (PDF, 1 page). Free to print and share.

-

SMA Female to SMA Female Straight Adapter, DC–18 GHz
$8.00 Buy Now -

SMA Female to SMA Reverse Polarity Female Straight Adapter, DC–18 GHz
$20.00 Buy Now -

SMA Male to SMA Male Cable Assembly, RG316 Series Flexible Coax Cable, DC–3 GHz
From $22.00Reset options200 mm300 mm500 mm800 mm1000 mm1200 mm1500 mm2000 mmSelect options This product has multiple variants. The options may be chosen on the product page
FAQ
How do I add an external antenna to an ESP32?
Use a module or board version with a U.FL socket, plug on a U.FL to SMA pigtail, and connect an antenna for the band (2.4 GHz for Wi-Fi and Bluetooth) with the matching SMA gender, or an adapter.
Is U.FL the same as IPEX?
Sellers often use both names for the same small snap-on connector, and the cable end is sometimes labelled IPEX female. Some IPEX series, such as MHF4, are smaller and do not mate with U.FL, so check the socket on the module’s datasheet.
Will an RP-SMA Wi-Fi antenna fit an SMA pigtail?
Not directly: both ends have coupling nuts, and on an SMA barrel the centre contacts do not meet. Use an SMA female to RP-SMA female adapter, or choose an SMA antenna.
How much signal does the pigtail lose?
Little when short: the datasheet gives at most 0.83 dB at 3 GHz for 20 cm.
How many times can I plug a U.FL connector?
Only a small number; check the connector maker’s datasheet. Plug it once and do repeated connections at the SMA end.
Sources and method
- Supplier cable-assembly datasheet for an SMA male to U.FL (IPEX female) RG178 pigtail assembly: DC–6 GHz, VSWR 1.50, maximum insertion loss by length at 1 and 3 GHz.
Loss values are datasheet maximums; nothing here is a measurement.