DISCUSSION

Using RNDIS/Ethernet to connect Raspberry Pi Zero to computer network.

5 people are following

I would like to use the Raspberry Pi Zero to drive the display.

I did not want to have to run another Ethernet cable and/or have a network switch to give it a network not to mention also having a USB dongle.

 

Is there a way to enable the Ethernet over USB Driver on the mobros image?

IF not what would i need to add to gain this functionality?

 

If i was able to get the raspberry Pi zero connected to the computer over USB would i have to share my network to it? 

Could i just pass the mobros network to the raspberry pi only?

 

Thank you!

Replies 21 - 25 (25)

@arayray94 does the screen show anything at all on the pi?  What type of pi are you using?

Arvo Bowen III

@arayray94 does the screen show anything at all on the pi?  What type of pi are you using?

I'm using a pi zero w, I can get chromium to autostart but I can't get it to display my http://127.0.0.1:42100/ address. Any ideas?

@arayray94

You do not use the local address of the computer. You use the IP of the network that the PI zero creates. The Pi makes it's own Network adapter. This network adapter is the one you manually set the IP address to.  In the guide I set this to a static IP. You Connect the Pi to the IP address of the computer ON that specific network adapter. See:

EnDeR WiGGiN

Okay so I sorted out the firewall problem. It was just a misconfiguration of the static IP. You need to set a gateway on the PC (Windows 10) that is not the same IP as the PC. I used the Pi’s IP for this purpose. (Network profile not showing up when connecting to a Link local. E.g. USB Ethernet gadget). There will now be a prompt for whether or not it is a Public or Private network and the network profile is now present. 

New Computer IP address:

  • address 10.1.1.1
  • netmask 255.255.255.0
  • gateway 10.1.1.2

 

Raspberry Pi ip address:

  • allow-hotplug usb0
  • iface usb0 inet static
    • address 10.1.1.2
    • netmask 255.255.255.0
    • network 10.1.1.0
    • broadcast 10.255.255.255
    • gateway 10.1.1.2

 

After I figured this out I went back through the whole process again. These are the gotches.

  • When setting up the kiosk mode the test command did not work. Had to skip straight to the automatic boot step.
    • “1 :startx -- -nocursor” Did not work
  • I would set up kiosk mode and initial bringup on a raspberry pi 3B+. So that you have a keyboard and an ethernet connection to the internet. There are lots of updates that are easy to mess up.
  • If the Openbox configuration file (autostart) does not show up the install did not work properly.
    • Reinstall openbox
    • I just restarted (took a lot of time)
    • Also
  •  reboot the pi after each install. This is what I did to make sure that it all worked right.
  • Good internet connection (ethernet)
    • After the kiosk mode is working go ahead and add the USB to ethernet command in config file (Adafruit) using your PC. Then just move the SD card straight to the Raspberry Pi Zero. This will ensure a smooth transition.

 

This procedure should work for the Raspberry Pi Zero W as that is what I tested with. Using Raspberry Pi Zero and Pi 4 should be about the same but i have not tested those. If you want to use Raspberry Pi 3 Model A+ or Model A it should be similar with a different USB config command. Has for Any other Raspberry Pi this method will not work.

Also i have now overclocked the Pi zero and it feels like i am getting about double the FPS. It looks and feels a lot better. I did have to put a heatsink and a small fan to keep it cool. I have not done proper testing but it feels like it was 10 FPS and now it is 20 FPS. The max is 60 FPS. 

All that is left now is stuffing it in the computer and making it look nice!

 

EnDeR WiGGiN, 

PS: if you can't tell this is also a place for me to document how i did it ;)

Hey just saw that the USB gadget mode just got added to mainline. How is this going? Was anything implemented to be able to set USB mode via the interface? If you need me to test anything feel free to ask. @Seraksab 

@EnDeR WiGGiN 

yes indeed, I finally got around to add it :)
and yes, the network mode (ethernet or wifi) is now configurable in the wizard with ‘USB’ as an additional option on the Pi Zero

we'll release a first preview version of v12 for our patreons this or next week for testing
as soon as we have some feedback and have fixed the bugs that are pretty sure to appear, we will of course also release it for everyone

and thanks for the offer to test. I might hit you up on Discord regarding this
v12 comes with some quite big changes, so we definitely want to test it more extensively

Login to comment

Login
Like most websites, we also use cookies. But don't worry, we only use them for your login and statistics.