Connecting to Wifi on boot

Hi I’m having trouble getting my TX1 to connect to Wifi on boot. This is after a flash using Jetpack (64bit). After it boots I can use these commands to connect to an access point:

wpa_passphrase MYSSID MYPASSWORD > wpa.conf sudo wpa_supplicant -Dnl80211 -iwlan0 -cwpa.conf -B
sudo dhclient -r sudo dhclient wlan0

I’ve tried adding all but the pw generator to /etc/rc.local, and changing /etc/network/interfaces to this:

auto wlan0
iface wlan0 inet dhcp
wpa-conf /home/ubuntu/wpa.conf
iface default inet dhcp

With the /etc/network/interfaces changes on boot I see:

Waiting for network configuration…
Waiting up to 60 more seconds for network configuration…
Booting system without full network configuration…

Is it missing the driver switch? I can’t get it to connect without using nl80211 (default is wext).

If I type: sudo ifconfig wlan0 shows up, I've also ran sudo ifconfig wlan0 up. When I run $ sudo ifconfig I see wlan0 as well as wlan0:avahi?

During boot I also see this:

systemd-udevd /sbin/initcl start nvwifibt SUBTASK=register BCMCHIP=0x4354 [540] terminated by signal 1 (Hangup)
systemd-udevd /sbin/initcl start nvwifibt SUBTASK=register BCMCHIP=0x4354 [541] terminated by signal 1 (Hangup)
Stopping NVIDIA bluetooth wifi init script

What is the correct procedure for connecting to Wifi on boot? Should I be using wpa_supplicant or is there an alternative method that works?

I don’t know much about the wireless, but maybe one of these URLs will have what you want (the issue is probably one of those obscure details of Ubuntu WiFi configuration rather than hardware):
https://help.ubuntu.com/lts/ubuntu-help/net-wireless-connect.html
https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide
https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide/ConfigFiles