greghgradwell

greghgradwell

Connecting multiple Raspberry Pi Zeros on a local wired network

Hello! Nerves/Elixir newbie here. I am trying to connect several Nerves devices on a local wired network without any sort of DHCP server, instead using an ethernet switch, with each device having a static IP address. Ideally severally of these devices would be R.Pi Zeros. Is it possible to use a microUSB-to-Ethernet adapter with Nerves on an R.Pi Zero? And if so, would the interface be usb0 or eth0? Would nerves_network be the way to go, or is something like VintageNet more appropriate? Or am I wasting my time trying to get the Zeros to work? If I have to, I will switch to using R.Pi 3Bs, but I would much prefer the form factor of Zeros.

Thanks in advance for any help/suggestions!

First 2 of 2 Posts! Switch mode

fhunleth

fhunleth

Co-author of Nerves

Sorry for the late response, but I wanted to post in case others came across this. It’s a good question.

First off, VintageNet is the way to go for all network now in my opinion. If nothing else, the maintainers of NervesNetwork have mostly moved on to VintageNet themselves and it’s easier for us to support.

Nerves has two official systems for the Raspberry Pi Zero. nerves_system_rpi0 is the one most people use. It sets up the RPi0’s one USB port into gadget mode so that you can connect it to a development machine and ssh in. nerves_system_rpi (no 0) also works on the Raspberry Pi Zero. It configures the USB port to host mode. That makes it possible to use a microUSB-to-Ethernet adapter with one caveat. The Linux device driver for your microUSB-to-Ethernet adapter will need to be added. The usual way of doing this is to figure out what driver gets used by plugging the adapter into a desktop Linux system and then creating a custom Nerves system with that driver loaded.

After doing all that, the USB-to-Ethernet adapter should show up as eth0. The VintageNet cookbook directions for setting up a wired Ethernet connection should work. If I’m wrong and the adapter shows up as something else, you can find it by running ifconfig at the IEx prompt. You can get to the IEx prompt over the RPi0’s UART pins.

greghgradwell

greghgradwell

No worries! I appreciate the reply, because it answered the piece I was missing, regarding the device driver for the Ethernet adapter. I was using the standard nerves_system_rpi build, which explains why the adapter wasn’t working. In the meantime I’ve been connecting my devices wirelessly using VintageNet, but at some point I will want to switch over to a wired network, so this was really helpful. Thanks!

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement