Question: How can we set up a Raspberry Pi camera as an ethernet USB device to avoid using WiFi

warren is asking a question about raspberry-pi
Follow this topic

by warren | December 15, 2017 16:59 | #15376


Configuring WiFi can be an extra step that's just one more possible point of failure when using a #raspberry-pi as a camera (see #pi-camera). This is covered in this activity:

https://publiclab.org/notes/partsandcrafts/12-03-2017/setting-up-the-raspberry-pi-camera-for-wireless-streaming

Instead of getting it on the same WiFi network, @wmacfarl suggested configuring it as an ethernet "linux gadget". Where's some documentation on how to do this, and would it make it as simple as plugging the Raspberry Pi into your laptop or phone with a USB cable and navigating to http://raspberrypi.local?



5 Comments

Have got it to work before in a pi zero (no WiFi). Key thing is to make sure the micro usb you use is also a data cable. That’s one very frustrating evening i’m never going to get back.


OMG I know what you mean, @wmacfarl and I have been talking about how one tiny thing can ruin your whole day when working with Raspberry Pis. And I think there's some ambiguity about whether this technique would use the USB port or the power port on the Pi Zero!!!


It would use the USB port. The zero is wired to draw power through it as well as data.

I've just enabled it on the Pi zero i'm using at work. You can edit the relevant files over ssh and then reboot it. Saved me having to disassemble the whole spectrometer to get the micro-sd out.


Reply to this comment...


I got this running -- it was pretty simple to change a couple files in the boot drive. But I found that it wasn't easy to just connect via a web browser -- you have to configure your laptop to connect properly to the Pi's network, which isn't easy for everyone.

Instead, i'm going to try to get the Pi to produce a WiFi hotspot, called "Microscope" (for this application) which you connect to and it auto-directs you to the microscope page.

Then as a next step, if you still need internet access, it's apparently possible for a 2nd wifi interface on the Pi to connect in turn to another wifi network. I want to make it possible to configure that connection from the hotspot welcome page... !!! Meta, but it could be pretty seamless once it works.

https://howtoraspberrypi.com/create-a-wi-fi-hotspot-in-less-than-10-minutes-with-pi-raspberry/ and also https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/

Reply to this comment...


Log in to comment