Can't Start WiFi on RPi 3

/etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf are from an RPi 2 with a dongle and work just fine. On an RPi 3, less so.

The problem seems to be wpa_supplicant trying to start wpi_cli at boot time, but wpi_cli is trying to use the interface p2p-dev-wlan0, which doesn’t exist, rather than wlan0, which does.

It appears that wpa_supplicant is letting wpa_cli use its internal ESP to find an interface rather than setting it explicitly.