When I connect my Rpi zero w to my PC (windows 10 via usb cable, I cannot see it under com port devices of PC. I am connecting micro usb side to the socket labeled as USB on Rpi. I want to establish a serial communication between my PC (windows 10) and Rpi. Is not this such a normal thing that should work? What is wrong?

  • What have you done on the software side? Bare minis to add something like modules-load=dwc2,g_serial into command line...
    – user130616
    Commented Apr 23, 2021 at 15:34
  • @Andrew from raspi-config I enabled serial interface, other than that, I have not modified anything. I can ssh into it by the way. I wonder why my w10 pc does not even see/list rpi under com ports when it is connected via usb.
    – muyustan
    Commented Apr 23, 2021 at 15:37

1 Answer 1


The default serial port on the Pi is presented on the GPIO pins BCM 14 and 15 not over usb.

To create a serial port over USB you have to:

  1. Set up the Pi operating system first on the SD card
  2. When booted enable serial gadget mode on the Pi
  3. Reboot the Pi

To enable gadget mode issue the following from the Pi command line:

echo dtoverlay=dwc2 | sudo tee -a /boot/config.txt
echo 'dwc2' | sudo tee -a /etc/modules
echo 'g_serial' | sudo tee -a /etc/modules

After the rebootyou will have a device /dev/ttyGS0 that is the USB port.

  • Thank you for your answer, I will try these. However I am confused for one thing, I could make raspberry pi communicate with another microcontroller through that usb connection port. Rpi sees a device attached at /dev/ttyACM0 and I could use screen command to establish the connection. Is it normal to be able to do that with the microcontroller but not with the pc?
    – muyustan
    Commented Apr 23, 2021 at 16:10
  • it worked... though I have not completely understand the reason why I could use the serial port to communicate with a mcu before doing your suggested settings but not with pc.
    – muyustan
    Commented Apr 23, 2021 at 16:33
  • "understand the reason why" - because USB OTG Commented Apr 23, 2021 at 16:39
  • Controllers are configured to act as serial ports (normally in firmware on the chip) and have to be told how to act as a USB port in software. The zero range is a Linux computer and brings full USB support from boot and has to be told its a serial port, Ethernet network etc. To see more capabilities see gist.github.com/SeanMollet/67e2d3c7f49cdfee9c57542693e172f6 BUT note the os discussed is out of date
    – user130616
    Commented Apr 23, 2021 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.