简体   繁体   中英

How to setup wlan0 in Nerves

I created a new Elixir Nerves project and try to connect my Raspberry Pi Zero W to the local wifi.

In my target.exs , I set the following config:

config :nerves_network,
  regulatory_domain: "US"

config :nerves_network, :default,
  wlan0: [
    networks: [
      [
        ssid: "wifi_ssid_here",
        psk: "my_password_here",
        key_mgmt: String.to_atom("WPA2-EAP-CCMP")
      ]
    ]
  ]

config :nerves_init_gadget,
  ifname: "wlan0",
  address_method: :dhcp,
  mdns_domain: "nerves.local",
  node_name: node_name,
  node_host: :mdns_domain

If I burn or push this config to my Raspberry Pi Zero W, it does boot, but I am unable to connect to it with eg ssh nerves.local or by going to http://nerves.local .

Does somebody know how to properly configure the Pi so that it connects to the wifi and is accessible under nerves.local ?

The problem was the authentication protocol WPA2-EAP-CCMP of the network. It usually requires an email + password combination, which I could not provide using nerves_network . I switched to a WPA2-PSK network, which only requires a password and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM