jimsynz

jimsynz

Ash Core Team

No wifi connection on Raspberry Pi Zero 2W

Hi folks. I just got my hands on a pi zero 2W and decided to have a play with nerves on it. I ran mix nerves.new, enabled the nerves_system_rpi_0_2, statically configured a wifi SSID and wrote the SD card with mix firmware.burn. I wanted to validate that my dev env was set up correctly and working.

I configured the network thusly:

config :vintage_net,
  regulatory_domain: "NZ",
  internet_host_list: [{"harton.dev", 443}],
  config: [
    {"usb0", %{type: VintageNetDirect}},
    {"eth0",
     %{
       type: VintageNetEthernet,
       ipv4: %{method: :dhcp}
     }},
    {"wlan0",
     %{
       type: VintageNetWiFi,
       vintage_net_wifi: %{
         networks: [
           %{
             key_mgmt: :wpa_psk,
             ssid: System.fetch_env!("DEFAULT_WIFI_SSID"),
             psk: System.fetch_env!("DEFAULT_WIFI_PSK")
           }
         ]
       },
       ipv4: %{method: :dhcp}
     }}
  ]

As far as I understand it, VintageNet will automatically start and connect without any further configuration, right? Looking at the logs in the UniFi console it doesn’t even appear to be trying to connect.

The actual code (such as it is) is available here.

I’m using MIX_TARGET=rpi0_2 and setting the DEFAULT_WIFI_SSID and DEFAULT_WIFI_PSK with an environment variable at build time.

Pointers appreciated.

Most Liked

jimsynz

jimsynz

Ash Core Team

I managed to get it to boot with the rpi3a nerves system, so I guess I’m unblocked for now.

jimsynz

jimsynz

Ash Core Team

So I just ran into this problem again with a Pi 0 2W and discovered that it was running out of RAM on boot. If your project is contains a lot of dependencies then you want to switch off the emulators embedded mode in your vm.args.eex. This will cause slower boots but it will actually boot without running out of RAM.

jimsynz

jimsynz

Ash Core Team

Well this explains much. It’s not even booting. I connected a serial cable and this is what I see:

[    7.218363] watchdog: watchdog0: watchdog did not stop!
[    8.237418] reboot: Restarting system
[    0.448748] EXT4-fs (mmcblk0p3): VFS: Can't find ext4 filesystem

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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
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
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
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
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
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
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement