Hi all,
I can't seem to get the qapi_WLAN_8021x_Enable() function to succeed in sdk version 3.4. I edited the Makefile so that DEFINES += "-D CONFIG_WLAN_8021X" and the appropriate libraries are include using "$(LIBDIR)/wlan_supplicant_8021x_xip.lib" "$(LIBDIR)/wlan_supplicant_8021x_ram.lib". Below is a standalone test_wifi.c file that compiles and runs. When the 8021x_Enable function fails it causes a GPIO pin to go high. Anyone else having trouble getting the Enterprise/RADIUS server authentication working?
Much Thanks,
Dr. Wolfe
#define THREAD_STACK_SIZE_BYTES (4096)
#define THREAD_PRIORITY (21)
#define LED_PIN (12)
#include "qurt_thread.h"
#include "qapi_tlmm.h"
#include "qapi_types.h"
#include "qapi_delay.h"
#include "qapi_wlan.h"
#include "qapi_wlan_8021x.h"
void thread(void* param);
void som_app_init(void) { return; }
void som_app_entry_internal(void) { return; }
void app_init(qbool_t cold_boot) { return; }
void app_start(qbool_t cold_boot) {
qurt_thread_t thread_handle;
qurt_thread_attr_t thread_attr;
qurt_thread_attr_init(&thread_attr);
qurt_thread_attr_set_name(&thread_attr, "testbench");
qurt_thread_attr_set_priority(&thread_attr, 21);
qurt_thread_attr_set_stack_size(&thread_attr, THREAD_STACK_SIZE_BYTES);
qurt_thread_create(&thread_handle, &thread_attr, thread, NULL);
}
void thread(void* param) {
qapi_GPIO_ID_t led_id;
qapi_TLMM_Config_t led_config;
led_config.func = 0;
led_config.dir = QAPI_GPIO_OUTPUT_E;
led_config.pull = QAPI_GPIO_NO_PULL_E;
led_config.drive = QAPI_GPIO_1P6MA_E;
led_config.pin = LED_PIN;
qapi_TLMM_Get_Gpio_ID(&led_config, &led_id);
qapi_TLMM_Config_Gpio(led_id, &led_config);
qapi_TLMM_Drive_Gpio(led_id, LED_PIN, QAPI_GPIO_LOW_VALUE_E); // LED off
while (1) {
qapi_Status_t status = 0;
qapi_WLAN_Enable(QAPI_WLAN_ENABLE_E); // does not fail
qapi_WLAN_Add_Device(0); // does not fail
qapi_WLAN_Add_Device(1); // does not fail
status = qapi_WLAN_8021x_Enable(QAPI_WLAN_8021X_ENABLE_E); // fails
if (status != QAPI_OK) qapi_TLMM_Drive_Gpio(led_id, LED_PIN, QAPI_GPIO_HIGH_VALUE_E); // led on
qapi_Task_Delay(0xFFFFFFFF);
}
}
Kindly confirm if you are observing issue with default CS3.4 SDK , try with QCLI_demo by modifying build.bat "SET CFG_FEATURE_WLAN_8021X=true"