ivanhercaz

ivanhercaz

Not being able to connect to RPi0 with new Nerves project

Hi everyone!
Long time that I don’t ask a question here, I hope to not being rusted :crazy_face:

But yes, there is a long time that I don’t install Nerves inside a Raspberry, so maybe my issue is related with some step or something that I am not remembering.

The case is that I am trying to use nerves_system_rpi0 in Raspberry Pi Zero (V1.3) but after do all the initial steps, I am not being able to access its iex with ssh nerves.local. ping nerves.local don’t return results too.

The steps I am done, from the initial one, are:

  1. mix nerves.new project_name
  2. export MIX_TARGET=rpi0
  3. mix deps.get
  4. mix firmware
  5. mix burn (ask me correctly the sudo password and apparently it finishes correctly).

Then I insert the SD card into the Raspberry Pi Zero, connect it with an USB (that I confirm it works as data transfer, not only load), and try:

  • ping nerves.local, returns “ping: nerves.local: Nombre o servicio desconocido”.
  • ssh nerves.local, returns “ssh: Could not resolve hostname nerves.local: Name or service not known”.

Then I checked if it may be because I am connecting the USB to a USB hub connected to my laptop, but it doesn’t works connected to the laptop too. If I run lsusb, connected to any of two options, and in any USB port of my laptop, I get:

Bus 001 Device 052: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

This bus entry is the correct one (appears when connected, disappears when disconnected). I also can confirm I am connecting the USB in the data port of the Raspberry (the one in the middle between the micro-HDMI and the power port).

I doesn’t touch nothing of the configuration, because as I remember, this feature works without any extra configuration. I recheck several times the Nerves’s Getting Started and nerves_system_rpi0 documentation, but I don’t see something related to any extra step. I also checked if there is some issue related opened in the repository of the system, but there aren’t any one related with this issue I am having.

If there is any more I can do to try to debug this issue, I will do whatever to get more information. But at this moment I can’t think of what else to do :sweat_smile: . And of course, if you think it may be an issue with the system, I can open one in the repository to try to help to solve it.

There is also the possibility that this Raspberry is broken or the USB port of it is broken or something else. There is a lot of time without use, but I think the last time I use it works :thinking: .

Of course, thank you very much in advance for reading this long text!

Regards

Update (2024-10-01 22:03)

I finally achieve to access to the RPi0 without doing nothing. It seems something was “broken” inside and it wasn’t fixed until some hours. Maybe a clock issue? Because it is unsynchronized:

  Uptime       : 3 hours, 7 minutes and 0 seconds
  Clock        : 2024-08-30 23:33:42 UTC (unsynchronized)

Maybe related with some residual file of the previous Nerves it was in the SD card?

I get the dmesg and RingLogger logs once I accessed and I saw strange things. But it is too late so I will review it tomorrow and I will share with you the interesting parts or maybe everything hehe.

Marked As Solved

ivanhercaz

ivanhercaz

TLDR: not a Nerves issue, it is an issue with my host system.


Some days ago I could test two new RPI Zero W, never used, with a new SD card, with a a proper USB cable and… none of them worked. I couldn’t connect to them, I lost a lot of time figuring out why. It was checking my host dmesg that I thought that maybe the issue was my host :sweat_smile: .

So I burnt a SD card with the example that uses VintageNet Wizard to setup a WiFi network and once I inserted the SD card, it works as expected: setup the AP, the captive portal works, connects to the WiFi network… But accessing it using SSH still didn’t work.

Finally, I tested them in a MacBook Pro (M1): make the firmware, burn the SD, inserted it in each RPi 0 and… it. worked as expected and without any issue.

What happens my host (Manjaro)? I think something was broken in some update of the system, some kernel update, some thing that I changed from the kernel or even some interference with another software.

I will try to figure out what it is the cause of this fail, but in the future, with time to invest in it, because by the moment it works perfectly in the MacBook.

Thank you both for the answers!

Regards,
Iván

Also Liked

lawik

lawik

Nerves Core Team

Check that you have avahi installed and running, including if it has some specific package related to mDNS. That’s how you get the hostname to resolve to IP. You can oossibly confirm this by checking what IP it got on wifi by logging into the router or checking from the Mac that already can connect.

I find it likely that you can connect to the IP from Manjato but not the hostname. That would imply that mDNS is not working well for you. I have had mDNS crap out for unclear reasons at various times.

kevinschweikert

kevinschweikert

You could also try GitHub - kevinschweikert/mndp: Elixir implementation of the Mikrotik Neighbor Discovery Protocol · GitHub als an alternative discovery mechanism to find the nerves device via USB :wink:

lawik

lawik

Nerves Core Team

Odd. What I have certainly seen is mDNS that broadcasts nerves.local not being picked up by the system. That is best effort and can fail if something is weird. I don’t know how to find the IP of a USB tethered device in a consistent way.

Time can affect a bunch of things but I have connected over SSH to devices that are way out if sync. So I don’t think that’s it.

Where Next?

Popular in Questions Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
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
yawaramin
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function: -dialyzer...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
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
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement