greghgradwell

greghgradwell

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!

Showing Posts 1 to 2

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 OP

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!

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews