- Build example_eap.c
According to the ambd_sdk/component/common/example/eap/readme.txt file, you are instructed to modify the makefile to use the lib_eap.a file located at project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application (i.e., LINK_APP_LIB += $(ROOTDIR)/lib/application/lib_eap.a
). It also states, “Please make sure the lib_wps, polarssl/mbedtls, ssl_ram_map are also built.”
Therefore, I set the values #define CONFIG_USE_POLARSSL 0
and #define CONFIG_USE_MBEDTLS 1
in the platform_opts.h file, and modified the project/realtek_amebaD_va0_example/src/src_hp/Makefile as shown below.
After doing so, the build succeeded without errors. Did I follow the instructions correctly?
#*****************************************************************************#
# VARIABLES #
#*****************************************************************************#
DIR = $(SRCDIR)
MODULE_IFLAGS = -I$(DIR)./
# Add .a to application libs for linking
**LINK_APP_LIB += $(ROOTDIR)/lib/application/lib_eap.a**
**LINK_APP_LIB += $(ROOTDIR)/lib/application/lib_wps.a**
vpath %.c $(DIR)
#*****************************************************************************#
# Source FILE LIST #
#*****************************************************************************#
CSRC = $(DIR)/main.c \
**SCRC += $(DIR)/../../../../component/common/network/ssl/ssl_ram_map/ssl_ram_map.c**
- Wi-Fi Connection Failure
However, when built like this, the Wi-Fi connection fails. I would like to understand the reason for the connection failure, but only the reason code is printed. Is there a detailed explanation of this value somewhere? (disconnect reason code: 40)
Below are the printed messages.
==================== peap_start ====================
RTL8721D[Driver]: set ssid [Public WiFi Secure]
RTL8721D[Driver]: rtw_restruct_sec_ie[4275]: no pmksa cached
RTL8721D[Driver]: start auth to 12:96:cd:00:ae:6a
RTL8721D[Driver]: auth alg = 0
RTL8721D[Driver]:
OnAuthClient:algthm = 0, seq = 2, status = 0, sae_msg_len = 0
RTL8721D[Driver]: auth success, start assoc
**RTL8721D[Driver]: assoc reject, status code: 40**
**dissconn reason code: 40**
assoc stage, assoc reject (assoc rsp status > 0)
ERROR: connect to AP by peap failed
==================== peap_finish ====================