I have unable to get the following code to work:
ifconfig(IF_WIFI0,
IFS_DOWN,
IFS_WIFI_SSID, ssidStrLength, ssid,
IFS_WIFI_ENCRYPTION, IFPARAM_WIFI_ENCR_TKIP,
IFS_WIFI_WPA_PSK_HEXSTR, wpaHex,
IFS_DHCP, 1,
IFS_UP,
IFS_END);
socketOk = sock_init();
if (socketOk == 0) printf("
Socket started.
");
ifconfig (IF_WIFI0, IFG_WIFI_SSID, &i, buffer, IFS_END);
printf ("SSID: [%ls], Length: [%d]
", wifi_ssid_to_str (buffer, buffer, i), i);
printf("WIFI0 status (1 if pending up): %d
",ifpending(IF_WIFI0));
The problem appears to be the IFS_WIFI_SSID line. If I remove that and instead define the SSID with “#define IFC_WIFI_SSID …”, the code works as expected. However, if I leave in the IFS_WIFI_SSID, the socket starts normally, the interface appears to have the SSID name and SSID length correct, but the interface remains in the “IF_COMING_UP” (i.e., 1) status, and never comes up.