@@ -927,14 +927,14 @@ static void ws_bootstrap_pan_advertisement_analyse(struct protocol_interface_inf
927
927
uint16_t pan_cost = (pan_information .routing_cost / PRC_WEIGHT_FACTOR ) + (pan_information .pan_size / PS_WEIGHT_FACTOR );
928
928
uint16_t current_pan_cost = (cur -> ws_info -> parent_info .pan_information .routing_cost / PRC_WEIGHT_FACTOR ) + (cur -> ws_info -> parent_info .pan_information .pan_size / PS_WEIGHT_FACTOR );
929
929
if (current_pan_cost < pan_cost ) {
930
- tr_info ("EAPOL target dropped Higher Pan cost" );
930
+ tr_info ("EAPOL target dropped Higher Pan cost %u > %u current" , pan_cost , current_pan_cost );
931
931
return ;
932
932
}
933
933
934
934
// If pan cost is the same then we select the one we hear highest
935
935
if (current_pan_cost == pan_cost &&
936
936
cur -> ws_info -> parent_info .signal_dbm > data -> signal_dbm ) {
937
- tr_info ("EAPOL target dropped Lower link quality" );
937
+ tr_info ("EAPOL target dropped Lower link quality %u < %u current" , data -> signal_dbm , cur -> ws_info -> parent_info . signal_dbm );
938
938
return ;
939
939
}
940
940
@@ -2080,7 +2080,7 @@ void ws_bootstrap_event_configuration_start(protocol_interface_info_entry_t *cur
2080
2080
}
2081
2081
void ws_bootstrap_event_authentication_start (protocol_interface_info_entry_t * cur )
2082
2082
{
2083
- ws_bootsrap_event_trig ( WS_AUTHENTICATION_START , cur -> bootStrapId , ARM_LIB_LOW_PRIORITY_EVENT , NULL );
2083
+ ws_bootstrap_state_change ( cur , ER_PANA_AUTH );
2084
2084
}
2085
2085
void ws_bootstrap_event_operation_start (protocol_interface_info_entry_t * cur )
2086
2086
{
@@ -2336,21 +2336,6 @@ static void ws_bootstrap_event_handler(arm_event_s *event)
2336
2336
// Start network scan
2337
2337
ws_bootstrap_start_discovery (cur );
2338
2338
break ;
2339
- case WS_AUTHENTICATION_START :
2340
- tr_info ("authentication start" );
2341
- // only advert sol stopped as we might be doing re authentication
2342
- cur -> ws_info -> trickle_pas_running = false;
2343
- //Add Test ecurity key and security level's
2344
-
2345
-
2346
- // Advertisements stopped during the EAPOL
2347
- cur -> ws_info -> trickle_pa_running = false;
2348
- cur -> ws_info -> trickle_pc_running = false;
2349
- cur -> ws_info -> trickle_pas_running = false;
2350
- cur -> ws_info -> trickle_pcs_running = false;
2351
-
2352
- ws_bootstrap_start_authentication (cur );
2353
- break ;
2354
2339
2355
2340
case WS_CONFIGURATION_START :
2356
2341
tr_info ("Configuration start" );
@@ -2512,6 +2497,7 @@ static void ws_bootstrap_state_change(protocol_interface_info_entry_t *cur, icmp
2512
2497
cur -> bootsrap_state_machine_cnt = 1 ;
2513
2498
cur -> nwk_bootstrap_state = nwk_bootstrap_state ;
2514
2499
}
2500
+
2515
2501
void ws_bootstrap_state_machine (protocol_interface_info_entry_t * cur )
2516
2502
{
2517
2503
@@ -2528,6 +2514,19 @@ void ws_bootstrap_state_machine(protocol_interface_info_entry_t *cur)
2528
2514
tr_debug ("WS SM:configuration Scan" );
2529
2515
ws_bootstrap_configure_process (cur );
2530
2516
break ;
2517
+ case ER_PANA_AUTH :
2518
+ tr_info ("authentication start" );
2519
+ // only advert sol stopped as we might be doing re authentication
2520
+ cur -> ws_info -> trickle_pas_running = false;
2521
+ //Add Test ecurity key and security level's
2522
+ // Advertisements stopped during the EAPOL
2523
+ cur -> ws_info -> trickle_pa_running = false;
2524
+ cur -> ws_info -> trickle_pc_running = false;
2525
+ cur -> ws_info -> trickle_pas_running = false;
2526
+ cur -> ws_info -> trickle_pcs_running = false;
2527
+
2528
+ ws_bootstrap_start_authentication (cur );
2529
+ break ;
2531
2530
case ER_RPL_SCAN :
2532
2531
tr_debug ("WS SM:Wait RPL to contact DODAG root" );
2533
2532
ws_bootstrap_rpl_wait_process (cur );
0 commit comments