0

Is it possible to connect to the "Pi zero W" via usb-network, while wifi connection is already set up and working?

My observation:

1.) initial Pi Zero W setup. Pi is attached to the notebook (OS: linux/debian) via usb and the network over usb is working correctly.

2.) ssh into the Pi zero is working (via usb-network). Now I set up wifi (lets say with static IP)

3.) reboot Pi. It's still connected to the notebook. Now the Pi is correctly working with wifi, I can see it in the router interface and successfully connect to it's wifi-ip address

4.) but now it's not possible anymore to connect to it via usb.

Is this by design? Should it be possible to ssh into the pi via usb and wifi in parallel?

(use-case: I want to take the pi with me and want to have the option to connect to it, even if static IP or DHCP is not working)

  • Show the output of ip addr, in the question. – ctrl-alt-delor Apr 20 at 17:48
  • How do you install Debian on the RasPi? How do you setup OTG Gadget mode with Debian? What driver do you use? How do you configure WiFi? Do you use default Debian ifupdown? – Ingo Apr 20 at 19:01
  • @Ingo There was a misunderstanding. Notebook: Debian / RasPi: Raspbian. I cleared that up in the question. I did not use ifupdown. I configured wifi via the interfaces file. I did not use special drivers, just the default @ ctrl-alt-delor I will give this information the next days. But the interface had no ipv4 anymore. – eli Apr 20 at 21:02
0

As you ask, the behavior you described is by design. You have two connections to the same network. The RasPi can only use one. It is not possible to use both connections as separate connections at the same time. This is an issue of network design divided in subnets and routing policies.

It is possible to use both connections together as one connection to improve performance. This is done with bonding but it isn't an easy task, mostly used in professional environments and probably not what you want.

To examine in detail what causes your behavior you should use the commands ip addr and ip route. I guess you will have two default routes with different metric and the lower metric is on the WiFi interface.

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.