1993eg1
Posts: 2
Joined: Sat Apr 06, 2019 1:56 pm

PI Zero W USB Gadget WIFI NOOB alart

Sat Apr 06, 2019 11:37 pm

I am trying to get both the WiFi and Ethernet gadget on a PI Zero W working at the same time.

Following Adafruit's wright up https://learn.adafruit.com/turning-your ... net-gadget I can get Ethernet Gadget working, and by using wpa_supplicant.conf I can get WIFI working. but not both at the same time. My question is can I use USB gadget and WiFi at the same time? If so could you provide some reading or search terms so i could get time working.

Thanks
1993eg1

mattmiller
Posts: 2061
Joined: Thu Feb 05, 2015 11:25 pm

Re: PI Zero W USB Gadget WIFI NOOB alart

Sun Apr 07, 2019 8:01 am

Hi
Could you describe what is not working for you in more detail?

And what is your end goal in wanting both working at the same time?

User avatar
thagrol
Posts: 1613
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: PI Zero W USB Gadget WIFI NOOB alart

Sun Apr 07, 2019 1:17 pm

It should be possible to get both working at the same time, there's no conflict between them.

However, much depends on what your end goal is and what hardware you're attached to the zeroW. Without being configured no packets will be routed between the two interfaces. Search googlw and the forum for NAT and iptables or see here: https://www.raspberrypi.org/documentati ... s-point.md

USB gadget mode is only usable when no USB slave devices are connected and with the zeroW connected to a USB host.

Depending on what you're trying to do there may also be routing isues you need to address oin the USB host.
This space unintentionally left blank.

User avatar
HawaiianPi
Posts: 4198
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: PI Zero W USB Gadget WIFI NOOB alart

Sun Apr 07, 2019 3:22 pm

1993eg1 wrote:
Sat Apr 06, 2019 11:37 pm
My question is can I use USB gadget and WiFi at the same time?
Yes, I've done it many times, and it doesn't require anything special. Properly configuring USB Ethernet Gadget mode and including a valid wpa_supplicant.conf file should just work. So either something is wrong with the way you have enabled Gadget mode, or something is wrong with your wpa_supplicant.conf file.

You could try the Raspbian Lite image I have pre-configured for USB Ethernet Gadget mode.
Click to download, 2018-11-13-raspbian-stretch-lite-Pi0USB.zip
SHA-256: 32ca25d28122cea2fd40d3f8d8c0e0ac2efd88fb5f569d0976828f42a604c2ed

It's the default Raspbian Stretch Lite image with Pi0(W) USB Ethernet Gadget mode and SSH enabled. Just write it you your SD card with Etcher, add your pre-confgiured wpa_supplicant.conf, and DO NOT modify anything else.
  • Put the card in your Pi0 or Pi0W
  • Connect a normal micro USB data cable to the USB data port of the Pi0 (the one closest to HDMI)
  • Do not connect anything to the power port (the one closest to the outer edge)
  • Connect the other end of the micro USB cable to your main PC and the Pi0 should start to boot
  • Note that the first boot can take awhile, so give it a couple of minutes before you try to SSH in
It should boot up in USB Ethernet Gadget mode, and you can SSH into: pi@raspberrypi.local (or pi@raspberrypi). You should also see it on your local WiFi network with an IP address you can SSH into.

If you are using an older version of Windows, or haven't installed the latest Windows 10 updates, then mDNS/Zeroconf may not be supported and resolving raspberrrypi.local will fail. Install Apple's Bonjour printer service (or update Windows 10) to add mDNS/Zeroconf support. For a cleaner install (minus extra Apple nonsense you don't need) extract BonjourPSSetup.exe to a folder and just install Bonjour64.msi (or Bonjour.msi for 32-bit).

If it doesn't work, check Device Manager to see what driver (if any) was installed.

If you don't see this USB Ethernet/RNDIS Gadget driver under Network adapters,
Image
then something is wrong with your Windows system (it's installing the wrong driver), and you can try this driver (all the details match the driver installed in my Win10 system). Other hardware - Acer USB Ethernet/RNDIS Gadget

If you DO see that driver but it has a problem, right click on it and uninstall it, then click on scan for hardware changes in the Action menu. If that doesn't fix it you can try the driver linked above.

This image was tested and confirmed working on a Pi0W with my Windows 10 notebook, another Raspberry Pi running Raspbian, and also my Chromebook.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

1993eg1
Posts: 2
Joined: Sat Apr 06, 2019 1:56 pm

Re: PI Zero W USB Gadget WIFI NOOB alart

Mon Apr 08, 2019 10:23 pm

Thank you for the replays! I hope to get some time to work on my project later this week. I will let you know how I make out.

1993eg1

Return to “Beginners”