Please, describe the required values for parameters of wlan_add_profile:
I'm unable to connect CC3000 explicitly (without first time config) to any network type but the open one. Here's the code for WPA2:
wlan_ioctl_set_connection_policy(0, 0, 0); res = wlan_ioctl_del_profile(0); Delay(500); res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0, 0, 0, "1234567890", 10);
wlan_ioctl_set_connection_policy(0, 1, 1);
Hence the question on the parameters
Tried magic numbers from this thread: http://e2e.ti.com/support/low_power_rf/f/851/p/180859/672551.aspx
I.e.
res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0x18, 0x1e, 0x2, "1234567890", 10); wlan_ioctl_set_connection_policy(0, 0, 1);
Unfortunately that didn't help, cc3000 still doesn't connect to the AP
Hi Alexander,
Can you please try to use the command as follows, and see if that helps. I think the decimal 10 value may be causing some issues. The function is probably trying to read it as if it is hexadecimal 0x10.
res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0x18, 0x1e, 0x2, "1234567890", 0x0a);
Kelvin
Please click the Verify Answer button on this post if it answers your question. Thank You.
Tried that. Still isn't connecting
Also tried shorter password "12345678", length 8. That didn't help either
Can you please describe which AP are you using, and what is the Authentication method and the encryption method?In addition, what pre shared key did you set in the AP?
Thanks,Alon.S
I've tried two APs: one is on HTC WildfireS (android phone), the other was D-Link DIR-300.
The passwords for the HTC router were configured as written in the messages above: 1234567890 for several experiments, then, after Kelvin's message, for further experiments I've set up both router and tiwi-sl for password 12345678
The security used in router setup in HTC is described as WPA2(AES). There's also WPA(TKIP) which I did also try with the same result (meaning here, of course simultaneous setup of the router and tiwi-sl)
I'd like to add that I've managed to connect to the same network (wpa2) using wlan_connect.
Implementing the workaround of simulating profile in mcu timer routine via using
res = wlan_ioctl_statusget(); // doesn't work if (res == STATUS_CONNECTING || wlanState == WLAN_CONNECTED) return; res = wlan_ioctl_set_connection_policy(0, 0, 0); Delay(250); // close to 2.5 seconds res = wlan_connect(WLAN_SEC_WPA2, "HTC-avk", 7, 0, "1234567890", 10);
didn't work perfectly either because wlan_ioctl_statusget() always returns zero. Even in between the wlan_connect call and CC3000_AsyncCallback coming with the HCI_EVNT_WLAN_UNSOL_CONNECT event.
The code above nevertheless sometimes works but not always
Another strange thing is the tiwi-sl MAC which appeared on HTC as 00-12-55-55-55-55 and the device title was something like Device-5555
This always work for me.
wlan_ioctl_set_connection_policy(DISABLE, DISABLE, DISABLE);__delay_cycles(8000); wlan_connect(WLAN_SEC_WPA, "Mast VP", 7, NULL, "0295658811", 10);