Cannot connect to AP on boot
I'm setting up a Raspberry Pi 2 with Octoprint and the netconnectd plugin on top of Raspbian Wheezy 5/5/15. It boots with netconnectd running and it starts an access point, but my computer cannot connect to it. If I manually shut down and restart the access point through netconnectcli stop_ap and start_ap, my computer is able to connect and I can use Octoprint properly. Looking at the logs, when it boots it stops here:
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: i
2015-07-07 22:43:21,597 - wifi.ap - INFO - Started dnsmasq:
But after manually stopping and starting, it ends here:
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=32): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x88f0c key_idx=1 set_tx=1 seq_len=0 key_len=32
broadcast key
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
wlan0: Setup of interface done.
2015-07-07 22:44:53,113 - wifi.ap - INFO - Started dnsmasq:
So it looks like there is a problem with the wpa_driver_nl80211_set_key section.
Have you disabled dhcpcd? That's new with the most recent raspbian image and to be honest, I don't trust it one bit and I wouldn't be surprised if it causes problems like this.
Also, your wifi dongle / chipset might be interesting to know.
I disabled dhcpcd using sudo update-rc.d -f dhcpcd remove and restarted, pgrep says nothing for dhcpcd, so I don't think it's running. The problem still persists though.
This is the wifi dongle I'm using: http://www.amazon.com/Wifi-Antenna-Raspberry-Pi-Instructions/dp/B00H95C0A2/ref=sr_1_3?ie=UTF8&qid=1436373393&sr=8-3
It's a RT5370 chipset from Ralink.