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 ![]()
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:
mix nerves.new project_nameexport MIX_TARGET=rpi0mix deps.getmix firmwaremix burn(ask me correctly thesudopassword 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
. 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
.
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
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
.
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
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
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 ![]()
lawik
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









