0

I recently purchased a Raspberry Pi Zero W and have followed numerous tutorials on how to set it up headless, all without any success. I've tried turning it into a USB ethernet gadget rather than attempting to connect to my wifi, as well as attempted to connect through wifi.

Important info: OS: Windows 10 Using Raspberry Pi Imager - installing Raspberry Pi OS Lite (I have tried other installations too) No other Pi's connected to my network

1. Through USB ethernet gadget

  • Installed: Bonjour printing services, PuTTY

On a new copy of Raspberry Pi OS Lite on my MicroSD, I did the following:

  • Edited config.txt in Notepad++ to include:
dtoverlay=dwc2

at the bottom. Ensured that the EOL conversion was set to Linux.

  • Edited cmdline.txt to include:
modules-load=dwc2, g_ether

after rootwait. Made sure spacing was PERFECT (single line, no additional spaces, etc..).

  • Added an empty ssh file. Made sure to remove extension.

After this, I ejected the SD card and threw it into my Pi. I plugged my USB cable into the DATA port (not power) (I have tried multiple USB cables) and plugged it into my laptop. The Pi appears to boot up, with the light turning on and off for about a minute until it stays on.

Establishing an SSH connection through PuTTY does not work (using raspberrypi or raspberrypi.local as the host name), and the Pi does not appear under Device Manager. And so, this method has not worked for me.

2. Connecting to wifi

On a new copy of Raspberry Pi OS Lite on my MicroSD, I did the following:

  • Created blank SSH file
  • Added network info into a file called wpa_supplicant.conf using multiple variations of the following code:
country=CA
  ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
  update_config=1

  network={
      ssid="NETWORK-NAME"
      psk="NETWORK-PASSWORD"
  }

Yes, I entered my SSID and password correctly and made sure the formatting was correct. There are special characters in the network name (an apostrophe and a space. Would this have an impact on my ability to connect?) but not the password.

My wifi is 2.4G. I have made sure of this numerous times. I am not attempting to connect to 5G.

  • Ejected the SD card and threw it into my Pi. Powered up my Pi through USB (have tried both the power and data ports [on fresh installations]). Pi boots (flashing colour until it solidifies). I have looked for any sign of the Pi connected to my wifi, but it just doesn't exist.

In both the USB ethernet gadget and wifi cases, the SSH file is deleted after the Pi boots.

Not sure what else to try. I don't have the adapters to set up the Pi with a monitor and keyboard, nor do I have an additional monitor and keyboard, so I need to figure out a way to set this up headless. Any help is appreciated.

Thanks!

2
  • 1
    if you tried everything, then it would be working right now
    – jsotola
    May 6 at 1:40
  • @jsotola then tell me what to do wise one May 6 at 3:03
0

My solution: changing my SSID to exclude special characters and putting all other devices on 5G (other than my Pi and laptop) did the job. Hex encoding the SSID did not work.

Bye guys

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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