From 5424d9d3b6404fd08f81ab3ca96e41c0b93e2dab Mon Sep 17 00:00:00 2001 From: WFA-achuang Date: Tue, 28 Sep 2021 11:10:37 +0800 Subject: [PATCH] Remove "Indigo" in ControlAppC --- ap_reset_config.conf | 2 +- indigo_api.h | 6 +++--- indigo_api_callback_dut.c | 25 ++++++++++--------------- indigo_api_callback_tp.c | 18 +++++++----------- indigo_packet.c | 2 +- main.c | 8 ++++---- package.controlappc-dut.Makefile | 2 +- package.controlappc-tp.Makefile | 2 +- sta_reset_config.conf | 2 +- 9 files changed, 29 insertions(+), 38 deletions(-) diff --git a/ap_reset_config.conf b/ap_reset_config.conf index 0531577..18491b6 100644 --- a/ap_reset_config.conf +++ b/ap_reset_config.conf @@ -1,7 +1,7 @@ ctrl_interface=/var/run/hostapd ctrl_interface_group=0 interface=wlan0 -ssid=Indigo +ssid=QuickTrack channel=36 hw_mode=a wpa_passphrase=12345678 diff --git a/indigo_api.h b/indigo_api.h index ea41bfe..69c8143 100644 --- a/indigo_api.h +++ b/indigo_api.h @@ -198,8 +198,8 @@ struct indigo_api { #define TLV_HE_UNSOL_PR_RESP_CADENCE 0x00a7 #define TLV_HE_FILS_DISCOVERY_TX 0x00a8 -// class IndigoResponseTLV -// List of TLV used in the Indigo API response and ACK messages from the DUT +// class ResponseTLV +// List of TLV used in the QuickTrack API response and ACK messages from the DUT #define TLV_MESSAGE 0xa000 #define TLV_STATUS 0xa001 #define TLV_DUT_WLAN_IP_ADDR 0xa002 @@ -251,7 +251,7 @@ struct indigo_api { #define TLV_VALUE_WPA_S_START_UP_OK "wpa_supplicant is initialized successfully" #define TLV_VALUE_WPA_S_START_UP_NOT_OK "The wpa_supplicant was unable to initialize." #define TLV_VALUE_WPA_S_STOP_NOT_OK "Failed to stop wpa supplicant service." -#define TLV_VALUE_WPA_S_STOP_OK "Indigo tool STA was successfully disconnected" +#define TLV_VALUE_WPA_S_STOP_OK "QuickTrack tool STA was successfully disconnected" #define TLV_VALUE_WPA_S_ASSOC_OK "STA is up: WPA supplicant associated" #define TLV_VALUE_WPA_S_ASSOC_NOT_OK "WPA supplicant cannot associate with AP" #define TLV_VALUE_WPA_S_DISCONNECT_OK "Sent DISCONNECT message" diff --git a/indigo_api_callback_dut.c b/indigo_api_callback_dut.c index c5305f0..548731e 100644 --- a/indigo_api_callback_dut.c +++ b/indigo_api_callback_dut.c @@ -148,8 +148,7 @@ static int reset_device_handler(struct packet_wrapper *req, struct packet_wrappe return 0; } -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'AP stop completed : Hostapd service is inactive.'} +// RESP: {: '0', : 'AP stop completed : Hostapd service is inactive.'} static int stop_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int len = 0, reset = 0; char buffer[S_BUFFER_LEN], reset_type[16]; @@ -209,7 +208,7 @@ static int stop_ap_handler(struct packet_wrapper *req, struct packet_wrapper *re #ifdef _RESERVED_ /* The function is reserved for the defeault hostapd config */ -#define HOSTAPD_DEFAULT_CONFIG_SSID "Indigo" +#define HOSTAPD_DEFAULT_CONFIG_SSID "QuickTrack" #define HOSTAPD_DEFAULT_CONFIG_CHANNEL "36" #define HOSTAPD_DEFAULT_CONFIG_HW_MODE "a" #define HOSTAPD_DEFAULT_CONFIG_WPA_PASSPHRASE "12345678" @@ -456,8 +455,8 @@ static int generate_hostapd_config(char *output, int output_size, struct packet_ // changed to become conditional on there being no other sae_groups // configuration // e.g.: - // if IndigoRequestTLV.SAE_GROUPS not in tlv_values: - // field_name = tlv_hostapd_config_mapper.get(IndigoRequestTLV.SAE_GROUPS) + // if RequestTLV.SAE_GROUPS not in tlv_values: + // field_name = tlv_hostapd_config_mapper.get(RequestTLV.SAE_GROUPS) // hostapd_config += "\n" + field_name + "=15 16 17 18 19 20 21" // Append the default SAE groups for SAE and no SAE groups TLV if (has_sae && has_sae_groups == 0) { @@ -570,8 +569,7 @@ static int generate_hostapd_config(char *output, int output_size, struct packet_ return strlen(output); } -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'DUT configured as AP : Configuration file created'} +// RESP: {: '0', : 'DUT configured as AP : Configuration file created'} static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int len = 0; char buffer[L_BUFFER_LEN], ifname[S_BUFFER_LEN]; @@ -661,8 +659,7 @@ static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrappe #ifdef HOSTAPD_SUPPORT_MBSSID_WAR extern int use_openwrt_wpad; #endif -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'AP is up : Hostapd service is active'} +// RESP: {: '0', : 'AP is up : Hostapd service is active'} static int start_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { char *message = TLV_VALUE_HOSTAPD_START_OK; char buffer[S_BUFFER_LEN]; @@ -749,8 +746,7 @@ static int create_bridge_network_handler(struct packet_wrapper *req, struct pack } // Bytes to DUT : 01 50 06 00 ed ff ff 00 55 0c 31 39 32 2e 31 36 38 2e 31 30 2e 33 -// ACK :{: '0', : 'ACK: Command received'} -// RESP :{: '0', : 'Static Ip successfully assigned to wireless interface'} +// RESP :{: '0', : 'Static Ip successfully assigned to wireless interface'} static int assign_static_ip_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int len = 0; char buffer[64]; @@ -794,7 +790,7 @@ static int assign_static_ip_handler(struct packet_wrapper *req, struct packet_wr // Bytes to DUT : 01 50 01 00 ee ff ff // ACK: Bytes from DUT : 01 00 01 00 ee ff ff a0 01 01 30 a0 00 15 41 43 4b 3a 20 43 6f 6d 6d 61 6e 64 20 72 65 63 65 69 76 65 64 -// RESP: {: '0', : '9c:b6:d0:19:40:c7', : '9c:b6:d0:19:40:c7'} +// RESP: {: '0', : '9c:b6:d0:19:40:c7', : '9c:b6:d0:19:40:c7'} static int get_mac_addr_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { struct tlv_hdr *tlv; struct wpa_ctrl *w = NULL; @@ -1002,8 +998,7 @@ static int start_loopback_server(struct packet_wrapper *req, struct packet_wrapp return 0; } -// ACK: {"status": 0, "message": "ACK: Command received", "tlvs": {}} -// RESP: {: '0', : 'Loopback server in idle state'} +// RESP: {: '0', : 'Loopback server in idle state'} static int stop_loop_back_server_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { /* Stop loopback */ if (loopback_server_status()) { @@ -1433,7 +1428,7 @@ static int stop_sta_handler(struct packet_wrapper *req, struct packet_wrapper *r #ifdef _RESERVED_ /* The function is reserved for the defeault wpas config */ -#define WPAS_DEFAULT_CONFIG_SSID "Indigo" +#define WPAS_DEFAULT_CONFIG_SSID "QuickTrack" #define WPAS_DEFAULT_CONFIG_WPA_KEY_MGMT "WPA-PSK" #define WPAS_DEFAULT_CONFIG_PROTO "RSN" #define HOSTAPD_DEFAULT_CONFIG_RSN_PAIRWISE "CCMP" diff --git a/indigo_api_callback_tp.c b/indigo_api_callback_tp.c index 05d48b8..531b2ca 100644 --- a/indigo_api_callback_tp.c +++ b/indigo_api_callback_tp.c @@ -68,8 +68,7 @@ static int get_control_app_handler(struct packet_wrapper *req, struct packet_wra return 0; } -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'AP stop completed : Hostapd service is inactive.'} +// RESP: {: '0', : 'AP stop completed : Hostapd service is inactive.'} static int stop_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int len = 0, reset = 0; char buffer[S_BUFFER_LEN], reset_type[16]; @@ -153,7 +152,7 @@ static int stop_ap_handler(struct packet_wrapper *req, struct packet_wrapper *re #ifdef _RESERVED_ /* The function is reserved for the defeault hostapd config */ -#define HOSTAPD_DEFAULT_CONFIG_SSID "Indigo" +#define HOSTAPD_DEFAULT_CONFIG_SSID "QuickTrack" #define HOSTAPD_DEFAULT_CONFIG_CHANNEL "36" #define HOSTAPD_DEFAULT_CONFIG_HW_MODE "a" #define HOSTAPD_DEFAULT_CONFIG_WPA_PASSPHRASE "12345678" @@ -393,8 +392,7 @@ static int generate_hostapd_config(char *output, int output_size, struct packet_ return strlen(output); } -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'DUT configured as AP : Configuration file created'} +// RESP: {: '0', : 'DUT configured as AP : Configuration file created'} static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int band, len; char hw_mode_str[8], op_class[8]; @@ -442,8 +440,7 @@ static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrappe return 0; } -// ACK: {: '0', : 'ACK: Command received'} -// RESP: {: '0', : 'AP is up : Hostapd service is active'} +// RESP: {: '0', : 'AP is up : Hostapd service is active'} static int start_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { char *message = TLV_VALUE_HOSTAPD_START_OK; char buffer[S_BUFFER_LEN], g_ctrl_iface[64], log_level[TLV_VALUE_SIZE]; @@ -513,8 +510,7 @@ static int start_ap_handler(struct packet_wrapper *req, struct packet_wrapper *r } // Bytes to DUT : 01 50 06 00 ed ff ff 00 55 0c 31 39 32 2e 31 36 38 2e 31 30 2e 33 -// ACK :{: '0', : 'ACK: Command received'} -// RESP :{: '0', : 'Static Ip successfully assigned to wireless interface'} +// RESP :{: '0', : 'Static Ip successfully assigned to wireless interface'} static int assign_static_ip_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { int len = 0; char buffer[64]; @@ -554,7 +550,7 @@ static int assign_static_ip_handler(struct packet_wrapper *req, struct packet_wr // Bytes to DUT : 01 50 01 00 ee ff ff // ACK: Bytes from DUT : 01 00 01 00 ee ff ff a0 01 01 30 a0 00 15 41 43 4b 3a 20 43 6f 6d 6d 61 6e 64 20 72 65 63 65 69 76 65 64 -// RESP: {: '0', : '9c:b6:d0:19:40:c7', : '9c:b6:d0:19:40:c7'} +// RESP: {: '0', : '9c:b6:d0:19:40:c7', : '9c:b6:d0:19:40:c7'} static int get_mac_addr_handler(struct packet_wrapper *req, struct packet_wrapper *resp) { char buffer[64]; @@ -799,7 +795,7 @@ static int stop_sta_handler(struct packet_wrapper *req, struct packet_wrapper *r #ifdef _RESERVED_ /* The function is reserved for the defeault wpas config */ -#define WPAS_DEFAULT_CONFIG_SSID "Indigo" +#define WPAS_DEFAULT_CONFIG_SSID "QuickTrack" #define WPAS_DEFAULT_CONFIG_WPA_KEY_MGMT "WPA-PSK" #define WPAS_DEFAULT_CONFIG_PROTO "RSN" #define HOSTAPD_DEFAULT_CONFIG_RSN_PAIRWISE "CCMP" diff --git a/indigo_packet.c b/indigo_packet.c index 3ebc8b3..36a2166 100644 --- a/indigo_packet.c +++ b/indigo_packet.c @@ -25,7 +25,7 @@ int capture_packet = 0, capture_count = 0; /* debug. Write the received packets to files */ int debug_packet = 0; /* used by the packet hexstring print */ -/* Parse the Indigo message from the packet to the wrapper */ +/* Parse the QuickTrack message from the packet to the wrapper */ int parse_packet(struct packet_wrapper *req, char *packet, int packet_len) { int i = 0, parser = 0, ret = 0; struct indigo_api *api = NULL; diff --git a/main.c b/main.c index 0509b95..3c148b8 100755 --- a/main.c +++ b/main.c @@ -81,7 +81,7 @@ static int control_socket_init(int port) { } struct sockaddr_in *tool_addr; // For HTTP Post -/* Callback function of the Indigo API. */ +/* Callback function of the QuickTrack API. */ static void control_receive_message(int sock, void *eloop_ctx, void *sock_ctx) { int ret; // return code int fromlen, len; // structure size and received length @@ -175,9 +175,9 @@ static void usage() { /* Show the welcome message with role and version */ static void print_welcome() { #ifdef _DUT_ - printf("Welcome to use Indigo Control App DUT version"); + printf("Welcome to use QuickTrack Control App DUT version"); #else - printf("Welcome to use Indigo Control App Platform version"); + printf("Welcome to use Quicktrack Control App Platform version"); #endif #ifdef _VERSION_ @@ -287,7 +287,7 @@ int main(int argc, char* argv[]) { #endif /* Print the run-time information */ - indigo_logger(LOG_LEVEL_INFO, "Indigo control app running at: %d", get_service_port()); + indigo_logger(LOG_LEVEL_INFO, "QuickTrack control app running at: %d", get_service_port()); indigo_logger(LOG_LEVEL_INFO, "Wireless Interface:" ); show_wireless_interface_info(); indigo_logger(LOG_LEVEL_INFO, "hostapd Path: %s (%s)", get_hapd_full_exec_path(), get_hapd_exec_file()); diff --git a/package.controlappc-dut.Makefile b/package.controlappc-dut.Makefile index cf93ca3..6a6b150 100644 --- a/package.controlappc-dut.Makefile +++ b/package.controlappc-dut.Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk define Package/controlappc-dut/default SECTION:=net CATEGORY:=Network - TITLE:=ControlAppC from Wi-Fi Alliance Indigo Project + TITLE:=ControlAppC from Wi-Fi Alliance QuickTrack Project URL:=http://wi-fi.org/ endef diff --git a/package.controlappc-tp.Makefile b/package.controlappc-tp.Makefile index fd2b124..c86e59c 100644 --- a/package.controlappc-tp.Makefile +++ b/package.controlappc-tp.Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk define Package/controlappc-tp/default SECTION:=net CATEGORY:=Network - TITLE:=ControlAppC from Wi-Fi Alliance Indigo Project + TITLE:=ControlAppC from Wi-Fi Alliance QuickTrack Project URL:=http://wi-fi.org/ endef diff --git a/sta_reset_config.conf b/sta_reset_config.conf index dfd269b..fc6e904 100644 --- a/sta_reset_config.conf +++ b/sta_reset_config.conf @@ -1,7 +1,7 @@ ctrl_interface=/var/run/wpa_supplicant ap_scan=1 network={ -ssid="Indigo" +ssid="QuickTrack" key_mgmt=WPA-PSK proto=RSN pairwise=CCMP