Earn Maker Points on Every Order! Learn More!

Raspberry Pi Zero W Headless setup – Windows 10 RNDIS Driver issue resolved

Back to Blog
pi-zero-w-headless-setup-factoryforward

Raspberry Pi Zero W Headless setup – Windows 10 RNDIS Driver issue resolved

Setting up a headless setup for Pi Zero W is simple. The limitation of Pi Zero and Zero W is that it doesn’t have an Ethernet port. All we have is a single USB port. We need to use it as an Ethernet via USB technique to access the Pi. There are many tutorials available for this. But if you are using Windows 10 you might be faced the problem with RNDIS driver. The RNDIS driver will install automatically on all operating systems but not in Windows 10. In Windows10 the Pi Zero W detects as a Serial USB Device instead of RNDIS Device. RNDIS is an Ethernet via USB driver which enables virtual Ethernet connection link between the Pi and your Laptop. I tried downloading the drivers and installed but most drivers didn’t work. Then finally I found a driver link in a forum and I tried installing it manually and it’s worked. So I’m going to explain the complete steps for this headless setup along with driver installation. If you are facing issue only at the driver installation part you can directly continue with step 9.

Hardware Required:

Software Required for Headless setup:

Optional Software:

Buy Raspberry Pi Zero W

The Pi Zero W has in-built Wi-Fi, so you can use the headless Wi-Fi Setup too. Check out the Headless Wi-Fi setup tutorial here.

Step 1: Format the SD card with SD card formatter.

1.Pi Zero W using RNDIS

Step 2: After formatting open Win32 Disk Imager (or Etcher), locate the downloaded Raspbian image file and flash it to the SD Card.

2.Pi Zero W using RNDIS

Note: NOOBs will not work with this set up (NOOBs is Just an OS installer). So, we need Raspbian. The Current version is Raspbian Stretch. A Raspbian OS is an image file with the ‘.img’ extension (It also comes with ‘.zip’ file you have to extract it before flashing).

Step 3: Once flashing done. Navigate to the SD Card folder. You can able to see the files extracted from the image.

3.Pi Zero W using RNDIS

Step 4: Now open ‘cmdline.txt’ file and add this at the end of the file. (Make sure it is at the end of the file not in newline).

modules-load=dwc2,g_ether

4.Pi Zero W using RNDIS

Step 5: Now we need to modify the ‘config.txt’ file. So open the ‘config.txt’ file in text editor. Then add the following line anywhere in the file (will be in a newline).

dtoverlay=dwc2

5.Pi Zero W with RNDIS

Now save this file and close it.

Step 6: SSH is disabled default in new Raspbian OS. You can enable it by simply create an empty file and name it as ssh without any extension. Make sure the file name extensions option is selected in windows view settings.

5.Pi Zero W with RNDIS

6.Pi Zero W with RNDIS

Step 7: Eject the microSD card from the computer and place it in the Raspberry Pi. Then connect the PC and Raspberry Pi via USB cable. You don’t need external power as the Pi zero W USB pin provides power as well as data transfer. Wait until the pi boots up completely. It might take up to 90 Seconds.

Step 8: If the RNDIS driver installs automatically then jump to Step 10 for SSH using Putty. If it installs as a USB Serial Device then continue the following steps. You can check this in Device Manager. In Windows 10 the RNDIS Driver installs as a USB Serial Device at COM Port. So we need to install drivers to manually enable Ethernet over USB.

Click here to download the RNDIS Driver which I got from this forum. Extract the downloaded zip files.

Step 9: Open Device Manager and you can see the Pi is detected as USB Serial Device at COM port under the PORTS & LPT. Right click on it and select “Update Driver Software”.

8.Pi Zero W with RNDIS

Select ‘Browse my computer for driver software’.

9.Pi Zero W with RNDIS

Choose the location where you extracted the driver files on your PC.

10.Pi Zero W with RNDIS

Select the Extracted driver folder which is mod-duo-rndis. Click ok and click Next. This will install the driver.

11.pi zero w with laptop-factoryforward -  -  -

12.Pi Zero W with RNDIS
Now you can able to see the Pi Zero W as RNDIS in Network adapters.

13.Pi Zero W with RNDIS
Step 10: Make sure you have installed Bonjour Service (Apple Inc.) on your PC. It is a service to discover the Shared resources on the network and web servers. If you have iTunes installed on your PC, then it had been already installed. If Bonjour is not installed then the Hostname will not be mapped with IP. So you are not able to use Hostname (eg: raspberripi.local) in Putty (You can use direct IP of Pi. But finding the IP will be complex for headless setup).

Open Putty and enter the Host Name as ‘raspberrypi.local’ and port as 22. Click open, this will open a terminal window asking for username and password.

14.Pi Zero W with RNDIS

Step 11: Enter the default username as ‘pi’ and default password as ‘raspberry’.

15.Pi Zero W with RNDIS

Step 12: Now type vncserver in the terminal window. This will run the virtual server on the raspberry pi.

16.Pi Zero W with RNDIS
Step 13: Now go to Google Chrome and open VNC Viewer App (You need to install from google apps store or visit website).

Step 14: Enter the Hostname as ‘raspberrypi.local:1’(Hostname or IP address of Pi with :1 at the end.)

17.Pi Zero W with RNDIS
Step 15: Now enter the Pi username and password. The default username is ‘pi’. The default password is ‘raspberry’.

11.Pi Zero W with RNDIS

Step 16: Congrats! You can access the raspberry pi with your laptop screen and keyboard now.

12.Pi Zero W with RNDIS

Other Headless Setup tutorials:

How to Connect Raspberry Pi with Laptop – Headless Setup Ethernet

Connect Raspberry Pi with Mobile Screen | Android | VNC Viewer

Share this post

Comments (22)

  • Simon Walters

    A couple of points
    You seem to have missed off installing Bonjour for Windows. Unless you do that, its unlikely that your Windows PC will know what IP address maps to raspberrypi.local

    Also, I’d personally recommend using sudo rasp-config to enable vnc server and rebooting the Pi rather than running vncserver manually as you’ll only have to do that once

    PS Much better to point to an official source of drivers than copy and host them yourself. People will feel safer that way

    January 23, 2018 at 5:56 PM
    • Sharath

      Thanks for informing Simon,

      I have updated about Bonjour service. And regarding the drivers, it is hosted on that MOD website only (They are using this driver for their musical devices). I have just added the direct download link.

      January 24, 2018 at 12:10 PM
      • savageriver

        Thank you for your solution
        After searching old forum and website about Raspberry Pi Zero W ( USB Device (COM3 – COM4 or COM5) then I found your website.

        Treid and verified : It is working with the last raspbian stretch version 2018-03

        Thanks again

        April 20, 2018 at 1:30 AM
        • Sharath

          Great! Help someone in need who was searching for it.

          May 11, 2018 at 5:24 PM
  • Thomas Friehoff

    Thank you very much! Your driver helped and was exactly what I was searching for.

    April 23, 2018 at 1:41 AM
  • brian

    Day three after formatting a working zero so i could record a fail-safe way of reaching a headless state.
    I know when I first tried it that I couldn’t get it to work, there is only so many times you can check your ssh file or wpa.conf. I ended up plugging in a Usb cable and assigning it an IP address.(if only I could remember how)
    Yesterday i watched over 30 YouTube tutorials “Pi zero headless” and none worked for me, no matter how many versions of raspian, how many versions of image writers, how many versions file editors.
    Today I found your post, yours is different than all the tutorials i did yesterday in the cmd.txt file, all the others had modules-load=dwc2,g_ether after “rootwait” and not at the end. Could this be my problem?
    Bonjour is in, RNDIS driver is in, the pi shows up as unidentified network and is unreachable with putty or Advanced IP Scanner. netstat -n netstat -a netstat -b don’t show it but it can’t be far away. ;-)

    May 15, 2018 at 4:13 PM
    • Sharath

      It doesn’t matter before or after rootwait. But one thing you need to care about is the space (Also Enter key or \n characters). Because, the program gets parsed one by one (each text is get parsed). So the enter (newline \n) will be parsed incorrect and won’t add the next text. So you need to be care ful on the space and newline. That’s y in the image I mentioned everything in single line (sublime text shows the line number. See the image).

      One more error will be the empty SSH File (It will get deleted every time you boot. It can be enabled permanently after you access the pi in pi config settings).

      If you want to backup your working Pi SD Card (Backup existing os settings) Check this tutorial – https://www.factoryforward.com/clone-raspberry-pi-sd-card/

      May 16, 2018 at 7:21 PM
  • Peter Schlemowitz

    For some unfathomable reason I could not get ssh to work independently, this was an extremely simpler solution.

    July 6, 2018 at 12:38 AM
  • Wesley

    The driver fixed the problems I had. Awesome. Many thanks!

    August 23, 2018 at 2:46 AM
    • Sharath

      You are always welcome Wesley :) Thumbs Up!

      August 23, 2018 at 11:59 AM
  • Vincent

    Very useful! In particular step 8 and 9 provided me the solution I was looking for (I’m using windows 10). I searched a long time on the net before finding this.
    Thanks again.

    October 13, 2018 at 6:34 PM
  • Lester Louch

    very interesting points you have remarked, appreciate it for putting up.

    December 20, 2018 at 4:11 AM
  • rob

    keeps saying connection timed out but it showing up on my devices. Its connected and stuff just cant ssh into can someone help me please? I put a new image on it
    my email is [email protected]

    December 29, 2018 at 10:19 AM
    • Sharath

      Check whether the Bonjour service is installed on your PC or not. If not you can’t use the ‘raspberrypi.local’ method.

      Alternatively, You need to find exact ip and use it.

      January 1, 2019 at 1:06 PM
      • Rupesh Pradhan

        Quote: “You can use direct IP of Pi. But finding the IP will be complex for headless setup” :EndQuote

        There a a tutorial on youtube how to get the exact IP address of the RPi

        https://www.youtube.com/watch?v=PWMVowAK6wg

        In the command prompt, one has to type the command

        arp -a

        which lists the IP addresses in use.

        All one has to do is look for an IP address which is marked as ‘dynamic’ which is the IP address of the RPi.

        By doing so, Bonjour will not be required.

        August 18, 2019 at 12:11 PM
  • Alfonso Reyes

    Hi, i’m just here to say thanks, i had a lot of problems with the connection using the local domain and your tutorial worked like a charm, is the only one that works for Windows 10, at least for me, thank you!!

    April 6, 2019 at 12:25 AM
  • Wibi

    Thanks a lot Sharath! I had exactly the same problem with raspbian buster, and now it works perfectly

    August 7, 2019 at 10:57 PM
  • benyi

    It worked !!! That make me crazy during a while and its finnaly ok !! Thank a lot you’re a genius !!

    May 17, 2020 at 7:57 PM
  • jieme

    Great tutorial, thanks !

    June 15, 2020 at 12:27 AM

Leave a Reply

Back to Blog