How to Connect Your Arduino and Find Its COM Port on a PC

ArduinoBy November 15, 2026Fact-checked by Hugo Lindgren
How to Connect Your Arduino and Find Its COM Port on a PC

By Fact-checked by Hugo Lindgren Published

A COM port is Windows’ name for a serial connection. It can be a physical DB-9 socket or a virtual port that a USB or Bluetooth device creates. This guide covers how to find your port on Windows 11, Windows 10, macOS, Linux and Raspberry Pi, how to change its number, and how to fix it when an Arduino, ESP32, console cable or USB-to-serial adapter doesn’t show up.

Works onWindows, macOS, Linux
ForMakers, IT, POS
DifficultyBeginner
Time5 to 15 minutes
You needDevice and data cable

Key takeaways

  • COM is Windows’ name for a serial port. Most COM ports today are virtual ones created over USB or Bluetooth.
  • The fastest way to find a device’s port is to open Device Manager, unplug the device and see which COMx entry disappears.
  • To change a number, go to Properties > Port Settings > Advanced. Uninstall the greyed-out ghost entries first to free up low numbers.
  • On Arduino and ESP32 boards, a charge-only USB cable is the most common reason no port appears. Swap the cable before you reinstall any driver.
  • RS-232 signal levels can destroy a 3.3 V ESP32 or Pico. Put a level shifter such as a MAX3232 in between.

In this guide

  1. COM ports in 30 seconds (definition, COM vs USB, COM1 and LPT, are they still used?)
  2. How do I find my COM port on Windows 11 and Windows 10?
  3. How do I change or reset a COM port number?
  4. How do I list COM ports from the command line?
  5. COM ports on macOS, Linux and Raspberry Pi
  6. USB-serial chips and drivers
  7. COM port not showing up: fixes in order
  8. “Access denied” and “port busy” errors
  9. How do I connect an Arduino to my computer?
  10. Physical COM ports: DB-9, DB-25, RJ connectors, RS-232, RS-422, RS-485
  11. Are COM ports still used in 2026?
  12. FAQ

COM ports in 30 seconds

A COM port (short for “communication port”) is the name Windows gives a serial connection: COM1, COM3, COM7 and so on. It can be a physical DB-9 socket on an older PC, an industrial computer or a POS terminal. It can also be a virtual port that a device creates when you plug it in or pair it. USB-to-serial adapters, console cables, Arduino and ESP32 boards, and Bluetooth serial devices all work this way.

The device tells Windows it’s a serial device. Its USB-to-serial chip, native USB hardware or Bluetooth Serial Port Profile does the announcing. Windows loads a driver and gives the device the next free COM number. PuTTY, the Arduino IDE, a POS app or a Python script then opens that number and sends bytes back and forth as if a serial cable were attached.

Find my port now (Windows)

  1. Press Win + X and choose Device Manager.
  2. Expand Ports (COM & LPT).
  3. Unplug your device and see which COMx entry disappears.
  4. Plug it back in. The entry that comes back is your device’s port.

Serial port vs COM port vs RS-232

These three terms are related, but they mean different things:

  • Serial describes how the data travels: one bit after another over a single wire in each direction, framed by start and stop bits.
  • COM port is the label Windows software uses. Linux and macOS use device files such as /dev/ttyUSB0 or /dev/cu.usbmodem1101 for the same thing.
  • RS-232 is one electrical standard for serial signals, with specific voltages and a typical DB-9 connector. RS-422, RS-485 and 3.3 V/5 V TTL UART are other standards.

On a maker’s desk they fit together like this: an Arduino’s UART speaks TTL serial, a USB bridge chip turns that into USB, and Windows shows the result as a COM port.

Is a COM port the same as a USB port?

No. A USB port is a physical connector and bus. A COM port is a software identifier for a serial channel. A USB device can present itself as a COM port, and that’s how every USB-to-serial adapter and almost every development board works. Your keyboard, webcam and flash drive also use USB, but they never get COM numbers because they aren’t serial devices.

COM1, COM3 and LPT: what the names mean

COM1 and COM2 are the traditional names for a PC’s built-in serial ports. That’s why USB adapters usually start at COM3 or higher. LPT (“line printer terminal”) is the separate parallel printer port, and it isn’t a COM port. A parallel port sends several bits at once over a wider connector. Windows lists both under “Ports (COM & LPT)” only because they share a Device Manager category.

Are COM ports still used?

Yes. The DB-9 socket has mostly disappeared from consumer laptops, but virtual COM ports still carry most Arduino and ESP32 uploads, many switch console sessions and many POS peripherals. The section “Are COM ports still used in 2026?” near the end lists where you’ll meet them.

How do I find my COM port on Windows 11 and Windows 10?

Open Device Manager, expand Ports (COM & LPT) and read the number in brackets after your device’s name, for example “USB-SERIAL CH340 (COM5)”. The steps are the same on Windows 11 and Windows 10.

Device Manager (devmgmt.msc)

  1. Press Win + R, type devmgmt.msc and press Enter. You can also right-click Start and choose Device Manager.
  2. Expand Ports (COM & LPT).
  3. Find the entry with a COM number in brackets.

The device name tells you which chip, driver or link type you’re dealing with:

Device Manager name What it means
USB Serial Device (COMx) Native USB CDC ACM device on Windows’ built-in usbser.sys driver (Leonardo, Pico, Uno R4, ESP32-S3 native USB, many modems and instruments)
Arduino Uno (COMx) or similar Arduino’s own signed driver, installed with the IDE, has claimed the board
USB-SERIAL CH340 (COMx) WCH CH340/CH341 bridge chip, common on clones and cheap ESP32 boards
Silicon Labs CP210x USB to UART Bridge (COMx) CP2102/CP2102N/CP2104 bridge, common on ESP32 and NodeMCU boards
USB Serial Port (COMx) FTDI chip such as FT232RL on its VCP driver, common in console cables
Prolific USB-to-Serial Comm Port (COMx) PL2303 adapter, usually a USB-to-RS-232 cable
Standard Serial over Bluetooth link (COMx) Bluetooth Serial Port Profile (SPP). Usually comes in pairs (incoming and outgoing) and goes away when you remove the paired Bluetooth device
Communications Port (COM1) A real motherboard serial port, or a virtual one from firmware

Did you know?

Microsoft’s USB driver installation documentation says Windows 10 added a class INF, Usbser.inf, that loads the in-box usbser.sys automatically for any USB CDC ACM device. On Windows 8.1 and earlier, the same devices needed a custom INF before they got a COM port.

The unplug-and-watch trick

When a list holds several COM ports, don’t guess. Keep Device Manager open, unplug the device and see which entry vanishes. Plug it back in and the same entry returns, sometimes with a new number if you used a different USB socket.

This answers the common complaint “I can’t verify what COM port I am using.” It works for any USB serial device: development boards, GPS receivers, 3D printers, LoRa modules, barcode scanners and console cables.

Maker tip

In Device Manager, choose View > Devices by connection. Each serial device then appears under the exact USB hub and port it’s plugged into, so you can tell two identical CH340 boards apart.

Virtual COM ports that aren’t USB

Not every mystery COM number comes from a USB cable. There are three other common sources, and each creates a port that software opens like any other COM port.

Source How it appears When you’d meet it
Bluetooth SPP Two “Standard Serial over Bluetooth link” entries per paired device Bluetooth GPS units, OBD-II readers, label printers, an ESP32 running BluetoothSerial
Serial device server (Ethernet or Wi-Fi to serial) A COM port from the vendor’s redirector driver, or a network socket using RFC 2217 Reaching RS-232/RS-485 equipment over a LAN in factories, labs and POS back offices
Virtual null-modem driver Two linked COM ports, where data written to one comes out of the other Testing serial software or linking two apps on one PC without hardware

With Bluetooth, the side that starts the connection decides which port is used. The outgoing port connects your PC to the remote device. The incoming port listens for the device to connect to the PC. On Windows 11, open Settings > Bluetooth & devices > More Bluetooth settings > COM Ports to see which is which. If old Bluetooth pairs clutter the list, removing the Bluetooth device removes its ports too.

Did you know?

The protocol many Ethernet-to-serial servers use dates from October 1997. That’s when the IETF published RFC 2217, the Telnet Com Port Control Option, written at Cisco Systems so PCs could dial out through modems on a network access server. Its option 44 still lets software set the baud rate and toggle DTR and RTS on a port across the network.

No “Ports (COM & LPT)” section? What that means

If that section is missing, Windows currently has no serial device at all. Device Manager isn’t hiding COM numbers. A laptop with no serial hardware and nothing plugged in simply doesn’t show the node.

That explains a well-known Microsoft Q&A thread where a user wanted to reach a network switch’s console but couldn’t find a COM port. The laptop needed a USB-to-serial adapter or USB console cable first. Once you plug in a working adapter with its driver, the section appears. The “Add legacy hardware” wizard won’t help with USB adapters.

If the section is still missing after you plug in a device, look under Other devices or Universal Serial Bus controllers. An “Unknown USB Device” or a yellow warning triangle means the driver or the cable is the problem. The troubleshooting section covers both.

To see ports for devices that aren’t plugged in right now, choose View > Show hidden devices. Old, greyed-out entries appear under Ports (COM & LPT). They’re useful when you clean up stale numbers.

How do I change or reset a COM port number?

Open the port’s Properties in Device Manager, go to Port Settings > Advanced, pick a new COM Port Number, then restart. Two connected devices can’t share a number, and the change may not fully apply until the device re-enumerates or Windows restarts.

Assign a new number

  1. Open devmgmt.msc and expand Ports (COM & LPT).
  2. Right-click your device and choose Properties.
  3. Open the Port Settings tab and click Advanced.
  4. Choose a new number from the COM Port Number list.
  5. Click OK twice, then restart the PC, or at least unplug and replug the device.

A fixed number matters whenever software stores the port. Typical examples are POS apps driving receipt printers and scales, label printers, lab instruments, vendor flashing tools, and CNC senders such as UGS or Candle. Windows keeps COM settings per device instance, and an adapter that reports a unique USB serial number is easier for Windows to recognise as the same device. A board without one can sometimes end up with a new COM number after you move it, so plugging it into the same socket each time helps keep the number stable.

Bluetooth SPP ports don’t have an Advanced number setting that sticks reliably across re-pairing. If an app needs a fixed Bluetooth port, note both numbers after pairing and avoid unpairing.

Free up “in use” numbers

Every new adapter or board takes a COM number, and Windows keeps that number reserved after the device is gone. After a year of plugging things in you can end up at COM23, with the low numbers marked “(in use)” in the dropdown. To reclaim them:

  1. In Device Manager, choose View > Show hidden devices.
  2. Expand Ports (COM & LPT). Greyed-out entries are devices that aren’t plugged in.
  3. Right-click each one you no longer own and choose Uninstall device.
  4. Restart, then assign the freed number to your current device.

Windows records these reservations in a bitmap value called ComDB, under HKLM\SYSTEM\CurrentControlSet\Control\COM Name Arbiter. Microsoft doesn’t document that value. Uninstalling ghost devices is the safe route. Editing ComDB by hand without a registry backup is not.

You can also pick a number marked “(in use)” and accept the warning. That’s safe only if the old device that held the number will never come back.

Old software that only sees COM1 to COM9

Some older terminal programs, POS drivers and firmware flashers list only COM1 to COM9. Moving the device to a free low number is the quickest fix. The section “COM10 and above” further down explains the reason for the limit and gives the code fix for developers.

How do I list COM ports from the command line?

PowerShell gives the most complete list: query Win32_PnPEntity for names that contain “(COM”. The more obvious class, Win32_SerialPort, usually leaves out USB adapters, so it misses most of the ports people actually use.

PowerShell

This command lists every device with a COM number, including CH340, CP210x, FTDI, Prolific, Bluetooth and native USB devices:

Get-CimInstance Win32_PnPEntity |
  Where-Object Name -match 'COM\d+' |
  Select-Object Name, DeviceID

A WMI filter does the same job a little faster:

Get-CimInstance -ClassName Win32_PnPEntity -Filter "Name LIKE '%(COM%'" |
  Select-Object Name

Don’t rely on this one:

Get-CimInstance Win32_SerialPort | Select-Object DeviceID, Description

Win32_SerialPort mainly describes hardware serial ports. On many systems it returns nothing, or only COM1, even with three USB adapters plugged in.

The .NET method is quick but has caveats:

[System.IO.Ports.SerialPort]::GetPortNames()

It reads port names from the registry, so it can list stale entries or names that are no longer correct, and the order of the results isn’t defined. It’s fine for a quick look, but check against Device Manager or the Win32_PnPEntity query before you trust a number.

Command Prompt

In CMD, mode with no arguments shows the status of every serial device it can query:

mode

Each port appears as “Status for device COM5:” followed by its baud rate and settings. A port held open by another program may not show up, so mode isn’t fully reliable. For a raw list of what Windows has registered, read the serial device map:

reg query HKLM\HARDWARE\DEVICEMAP\SERIALCOMM

The output pairs internal driver names such as \Device\Serial0 or \Device\USBSER000 with their COM numbers. It lists only ports that are present right now.

Python / pyserial

pyserial works the same way on Windows, macOS and Linux, so it’s a handy cross-platform check:

pip install pyserial
python -m serial.tools.list_ports -v

The -v flag adds the description and USB VID:PID for each port. For example, a CH340 shows 1A86:7523 and a CP2102 shows 10C4:EA60. To list ports inside a script:

from serial.tools import list_ports for port in list_ports.comports():
    print(port.device, "|", port.description, "|", port.hwid)

Each line of output gives the port name (COM5 on Windows, /dev/ttyUSB0 on Linux), the driver’s description and the hardware ID string with VID:PID. If the script prints nothing, pyserial didn’t detect any serial port, so work through the cable and driver checks below.

Requirements: the PowerShell commands use only built-in cmdlets. The Python sample needs Python 3 and pyserial 3.5. The C sample in the COM10 section builds with MSVC or MinGW-w64.

Every method compared

Method OS Command or path Shows USB adapters? Best for
Device Manager Windows 10/11 devmgmt.msc > Ports (COM & LPT) Yes Visual check, renumbering, drivers
PowerShell PnP query Windows 10/11 Get-CimInstance Win32_PnPEntity Yes Scripts, remote checks
Win32_SerialPort Windows Get-CimInstance Win32_SerialPort Usually no Built-in motherboard ports only
.NET GetPortNames Windows [System.IO.Ports.SerialPort]::GetPortNames() Yes, may include stale names Quick lookup
mode Windows mode Partly (skips busy ports) Checking baud and settings
Registry SERIALCOMM Windows reg query HKLM\HARDWARE\DEVICEMAP\SERIALCOMM Yes, present ports only Driver names behind each COM number
Arduino IDE 2.3.10 All Tools > Port or board selector Yes Uploading sketches
pyserial All python -m serial.tools.list_ports -v Yes Cross-platform scripts, VID:PID
ls / dmesg Linux, Pi OS ls /dev/ttyUSB /dev/ttyACM Yes Headless systems
ls macOS ls /dev/cu.* Yes Terminal users

COM ports on macOS, Linux and Raspberry Pi

macOS and Linux don’t use COM numbers. A serial port there is a device file under /dev. The naming pattern tells you which kind of chip you have, so you can usually spot your device without unplugging it.

macOS: cu vs tty

Open Terminal and run:

ls /dev/cu.*

Bridge chips (CH340, CP210x, FTDI) show up with names like /dev/cu.usbserial-110 or /dev/cu.SLAB_USBtoUART. Native USB boards show up as /dev/cu.usbmodem1101 or similar.

Each port also has a /dev/tty.* twin. The tty version is meant for incoming connections and can wait for a carrier-detect signal before it opens. The cu (“call-up”) version opens right away. Use cu.* in the Arduino IDE, screen or Python.

Linux: ttyUSB vs ttyACM and the dialout group

On Linux, the driver decides the name:

  • /dev/ttyUSB0, ttyUSB1 and so on: USB bridge chips handled by kernel drivers such as ch341, cp210x, ftdi_sio and pl2303.
  • /dev/ttyACM0 and up: native USB CDC ACM devices, including the Uno R3 (whose ATmega16U2 runs CDC firmware), Leonardo and Pico.
  • /dev/ttyS0 and up: built-in hardware UARTs, including motherboard COM1.

To see what the kernel does as you plug in, run this, then connect the device:

sudo dmesg -w

You’ll see a line such as “ch341-uart converter now attached to ttyUSB0”. For names that don’t change between reboots, look in /dev/serial/by-id/. Those links include the chip’s vendor and serial number, which helps when you run two devices at once.

The most common Linux error is “Permission denied” on /dev/ttyACM0 or /dev/ttyUSB0. Arduino’s support article “Fix port access on Linux” gives the fix: add your user to the dialout group, then log out and back in.

sudo usermod -a -G dialout $USER groups

Debian, Ubuntu and Raspberry Pi OS use dialout. Some Arch-based systems use the uucp group instead.

Raspberry Pi GPIO UART: serial0, ttyS0, ttyAMA0, ttyAMA10

A Raspberry Pi has hardware UARTs on its GPIO header: TXD on GPIO14 (physical pin 8), RXD on GPIO15 (physical pin 10) and GND on physical pin 6. These are 3.3 V signals. Raspberry Pi OS provides stable aliases so your code doesn’t need to know which UART is wired where:

  • /dev/serial0 is the primary UART and /dev/serial1 the secondary one. Both are symlinks.
  • On models with built-in wireless and Bluetooth (Pi 3, Pi 4, Zero W), the mini UART (/dev/ttyS0) is primary by default, and the PL011 (/dev/ttyAMA0) drives Bluetooth.
  • On those models, turning the UART on with enable_uart=1 fixes the core clock at 250 MHz, so the mini UART’s baud rate stays stable.
  • On Raspberry Pi 5, /dev/serial0 points to /dev/ttyAMA10, the UART on the small 3-pin debug connector between the HDMI ports. The GPIO14/15 UART is /dev/ttyAMA0 once you enable it with dtparam=uart0=on in /boot/firmware/config.txt.

Run ls -l /dev/serial* on your own board to confirm the mapping, because config.txt overlays can change it.

Which USB-serial chip is on your device (and does it need a driver?)

Read the small chip next to the USB socket, or check the Device Manager name. Native USB devices and FTDI chips usually work on Windows 11 straight away. CH340 and CP210x often install through Windows Update but sometimes need the vendor’s package. Older Prolific chips aren’t supported on Windows 11.

Chip Common devices Windows Device Manager name Driver on Windows 11 Linux name Notes
Native USB (CDC ACM) Leonardo, Micro, Uno R4, Pico, ESP32-S3/C3 USB Serial Device (COMx) Built in (usbser.sys) /dev/ttyACM0 Ports setup class, no download
ATmega16U2 Genuine Uno R3, Mega 2560 Arduino Uno (COMx) or USB Serial Device Built in, or Arduino driver from the IDE /dev/ttyACM0 Firmware-based CDC bridge
WCH CH340/CH341 Nano clones, ESP32 DevKit clones, Wemos D1 mini USB-SERIAL CH340 (COMx) Often via Windows Update, else WCH CH341SER /dev/ttyUSB0 Most common chip on budget boards
Silicon Labs CP210x ESP32 DevKitC, NodeMCU v1 Silicon Labs CP210x USB to UART Bridge (COMx) Often automatic, else Silicon Labs VCP driver /dev/ttyUSB0 Universal driver 11.x supports Windows 10 1803+ and 11
FTDI FT232R and family Console cables, older Nanos, FTDI breakouts USB Serial Port (COMx) Usually via Windows Update /dev/ttyUSB0 Watch out for counterfeit chips
Prolific PL2303 USB-to-RS-232 cables Prolific USB-to-Serial Comm Port (COMx) GC/GL/GT chips only /dev/ttyUSB0 HXA/TA/TB/HXD/RA/SA/EA not supported on Windows 11

Native USB devices (CDC ACM)

Some boards have a microcontroller with USB built in: the ATmega32U4 on the Leonardo, the RP2040 on the Pico, and the ESP32-S3 and ESP32-C3. Others, like the Uno R3, run a small USB-to-serial firmware on a second chip. Either way they report themselves as USB CDC ACM devices. Microsoft’s Windows 10 serial changes put these devices in the Ports setup class under usbser.sys, added selective suspend support, and opened them to apps through the Windows.Devices.SerialCommunication namespace.

One quirk: on a native USB board, the sketch running on the board creates the port. If your code crashes the USB stack, the port vanishes. On a Leonardo, double-tap reset. On a Pico, hold BOOTSEL while you plug it in to get a fresh port or drive.

A stale vendor INF can also override usbser.sys and cause a Code 10 error on Windows 10 and 11, as Microsoft Q&A threads describe. Uninstalling the device and ticking “Attempt to remove the driver for this device” usually lets Windows fall back to its own driver.

CH340/CH341, CP210x, FTDI

These are separate bridge chips: USB on one side, a 3.3 V or 5 V UART on the other, wired to the microcontroller’s TX and RX pins. The bridge also drives DTR and RTS, which the Arduino IDE and esptool pulse to reset the board into its bootloader.

  • CH340/CH341 (WCH): Windows 11 often fetches the driver through Windows Update. If it doesn’t, install the official CH341SER package from WCH’s own website. Forum users have reported Windows Update replacing a working driver with an older one, so if uploads break overnight, check the driver version first.
  • CP210x (Silicon Labs): the CP210x Universal Windows Driver 11.x line covers CP2102, CP2102N, CP2104 and their relatives on Windows 10 version 1803 and later and Windows 11. Download it from Silicon Labs’ own CP210x VCP drivers page, not from driver-bundle sites.
  • FTDI: usually installs automatically through Windows Update, and FTDI publishes its VCP drivers on its own site. Cheap boards sometimes carry counterfeit FT232 chips that behave unpredictably with genuine FTDI drivers, so buy from reputable sellers.

Prolific PL2303 “PHASED OUT SINCE 2012”

Prolific’s product notice states that Windows 11 and later are not supported for its end-of-life PL-2303HXA, TA, TB, HXD, RA, SA and EA chips, and it recommends the PL-2303GC as the replacement. On an affected adapter, Device Manager shows a warning with text such as “PHASED OUT SINCE 2012. PLEASE CONTACT YOUR SUPPLIER.”

Community notes on driver 3.9.0.2 say it checks for the HXA chip on every OS version, and that it works with TA/TB chips on Windows 11 but not with HXA. When an old cable fails, replace it with an adapter that uses an FTDI, CP210x or current Prolific GC/GT chip. Don’t use repackaged drivers from unofficial sites. They’re an easy way to get malware.

COM port not showing up? Fixes in order

Work through the fixes from cheapest to most involved: cable, USB socket, driver, then device-specific tricks. Most “no port” problems end at step one or two.

  1. Swap to a known data cable. If the port appears, the old cable was charge-only.
  2. Plug directly into the PC. Skip hubs, docks and front-panel sockets. Try a USB 2.0 port if your PC has one.
  3. Check Device Manager for unknown devices. A yellow triangle or “Unknown USB Device” points to a driver or cable fault.
  4. Install the right chip driver, using the table above.
  5. Remove stale drivers if you see Code 10, then replug.
  6. For ESP32 upload failures, use the BOOT button method below.
  7. Clean up ghost ports with Show hidden devices if the numbers keep climbing.
What you see Likely cause Fix
Power LED on, no port, no Device Manager change Charge-only cable Use a data cable you’ve tested
“Unknown USB Device (Device Descriptor Request Failed)” Bad cable, flaky port or damaged board Different cable and port, no hub
Device under Other devices with a yellow triangle No driver for the bridge chip Install the CH340, CP210x or FTDI driver
Code 10 on USB Serial Device Stale vendor INF overriding usbser.sys Uninstall device and driver, replug
“PHASED OUT SINCE 2012” End-of-life Prolific chip on Windows 11 Replace the adapter (PL2303GC, FTDI or CP210x)
Bluetooth COM port listed but won’t open Using the incoming port for an outgoing link, or device asleep Use the outgoing port, wake or re-pair the device
Port appears, then vanishes during upload Native USB board resetting, or a power dip Double-tap reset, use a powered port
“Failed to connect to ESP32: No serial data received” ESP32 didn’t enter download mode Hold BOOT while upload starts
“Access is denied” or “port busy” Another program holds the port Close the Serial Monitor, PuTTY, slicers, scripts
Linux “Permission denied” on /dev/ttyUSB0 User not in dialout or uucp group usermod, then log out and back in
CH340 attaches then disconnects on Ubuntu brltty claims the CH340’s USB ID Remove the brltty package if you don’t use a braille display
Old tool can’t see COM12 Software only handles COM1 to COM9 Renumber to a free low port, or use \.\COM12

Charge-only cables

A USB cable that came with a power bank or toy often has only the power wires and no D+ and D− data lines. The board lights up, so everything looks fine, but Windows never sees a device. Arduino forum troubleshooting threads keep naming this as the reason ESP32 boards don’t show a port.

You can’t tell by looking. For proof, a multimeter set to continuity can check the data pins end to end. A simpler test is to plug the cable into a phone and see whether file transfer works.

Maker tip

Keep one labeled, known-good data cable on your bench for each plug type. Test with it before you reinstall any driver.

Unknown USB Device / Code 10

When Windows has no USB-serial driver for a device, it registers an “Unknown USB Device” and doesn’t assign a COM port. For a bridge chip, installing the vendor driver fixes it. For a native USB device showing Code 10:

  1. Right-click the device and choose Uninstall device.
  2. Tick “Attempt to remove the driver for this device” if it’s offered.
  3. Unplug the device, wait five seconds and plug it back in.
  4. Windows should rebind usbser.sys and show “USB Serial Device (COMx)”.

Complaints such as “No port after installing the driver” or “Windows 11 Device Manager does not show ESP32 with CP2102” usually lead back to step one of the fix list. The driver is fine, but the cable or socket isn’t passing data.

ESP32 “Failed to connect” vs no port at all

These two problems look alike but need different fixes. “No port” means Windows can’t see the bridge chip. “A fatal error occurred: Failed to connect to ESP32: No serial data received” means the port works but the ESP32 didn’t reset into its bootloader.

For the second error, hold the BOOT button (GPIO0), click Upload, and let go once the output shows “Connecting….”. If it still fails, lower the upload speed to 115200 in the Tools menu. Also check what’s wired to the strapping pins listed in your chip’s datasheet. On the original ESP32, GPIO0 and GPIO2 affect the boot mode and GPIO12 sets the flash voltage, so a circuit that holds them at the wrong level can stop the chip from booting.

“Access denied”, “port busy” and other open errors

A COM port normally belongs to one program at a time, so most “access denied” errors on Windows go away when you close whichever other app has it open. Linux and very old Windows software add two more causes: group permissions and the COM10+ naming rule.

Only one app can own a port

On Windows, opening a COM port gives that program exclusive use of it. “Access is denied” or “Port busy” usually means one of these is still running:

  • The Arduino IDE Serial Monitor or Serial Plotter, sometimes in a second IDE window
  • Cura, PrusaSlicer, OctoPrint or Pronterface connected to a 3D printer
  • PuTTY, Tera Term or a terminal in VS Code
  • A POS or label-printer service that grabs the port at startup
  • A Python script you forgot to stop, or a background vendor utility

Maker tip

Before every upload, close the Serial Monitor, slicer, PuTTY session or Python script that’s using the board. The IDE can reopen the monitor right after the upload finishes.

Permission denied on Linux

“Permission denied on /dev/ttyACM0” and “Arduino can’t access /dev/ttyUSB0” have the same cause: serial device files belong to a group your user isn’t in yet. Run sudo usermod -a -G dialout $USER (or use uucp on Arch-based systems), then log out completely and back in. Don’t run the IDE with sudo as a workaround. It creates root-owned files in your sketch folders.

COM10 and above: the \.\COM10 rule

Microsoft KB 115831 explains that the Win32 CreateFile call can’t open COM10 or higher by its plain name. You have to use the device path \\.\COM10. A plain “COM10” returns INVALID_HANDLE_VALUE. The \\.\ form also works for COM1 to COM9, so well-written code always uses it.

\#include <windows.h>
\#include <stdio.h>

int main(void) {
    HANDLE h = CreateFileA("\\\\.\\COM10", GENERIC_READ | GENERIC_WRITE,
                           0, NULL, OPEN_EXISTING, 0, NULL);
    if (h == INVALID_HANDLE_VALUE) {
        printf("Could not open COM10, error %lu\n", GetLastError());
        return 1;
    }
    printf("COM10 opened\n");
    CloseHandle(h);
    return 0;
}

The doubled backslashes are C string escaping: the literal "\\\\.\\COM10" becomes the path \\.\COM10 at runtime. This rule is why some old terminal programs and firmware flashers list only COM1 to COM9. If you can’t change the code, give the device a lower number in Device Manager.

How do I connect an Arduino to my computer?

Connect the Arduino with a USB data cable. The operating system loads a serial driver and creates a port, and you select that port in the Arduino IDE. Once you have the right cable, the job takes about five minutes.

What you need

  • An Arduino or compatible board (Uno R3, Uno R4, Nano, Leonardo, ESP32 DevKit, Pico and so on).
  • A USB cable that carries data, with the right plug for your board. The Uno R3 uses USB-B, many clones use Micro USB, and newer boards use USB-C. Our guide to micro USB vs USB C covers adapters.
  • Arduino IDE 2.3.10, the current 2.3.x release, or another tool that can open a serial port.
  • On Windows, the right driver for your board’s USB chip. Many chips need nothing extra (see the chip table above).

Connect and upload, step by step

  1. Plug the cable straight into a USB port on the computer, not into a hub or monitor port, for this first test.
  2. Watch for the board’s power LED. A lit LED proves the board has power, not that data is getting through.
  3. Open Arduino IDE 2.3.10. Click the board selector at the top of the window, or go to Tools > Port.
  4. Pick the entry that names your board, or the COM port you identified in Device Manager.
  5. Paste the test sketch below, click Upload, then open Tools > Serial Monitor and set it to 9600 baud.
// Minimal serial test: prints a counter once per second
unsigned long counter = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.print("Hello from the board, count = ");
  Serial.println(counter++);
  delay(1000);
}

