Skip to content

Commit

Permalink
Merge pull request #42 from WFA-achuang/wfadev
Browse files Browse the repository at this point in the history
Remove "Indigo" in ControlAppC
  • Loading branch information
WFA-achuang authored Sep 28, 2021
2 parents 0195182 + 5424d9d commit d2c00d4
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 38 deletions.
2 changes: 1 addition & 1 deletion ap_reset_config.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions indigo_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
25 changes: 10 additions & 15 deletions indigo_api_callback_dut.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ static int reset_device_handler(struct packet_wrapper *req, struct packet_wrappe
return 0;
}

// ACK: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'AP stop completed : Hostapd service is inactive.'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -570,8 +569,7 @@ static int generate_hostapd_config(char *output, int output_size, struct packet_
return strlen(output);
}

// ACK: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'DUT configured as AP : Configuration file created'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'AP is up : Hostapd service is active'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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 :{<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP :{<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'Static Ip successfully assigned to wireless interface'}
// RESP :{<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: '9c:b6:d0:19:40:c7', <IndigoResponseTLV.DUT_MAC_ADDR: 40963>: '9c:b6:d0:19:40:c7'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '9c:b6:d0:19:40:c7', <ResponseTLV.DUT_MAC_ADDR: 40963>: '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;
Expand Down Expand Up @@ -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: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'Loopback server in idle state'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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()) {
Expand Down Expand Up @@ -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"
Expand Down
18 changes: 7 additions & 11 deletions indigo_api_callback_tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ static int get_control_app_handler(struct packet_wrapper *req, struct packet_wra
return 0;
}

// ACK: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'AP stop completed : Hostapd service is inactive.'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -393,8 +392,7 @@ static int generate_hostapd_config(char *output, int output_size, struct packet_
return strlen(output);
}

// ACK: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'DUT configured as AP : Configuration file created'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -442,8 +440,7 @@ static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrappe
return 0;
}

// ACK: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'AP is up : Hostapd service is active'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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 :{<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'ACK: Command received'}
// RESP :{<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: 'Static Ip successfully assigned to wireless interface'}
// RESP :{<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '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];
Expand Down Expand Up @@ -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: {<IndigoResponseTLV.STATUS: 40961>: '0', <IndigoResponseTLV.MESSAGE: 40960>: '9c:b6:d0:19:40:c7', <IndigoResponseTLV.DUT_MAC_ADDR: 40963>: '9c:b6:d0:19:40:c7'}
// RESP: {<ResponseTLV.STATUS: 40961>: '0', <ResponseTLV.MESSAGE: 40960>: '9c:b6:d0:19:40:c7', <ResponseTLV.DUT_MAC_ADDR: 40963>: '9c:b6:d0:19:40:c7'}
static int get_mac_addr_handler(struct packet_wrapper *req, struct packet_wrapper *resp) {
char buffer[64];

Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion indigo_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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_
Expand Down Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion package.controlappc-dut.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.controlappc-tp.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion sta_reset_config.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d2c00d4

Please sign in to comment.