nerves-project-attic / nerves_interim_wifi

**Deprecated** Connect to WiFi networks on Nerves platforms
Apache License 2.0
21 stars 7 forks source link

Handle context for :up, :bound #12

Closed ConnorRigby closed 7 years ago

ConnorRigby commented 7 years ago

I'm not exactly sure what causes this in my environment, but i recently started hitting this:

** (FunctionClauseError) no function clause matching in Nerves.InterimWiFi.WiFiManager.consume/3
  (nerves_interim_wifi) lib/interim_wifi/wifi_manager.ex:149: consume(:up, {:bound, 
  %{ domain: "T-mobile.com", 
       ifname: "wlan0", 
       ipv4_address: "192.168.29.136", 
       ipv4_broadcast: "192.168.29.255", 
       ipv4_gateway: "192.168.29.1", 
       ipv4_subnet_mask: "255.255.255.0", 
      nameservers: ["192.168.29.1"]
  }
}, %Nerves.InterimWiFi.WiFiManager{
     context: :up, 
     dhcp_pid: #PID<0.496.0>, 
     ifname: "wlan0", 
     settings: [ssid: "supersecretssid", key_mgmt: :"WPA-PSK", psk: "super_secret_password"], 
     wpa_pid: #PID<0.414.0>
})

Not entirely sure if this is the correct fix.

mobileoverlord commented 7 years ago

I think :noop'ing this message how you are is fine @fhunleth any thoughts? looks good to me

fhunleth commented 7 years ago

Yes - it seems like the right move is to ignore it. I assume the connection is bouncing on the initial connect. The way I read it is that you're getting a DHCP response before you expect it, so I assume it's from a previous connection that bounced when the DHCP response came in.

ConnorRigby commented 7 years ago

I believe that is what is happening @fhunleth