Hi, I'ven trying to connect to an AP using CC3000 boosterpack and the MSP-EXP430G2, the problem I'm having is that when I ping the IP of the module (I'm using an static IP) it shows no connection, and after a while it appears to be connected and disconnect again this is the code I'm using, it's based on the basic wifi application.
void main(void){ WDTCTL = WDTPW + WDTHOLD; initDriver(); wlan_ioctl_set_connection_policy(0x00, 0x00, 0x00); ip_config(); while(wlan_connect(WLAN_SEC_WPA2,"hardware",0x08,NULL,"danieldorado",0x0C) != 0); while(1); } void ip_config(void){ unsigned char IP_Addr[4]; unsigned char IP_GWAddr[4]; unsigned char SubnetMask[4]; unsigned char DNS[4]; SubnetMask[0] = 255; SubnetMask[1] = 255; SubnetMask[2] = 255; SubnetMask[3] = 0; IP_Addr[0] = 10;//IP IP_Addr[1] = 0;//IP IP_Addr[2] = 0;//IP IP_Addr[3] = 2;//IP IP_GWAddr[0] = 10; IP_GWAddr[1] = 0; IP_GWAddr[2] = 0; IP_GWAddr[3] = 1; DNS[0] = 0; DNS[1] = 0; DNS[2] = 0; DNS[3] = 0; netapp_dhcp((unsigned long *)IP_Addr, (unsigned long *)SubnetMask, (unsigned long *)IP_GWAddr, (unsigned long *)DNS); }
Also there are days that the module doesn't connect at all. Thanks.