Expected result: the IDE reports “Done uploading” and the Serial Monitor prints a new line every second. If you see that, the cable, driver and COM port all work, and you can move on to bigger Arduino projects. Our Arduino IDE guide covers board packages and libraries in more depth.

Physical COM ports: DB-9, DB-25, RJ connectors, RS-232, RS-422, RS-485 and TTL

Physical serial ports still matter wherever cables run long or equipment is old: POS terminals, PLCs, lab instruments and network gear. The key fact for makers is that an RS-232 port and a board’s UART pins carry the same data at very different voltages, so you can’t connect them directly.

Connector types you’ll meet

DB-9 (strictly, DE-9) is today’s standard PC serial connector. Older PCs and modems used the 25-pin DB-25 for serial, but most of those pins went unused, which is why IBM moved to 9 pins. DB-25 was also the parallel (LPT) printer connector. On PCs the serial DB-25 was usually male and the parallel one female, so check the gender and the manual before you plug anything in.

POS hardware and network gear often put serial on modular jacks instead. Receipt printers, customer displays and terminals from vendors such as NCR use 6-pin RJ-11/RJ-12 serial ports, and managed switches use RJ45 console ports. These all need the vendor’s adapter cable or a DB-9-to-RJ adapter wired for that device, because pinouts differ between vendors.

DB-9 pins that matter

On a PC-side (DTE) DB-9 connector, a working link often needs only three pins. The rest are handshake and control lines.

DB-9 pin Signal Purpose
2 RXD Receive data (into the PC)
3 TXD Transmit data (out of the PC)
5 GND Signal ground, always connect
4 DTR Data Terminal Ready; on Arduino bridges it pulses reset
7 RTS Request To Send; ESP32 bridges use it with DTR for auto-boot
8 CTS Clear To Send, hardware flow control
6 DSR Data Set Ready
1 DCD Data Carrier Detect
9 RI Ring Indicator

TX on one side always goes to RX on the other. Two DTE devices need a null-modem cable, which swaps pins 2 and 3.

Serial standards at a glance

Standard Voltage levels Devices per line Max distance Typical use
TTL UART 0 V and 3.3 V or 5 V 1 to 1 A few feet Board-to-module links, GPS, Bluetooth modules
RS-232 About ±5 to ±15 V, inverted logic 1 to 1 About 50 ft (15 m) PC COM ports, console cables, POS peripherals, legacy instruments
RS-422 Differential pair 1 driver, up to 10 receivers Up to roughly 4,000 to 4,900 ft (1,200 to 1,500 m) at low speeds Long point-to-point industrial runs
RS-485 Differential pair, multi-drop Up to 32 unit loads Similar to RS-422 Modbus RTU, PLCs, building automation

Switching a port between RS-232, RS-422 and RS-485

On many industrial, embedded and panel PCs, one COM port can run as RS-232, RS-422 or RS-485. Depending on the vendor, you choose the mode in the BIOS, with jumpers or DIP switches, or with both. Check the motherboard or system manual before you change anything, because setting only half of it is a common reason a port stays silent.

The approach differs from vendor to vendor:

Method How it works Examples from vendor manuals
BIOS only A serial port mode option, usually under Super IO or Serial Port Configuration Some OnLogic systems; Schneider Electric’s Box iPC Optimized, which has no hardware switch
BIOS plus jumpers Pick the mode in the BIOS, then move board jumpers to match Lanner appliances (BIOS default is RS-232, jumpers inside the chassis); DFI boards, whose manuals say COM pin functions follow both the BIOS and a jumper setting
Switches or jumpers only DIP switches or per-port jumpers set the mode in hardware Schneider Magelis boxes (DIP switch), multi-port serial add-in cards

Three things catch people out after the switch:

  1. The pinout changes. RS-422 and RS-485 use the DB-9 pins differently from RS-232, so the RS-232 pin table above no longer applies. Use the pin assignments for the chosen mode from the manual.
  2. Termination and bias can be separate settings. On some boards and cards, RS-485 termination resistors and bias are extra jumpers, and long buses need them set correctly.
  3. Windows doesn’t show the mode. Device Manager still lists the port as “Communications Port (COMx)” whatever its electrical mode, so check the BIOS screen or jumpers to see how it’s set.

If the PC’s port is RS-232 only, or the PC has no serial port at all, use a USB-to-RS-485 or USB-to-RS-422 converter instead. It shows up as an ordinary COM port, usually with an FTDI, CP210x or CH340 chip inside, so the driver advice in the chip section applies. An RS-232-to-RS-485 converter on an existing DB-9 port is the other route.

RS-232 vs TTL UART: don’t fry your ESP32

Power check

RS-232 lines can swing to about ±12 V or more. Wiring them straight to an ESP32, Pico or Raspberry Pi GPIO pin (3.3 V max) can damage the pin or the chip. Always use a MAX3232-type level shifter.

TTL and RS-232 differ in both level and polarity: RS-232 represents logic 1 as a negative voltage. A MAX3232 runs from 3 V to 5.5 V and handles both. This is a typical hookup between an ESP32 DevKit’s UART2 and a bare MAX3232 chip. Pin numbers are for the 16-pin DIP; breakout modules print their own labels.

From pin To pin Wire purpose
ESP32 GPIO17 (TX2) MAX3232 pin 11 (T1IN) Board data out to shifter
ESP32 GPIO16 (RX2) MAX3232 pin 12 (R1OUT) Shifter data in to board
ESP32 3V3 MAX3232 pin 16 (VCC) 3.3 V supply
ESP32 GND MAX3232 pin 15 (GND) Common ground
MAX3232 pin 14 (T1OUT) DB-9 pin 2 of the far device RS-232 transmit
MAX3232 pin 13 (R1IN) DB-9 pin 3 of the far device RS-232 receive
MAX3232 pin 15 (GND) DB-9 pin 5 Signal ground

The bare chip also needs four 0.1 µF charge-pump capacitors; modules already include them. For RS-485, use a transceiver such as a MAX485-family part or a 3.3 V equivalent, and connect every node to a common ground reference.

Connecting to a network switch console

Most managed switches and routers have a console port, either an RJ45 socket labeled CONSOLE or a USB console port. With a USB-to-RJ45 console cable (FTDI-based cables cause the least trouble), find the COM number in Device Manager and open it in PuTTY. Set Connection type to Serial and use 9600 baud, 8 data bits, no parity, 1 stop bit (8-N-1), no flow control unless the vendor’s manual says otherwise. Press Enter a couple of times to bring up the prompt.

Are COM ports still used in 2026?

Yes, constantly. The DB-9 socket has mostly disappeared from consumer PCs, but virtual COM ports are everywhere in hardware work:

  • Network gear from switches to firewalls uses console ports for first setup and recovery.
  • Point-of-sale systems still drive receipt printers, scales, customer displays and barcode scanners as COM devices.
  • Industrial PLCs and sensors use RS-232 and RS-485, often with Modbus RTU, and more and more often they’re reached through serial device servers.
  • Every Arduino, ESP32 and Pico upload goes through a serial port, along with every Serial.println() debug line.
  • 3D printers running Marlin firmware, and Klipper hosts, talk to their controller boards over USB serial.
  • GPS, LoRa and cellular modules use UART AT commands or NMEA sentences, often bridged to USB or Bluetooth for testing.

The same four habits work across all of them: find the port, match the baud rate, keep one program on it, and respect the voltage. For a maker, the next test of a two-way link is to print serial data on a small LCD, or switch a solenoid valve from commands you type into the Serial Monitor. For an IT or POS setup, the habit that pays off most is pinning each device to a fixed COM number and writing it down before the next Windows update or adapter swap.

FAQ

What is a COM port used for?

A COM port carries serial data between a computer and a device. Common uses include configuring network switches, connecting receipt printers, scales and barcode scanners to POS software, and talking to industrial controllers, GPS modules and lab instruments. Makers use it to upload sketches and read debug output.

Are COM ports still used?

Yes. Physical DB-9 ports are rare on new laptops, but virtual COM ports over USB and Bluetooth are used by console cables, POS peripherals, industrial equipment, 3D printers and every Arduino and ESP32 board.

Is a COM port the same as a USB port?

No. USB is the physical connection. A COM port is the serial channel Windows creates when a USB device says it’s a serial device. The same device can show up as COM5 in one USB socket and COM8 in another.

How do I find the COM port on my computer?

Open Device Manager (devmgmt.msc) and expand Ports (COM & LPT). Unplug your device and see which COMx entry disappears. On macOS run ls /dev/cu.*, and on Linux run ls /dev/ttyUSB* /dev/ttyACM*.

How do I check COM ports in Windows 11?

Right-click Start, choose Device Manager and expand Ports (COM & LPT). The number appears in brackets after each device name. For hidden or disconnected ports, choose View > Show hidden devices.

How do I list COM ports from the Windows command line?

In PowerShell, run Get-CimInstance Win32_PnPEntity | Where-Object Name -match 'COM\d+' | Select-Object Name. That list includes USB and Bluetooth ports. In CMD, mode shows ports and their settings, and reg query HKLM\HARDWARE\DEVICEMAP\SERIALCOMM shows the registered names.

Why is there no Ports (COM & LPT) in Device Manager?

Windows shows that section only when a serial or parallel port exists. If the PC has no built-in serial port and no working USB serial device is plugged in, the section doesn’t appear. Connect your device with a data cable and install its chip driver if needed.

What is COM1?

COM1 is the first serial port name in Windows. It traditionally belongs to a motherboard serial port, and on some PCs the firmware reserves it even with no visible connector. USB devices usually get COM3 or higher.

What does LPT mean in Ports (COM & LPT)?

LPT is the parallel printer port, a separate interface that sends several bits at once over a wider connector, often a DB-25. It isn’t a type of COM port. Windows just lists both in the same Device Manager category.

Why do I have two Bluetooth COM ports?

Bluetooth Serial Port Profile creates an incoming and an outgoing port for each paired serial device. Use the outgoing port when your PC starts the connection. Remove the Bluetooth device to delete both ports.

How do I change a COM port number?

In Device Manager, right-click the port, choose Properties > Port Settings > Advanced, pick a new COM Port Number, then restart. To reuse numbers marked “(in use)”, first uninstall the greyed-out ghost entries under Show hidden devices.

Can one COM port do RS-232 and RS-485?

On many industrial and panel PCs, yes. You select the mode in the BIOS, with board jumpers or DIP switches, or with both, depending on the vendor, and the DB-9 pinout changes with the mode. If your existing port or USB adapter doesn’t provide RS-485, you need a USB-to-RS-485 converter.

Why does my Arduino or ESP32 not show a COM port?

The usual causes, in order: a charge-only cable, a hub or faulty USB socket, a missing CH340 or CP210x driver, or a stale driver causing Code 10. If the port appears but uploads fail with “No serial data received”, hold the ESP32’s BOOT button while the upload starts.

Notes on this article

Written by

Grace writes Artoo Maker Lab's Arduino and electronics basics guides, plus sensors, modules and workshop tools like soldering irons. She explains circuits the way she would want them explained on day one, with the wiring, the numbers and the common mistakes.

Covers: Electronics Basics, Arduino

  • Fact-checked by Hugo Lindgren against the sources listed below before publication.
  • Published

Fact-checking

  • Researched from 8 sources, listed below.
  • Every claim is checked by Hugo Lindgren; anything we cannot confirm is corrected, labelled or removed.
Sources (8)
  1. USB serial driver (Usbser.sys) installation based on compatible IDs – Microsoft Learn (learn.microsoft.com)
  2. What is new with Serial in Windows 10 – Microsoft Tech Community (techcommunity.microsoft.com)
  3. USB Serial Device Code 10 – Microsoft Q… (learn.microsoft.com)
  4. How to check COM port in Windows 11 (virtual-serial-port.org)
  5. How to check COM port in Windows – AGG Software (aggsoft.com)
  6. HOWTO: Specify Serial Ports Larger than COM9 (KB 115831) (support.microsoft.com)
  7. PL2303 issues Prolific USB to serial drivers Win 11 – Microsoft Tech Community (techcommunity.microsoft.com)
  8. Prolific PL2303 driver notes – ViaThinkSoft (viathinksoft.com)