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.

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.

1 Like

Totally agree. Today it seems to be happening again, so I am just leaving the Raspberry Pi connected and checking it from time to time. I also have a ping command being repeated, to ease to check if it is alive or not hehe.

Yes, I also have had many times devices with this unsyncrhonized indicator, for one or other reason, but I have never get an issue like this one.

After reading a bit better the logs, I really don’t see something unexpected nor strange, at least on the traces I got. Below there is a brief analysis of the RingLogger log:

  • At 20:26:34.680 began to boot: [info] Booting Linux on physical CPU 0x0.
  • At 20:26:34.795 it seems there was an “issue” with ramoops, but it doesn’t see something relevant: ramoops: uncorrectable error in header.
  • 20:26:56.357 [debug] VintageNet(usb0): :configured -> internal configure (VintageNetDirect) seems usb0 is configured. I share below this point the related log messages with usb0 after this one:
20:26:56.372 [warn] RouteManager: new set_connection_status usb0 -> :disconnected (Elixir.VintageNet.Interface.handle_event/4([file: ~c"lib/vintage_net/interface.ex", line: 343]))
20:26:57.138 [warn] dwc2 20980000.usb: supply vusb_d not found, using dummy regulator
20:26:57.139 [warn] dwc2 20980000.usb: supply vusb_a not found, using dummy regulator
20:26:57.140 [warn] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to device
20:26:57.247 [debug] VintageNet(usb0): :retrying -> usb0 up
20:26:57.251 [info] RouteManager: clear_route usb0
20:26:57.255 [info] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
20:26:57.257 [info] g_ether gadget.0: HOST MAC da:59:ce:55:42:bd
20:26:57.268 [info] g_ether gadget.0: MAC 02:e7:5f:27:20:67
20:26:57.269 [info] g_ether gadget.0: Ethernet Gadget, version: Memorial Day 2008
20:26:57.270 [info] g_ether gadget.0: g_ether ready
20:26:57.271 [info] dwc2 20980000.usb: bound driver g_ether
20:26:57.285 [warn] RouteManager: new set_connection_status usb0 -> :disconnected (Elixir.VintageNet.Interface.start_configuring/3([file: ~c"lib/vintage_net/interface.ex", line: 669]))
20:26:57.389 [info] dwc2 20980000.usb: new device is high-speed
20:26:57.406 [info] mdns_lite usb0/{172, 31, 97, 145}
20:26:57.457 [info] RouteManager: clear_route usb0
20:26:57.462 [info] dwc2 20980000.usb: new device is high-speed
20:26:57.484 [warn] RouteManager: new set_connection_status usb0 -> :disconnected (ifdown)
20:26:57.518 [info] dwc2 20980000.usb: new address 11
20:26:57.535 [info] RouteManager: set_connection_status usb0 -> :lan (ifup)
20:26:58.093 [debug] Responding to DHCP discover on usb0
20:26:58.096 [debug] Responding to DHCP request on usb0
23:11:55.159 [debug] Responding to DHCP request on usb0

I still think, after all of this, that it may be a non-Nerves issue and it is more related with my Raspberry Pi Zero.

I don’t know, that’s for sure. Hopefully someone else can chime in :slight_smile:

Why not connect a led to one of the IO pins and make it blink periodically from nerves?

If that works as expected, there is a very high chance the runtime works as expected and is stable.

1 Like

Sound like a good test to do! Thank you, @D4no0! I will try it and let you know the result.

1 Like