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!

Most Liked

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?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement