diff --git a/src/cw/conn_process_packet.c b/src/cw/conn_process_packet.c index cf09081c..227588ec 100644 --- a/src/cw/conn_process_packet.c +++ b/src/cw/conn_process_packet.c @@ -110,7 +110,7 @@ int cw_send_response(struct conn *conn, uint8_t * rawmsg, int len) * was received or something else happened. * @param conn conection * @param rawmsg the received request message, which the response belongs to - * @pqram result_code result code to send + * @param result_code result code to send * @return 1 */ int cw_send_error_response(struct conn *conn, uint8_t * rawmsg, uint32_t result_code) @@ -332,16 +332,22 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len, int result_code = 0; if (afm->end) { result_code = afm->end(conn, afm, rawmsg, len, from); +printf("result code comes from afm->end %d\n",result_code); + } +printf("Unrecognized = %d\n",unrecognized); + if (unrecognized){ cw_dbg(DBG_RFC,"Message has %d unrecognized message elements.",unrecognized); if (!result_code) { +printf("Seeting result code to unrec"); result_code = CW_RESULT_UNRECOGNIZED_MESSAGE_ELEMENT; } } +printf("The Result COde is here %d\n",result_code); /* if we've got a request message, we always have to send a response message */ if (as.msg_id & 1) { if (result_code > 0) { diff --git a/src/mod/capwap/capwap_actions_ac.c b/src/mod/capwap/capwap_actions_ac.c index 7964206b..fda7b3d3 100644 --- a/src/mod/capwap/capwap_actions_ac.c +++ b/src/mod/capwap/capwap_actions_ac.c @@ -250,8 +250,6 @@ static cw_action_in_t actions_in[] = { , - - /* Vendor Specific Payload - Join Request*/ { .capwap_state = CW_STATE_JOIN, @@ -268,7 +266,6 @@ static cw_action_in_t actions_in[] = { .elem_id = CW_ELEM_MAXIMUM_MESSAGE_LENGTH, .start = cw_in_generic2, .item_id = CW_ITEM_MAXIMUM_MESSAGE_LENGTH, - .mand = 0, .min_len = 2, .max_len = 2 } @@ -282,10 +279,22 @@ static cw_action_in_t actions_in[] = { { .capwap_state = CW_STATE_CONFIGURE, .msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST, -// .end = cw_in_check_join_req + .end = cw_in_check_generic_resp } , + { + .capwap_state = CW_STATE_CONFIGURE, + .msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST, + .elem_id = CW_ELEM_AC_NAME, + .item_id = CW_ITEM_AC_NAME, + .start = cw_in_generic2, + .min_len = 1, + .max_len = 512, + .mand = 1 + + } + , diff --git a/src/mod/capwap/capwap_actions_wtp.c b/src/mod/capwap/capwap_actions_wtp.c index 7121d462..6af8bb44 100644 --- a/src/mod/capwap/capwap_actions_wtp.c +++ b/src/mod/capwap/capwap_actions_wtp.c @@ -325,7 +325,7 @@ static cw_action_out_t actions_out[] = { } , /* Radio Admin State - Config Status Request */ - { +/* { .msg_id = CW_MSG_CONFIGURATION_STATUS_REQUEST, .item_id = CW_ITEM_RADIO_ADMINISTRATIVE_STATE, .out = cw_out_radio_administrative_states, @@ -333,6 +333,7 @@ static cw_action_out_t actions_out[] = { .mand = 1 } , +*/ diff --git a/src/wtp/cfg.json b/src/wtp/cfg.json index d0b5c3c0..a64410a1 100644 --- a/src/wtp/cfg.json +++ b/src/wtp/cfg.json @@ -1,13 +1,6 @@ { "ecn_support":"0", "location_data":"Superposition", - "result_code":"21", - "wtp_board_data":{ - "model_no":"W-FAT", - "serial_no":"0000", - "vendor_id":"11591", - "wtp_board_macadddress":"" - }, "wtp_bootloader_version":"11591,W-FAT-BL-0.1", "wtp_hardware_version":"11591,0.1", "wtp_name":"WFAT-004A9902FAC0", diff --git a/src/wtp/configure.c b/src/wtp/configure.c index 13966ce1..29923546 100644 --- a/src/wtp/configure.c +++ b/src/wtp/configure.c @@ -2,6 +2,7 @@ #include "cw/capwap.h" #include "cw/conn.h" #include "cw/log.h" +#include "cw/mbag.h" #include "wtp_interface.h" #include "cfg.h" @@ -10,8 +11,13 @@ int configure() { struct conn *conn = get_conn(); + + mbag_del_all(conn->incomming); + int rc = cw_send_request(conn, CW_MSG_CONFIGURATION_STATUS_REQUEST); +printf("Configure RC: %d\n",rc); + if (!cw_rcok(rc)) { if (rc > 0) { cw_log(LOG_ERR,