wiliot-certificate 4.4.3__py3-none-any.whl → 4.5.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
- {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb.json +109 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/calibration.json +96 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/custom.json +99 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/datapath.json +241 -13
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energy2400.json +120 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/externalSensor.json +135 -6
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/interface.json +157 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json → certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +27 -11
- certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +175 -0
- certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +65 -0
- certificate/cert_common.py +1459 -0
- certificate/cert_config.py +455 -0
- {brg_certificate → certificate}/cert_data_sim.py +131 -46
- {brg_certificate → certificate}/cert_defines.py +120 -128
- {brg_certificate → certificate}/cert_gw_sim.py +151 -49
- {brg_certificate → certificate}/cert_mqtt.py +164 -59
- {brg_certificate → certificate}/cert_prints.py +34 -33
- {brg_certificate → certificate}/cert_protobuf.py +15 -6
- {brg_certificate → certificate}/cert_results.py +205 -48
- certificate/cert_utils.py +622 -0
- certificate/certificate.py +198 -0
- certificate/certificate_cli.py +79 -0
- certificate/certificate_eth_test_list.txt +74 -0
- certificate/certificate_sanity_test_list.txt +65 -0
- certificate/certificate_test_list.txt +75 -0
- {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +2 -2
- {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
- certificate/tests/calibration/output_power_test/output_power_test.json +22 -0
- certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
- {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +1 -1
- {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
- certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +14 -0
- certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
- certificate/tests/cloud_connectivity/acl_test/acl_test.json +14 -0
- certificate/tests/cloud_connectivity/acl_test/acl_test.py +98 -0
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +18 -0
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +39 -0
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +18 -0
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
- certificate/tests/cloud_connectivity/connection_test/connection_test.json +17 -0
- certificate/tests/cloud_connectivity/connection_test/connection_test.py +74 -0
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +20 -0
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +204 -0
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +16 -0
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +98 -0
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +17 -0
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +57 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test.json +19 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
- certificate/tests/cloud_connectivity/stress_test/stress_test.json +16 -0
- certificate/tests/cloud_connectivity/stress_test/stress_test.py +97 -0
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +24 -0
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +93 -0
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +19 -0
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +161 -0
- {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +1 -1
- certificate/tests/datapath/aging_test/aging_test.py +138 -0
- certificate/tests/datapath/event_ble5_test/event_ble5_test.json +16 -0
- certificate/tests/datapath/event_ble5_test/event_ble5_test.py +95 -0
- certificate/tests/datapath/event_test/event_test.json +16 -0
- certificate/tests/datapath/event_test/event_test.py +85 -0
- {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +10 -8
- certificate/tests/datapath/output_power_test/output_power_test.json +22 -0
- {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
- {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -8
- {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
- {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +2 -2
- {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +19 -0
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
- {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +11 -10
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +18 -0
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +83 -0
- {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
- {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
- {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
- {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
- brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +5 -4
- certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
- {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +2 -2
- {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +7 -7
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +112 -72
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +7 -7
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
- {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +3 -3
- {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +12 -11
- {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +3 -3
- {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +12 -11
- {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
- certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +14 -0
- certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
- certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +14 -0
- certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
- certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +14 -0
- certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
- certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +14 -0
- certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
- certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +15 -0
- certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
- certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +14 -0
- certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
- certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +14 -0
- certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +14 -0
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +41 -0
- {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +2 -2
- {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
- {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
- {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
- certificate/tests/energy2400/output_power_test/output_power_test.json +22 -0
- {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
- {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +1 -1
- {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +25 -0
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +378 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +3 -3
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +97 -87
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +23 -0
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
- {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
- {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
- {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
- {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
- {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +1 -1
- {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
- {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +4 -4
- certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +455 -0
- certificate/wlt_types.py +122 -0
- {gw_certificate → common}/api_if/202/status.json +6 -0
- {gw_certificate → common}/api_if/203/status.json +6 -0
- {gw_certificate → common}/api_if/204/status.json +6 -0
- common/api_if/206/data.json +85 -0
- common/api_if/206/status.json +69 -0
- common/api_if/api_validation.py +85 -0
- common/web/templates/generator.html +148 -0
- common/web/templates/index.html +20 -0
- common/web/templates/menu.html +54 -0
- common/web/templates/parser.html +53 -0
- {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
- common/web/web_utils.py +377 -0
- {brg_certificate → common}/wltPb_pb2.py +14 -12
- {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
- gui_certificate/gui_certificate_cli.py +14 -0
- gui_certificate/server.py +1062 -0
- gui_certificate/templates/cert_run.html +1207 -0
- wiliot_certificate-4.5.0a1.dist-info/METADATA +110 -0
- wiliot_certificate-4.5.0a1.dist-info/RECORD +182 -0
- {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.dist-info}/WHEEL +1 -1
- wiliot_certificate-4.5.0a1.dist-info/entry_points.txt +5 -0
- wiliot_certificate-4.5.0a1.dist-info/top_level.txt +3 -0
- brg_certificate/ag/energous_v0_defines.py +0 -925
- brg_certificate/ag/energous_v1_defines.py +0 -931
- brg_certificate/ag/energous_v2_defines.py +0 -925
- brg_certificate/ag/energous_v3_defines.py +0 -925
- brg_certificate/ag/energous_v4_defines.py +0 -925
- brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
- brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
- brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
- brg_certificate/ag/minew_lte_v0_defines.py +0 -925
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
- brg_certificate/brg_certificate.py +0 -225
- brg_certificate/brg_certificate_cli.py +0 -63
- brg_certificate/cert_common.py +0 -923
- brg_certificate/cert_config.py +0 -402
- brg_certificate/cert_utils.py +0 -362
- brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
- brg_certificate/certificate_bcc_test_list.txt +0 -48
- brg_certificate/certificate_sanity_test_list.txt +0 -43
- brg_certificate/certificate_test_list.txt +0 -53
- brg_certificate/config/eclipse.json +0 -10
- brg_certificate/config/hivemq.json +0 -10
- brg_certificate/config/mosquitto.json +0 -10
- brg_certificate/config/mosquitto.md +0 -95
- brg_certificate/config/wiliot-dev.json +0 -10
- brg_certificate/restore_brg.py +0 -61
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
- brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
- brg_certificate/wltPb_pb2.pyi +0 -234
- brg_certificate/wlt_types.py +0 -113
- gw_certificate/ag/ut_defines.py +0 -364
- gw_certificate/ag/wlt_types.py +0 -85
- gw_certificate/ag/wlt_types_ag.py +0 -5310
- gw_certificate/ag/wlt_types_data.py +0 -64
- gw_certificate/api/extended_api.py +0 -23
- gw_certificate/api_if/200/data.json +0 -106
- gw_certificate/api_if/200/status.json +0 -47
- gw_certificate/api_if/201/data.json +0 -98
- gw_certificate/api_if/201/status.json +0 -53
- gw_certificate/api_if/205/logs.json +0 -12
- gw_certificate/api_if/api_validation.py +0 -38
- gw_certificate/api_if/gw_capabilities.py +0 -54
- gw_certificate/cert_results.py +0 -145
- gw_certificate/common/analysis_data_bricks.py +0 -60
- gw_certificate/common/debug.py +0 -42
- gw_certificate/common/serialization_formatter.py +0 -93
- gw_certificate/common/utils.py +0 -8
- gw_certificate/common/utils_defines.py +0 -15
- gw_certificate/common/wltPb_pb2.py +0 -84
- gw_certificate/gw_certificate.py +0 -154
- gw_certificate/gw_certificate_cli.py +0 -87
- gw_certificate/interface/4.4.93_app.zip +0 -0
- gw_certificate/interface/4.4.93_sd_bl_app.zip +0 -0
- gw_certificate/interface/ble_simulator.py +0 -61
- gw_certificate/interface/ble_sniffer.py +0 -189
- gw_certificate/interface/flash_fw.py +0 -90
- gw_certificate/interface/if_defines.py +0 -36
- gw_certificate/interface/mqtt.py +0 -563
- gw_certificate/interface/nrfutil-linux +0 -0
- gw_certificate/interface/nrfutil-mac +0 -0
- gw_certificate/interface/nrfutil.exe +0 -0
- gw_certificate/interface/pkt_generator.py +0 -594
- gw_certificate/interface/uart_if.py +0 -236
- gw_certificate/interface/uart_ports.py +0 -20
- gw_certificate/templates/results.html +0 -241
- gw_certificate/templates/stage.html +0 -22
- gw_certificate/templates/table.html +0 -6
- gw_certificate/templates/test.html +0 -38
- gw_certificate/tests/__init__.py +0 -10
- gw_certificate/tests/actions.py +0 -289
- gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
- gw_certificate/tests/connection.py +0 -188
- gw_certificate/tests/downlink.py +0 -172
- gw_certificate/tests/generic.py +0 -238
- gw_certificate/tests/registration.py +0 -340
- gw_certificate/tests/static/__init__.py +0 -0
- gw_certificate/tests/static/connection_defines.py +0 -9
- gw_certificate/tests/static/downlink_defines.py +0 -9
- gw_certificate/tests/static/generated_packet_table.py +0 -195
- gw_certificate/tests/static/packet_table.csv +0 -10067
- gw_certificate/tests/static/references.py +0 -5
- gw_certificate/tests/static/uplink_defines.py +0 -14
- gw_certificate/tests/throughput.py +0 -240
- gw_certificate/tests/uplink.py +0 -853
- wiliot_certificate-4.4.3.dist-info/METADATA +0 -211
- wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
- wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
- wiliot_certificate-4.4.3.dist-info/top_level.txt +0 -3
- {brg_certificate → certificate}/__init__.py +0 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -0
- {brg_certificate → certificate}/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -0
- {gw_certificate → common}/api_if/202/data.json +0 -0
- {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
- {gw_certificate → common}/api_if/203/data.json +0 -0
- {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
- {gw_certificate → common}/api_if/204/data.json +0 -0
- {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
- {gw_certificate → common}/api_if/205/data.json +0 -0
- {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
- {gw_certificate → common}/api_if/205/status.json +0 -0
- {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
- {gw_certificate → common/api_if}/__init__.py +0 -0
- {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
- {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
from certificate import cert_config
|
|
4
|
+
from certificate.cert_prints import *
|
|
5
|
+
from certificate.cert_defines import *
|
|
6
|
+
from certificate.wlt_types import *
|
|
7
|
+
import certificate.cert_common as cert_common
|
|
8
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
9
|
+
from common.api_if.api_validation import api_validation
|
|
10
|
+
|
|
11
|
+
# DEFINES
|
|
12
|
+
TIMEOUT_IN_MINUTES = 3
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def run(test):
|
|
16
|
+
test = cert_common.test_prolog(test)
|
|
17
|
+
if test.rc == TEST_FAILED:
|
|
18
|
+
return cert_common.test_epilog(test)
|
|
19
|
+
|
|
20
|
+
# Stage setup
|
|
21
|
+
phase_run_print("Connection test started")
|
|
22
|
+
dut_mqttc = test.get_mqttc_by_target(DUT)
|
|
23
|
+
|
|
24
|
+
# Initiate action
|
|
25
|
+
if not cert_common.pipeline_running():
|
|
26
|
+
warning_prefix = COLORS["WARNING"]
|
|
27
|
+
warning_suffix = COLORS["ENDC"]
|
|
28
|
+
input(
|
|
29
|
+
(
|
|
30
|
+
f"{warning_prefix}The GW is expected to publish a configuration "
|
|
31
|
+
"JSON/Protobuf message through the status topic upon connecting "
|
|
32
|
+
"to mqtt:\nPlease unplug GW from power. Press enter when unplugged"
|
|
33
|
+
f"{warning_suffix}"
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
dut_mqttc.flush_pkts()
|
|
37
|
+
input(
|
|
38
|
+
f"{warning_prefix}Please plug GW back to power. "
|
|
39
|
+
f"Press enter when plugged{warning_suffix}"
|
|
40
|
+
)
|
|
41
|
+
else:
|
|
42
|
+
# If this test runs as part of a pipeline, act like the reboot test and don't demand a manual disconnect & connect
|
|
43
|
+
utPrint(f"Publishing reboot action to {dut_mqttc.update_topic}. Awaiting reconnect.. (timeout is {TIMEOUT_IN_MINUTES} minutes)")
|
|
44
|
+
dut_mqttc.flush_pkts()
|
|
45
|
+
cert_config.gw_action(test, f"{REBOOT_GW_ACTION}", target=DUT)
|
|
46
|
+
|
|
47
|
+
# Wait for response
|
|
48
|
+
gw_type = None
|
|
49
|
+
utPrint(f'Waiting for GW to connect... (Timeout {TIMEOUT_IN_MINUTES} minutes)')
|
|
50
|
+
timeout = datetime.datetime.now() + datetime.timedelta(minutes=TIMEOUT_IN_MINUTES)
|
|
51
|
+
while datetime.datetime.now() < timeout:
|
|
52
|
+
gw_type, msg = cert_common.get_gw_type(dut_mqttc)
|
|
53
|
+
if gw_type is not None:
|
|
54
|
+
break
|
|
55
|
+
print_update_wait(5)
|
|
56
|
+
|
|
57
|
+
# generate logs
|
|
58
|
+
cert_mqtt.generate_log_file(test, "reboot")
|
|
59
|
+
|
|
60
|
+
# Analyze results
|
|
61
|
+
if gw_type is None:
|
|
62
|
+
test.rc = TEST_FAILED
|
|
63
|
+
test.reason = "The gateway did not reboot properly, status message was not received"
|
|
64
|
+
elif gw_type == "other":
|
|
65
|
+
test.rc = TEST_FAILED
|
|
66
|
+
test.reason = f"gatewayType must be defined in the status message {msg}"
|
|
67
|
+
else:
|
|
68
|
+
utPrint("Gateway rebooted and uploaded a configuration message as expected.", "GREEN")
|
|
69
|
+
utPrint(f"The configuration message received:\n {msg}")
|
|
70
|
+
|
|
71
|
+
utPrint("Checking the status message matches API format...")
|
|
72
|
+
test = api_validation(test)
|
|
73
|
+
|
|
74
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Gateway Downlink",
|
|
3
|
+
"module": "Cloud Connectivity",
|
|
4
|
+
"purpose": "Validate device advertises requested txPackets uniformly across primary channels",
|
|
5
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Gateway-Actions"],
|
|
6
|
+
"initialCondition": "Device is online, connected to MQTT and supports downlink",
|
|
7
|
+
"procedure": [
|
|
8
|
+
"Test prolog",
|
|
9
|
+
"Correlation - Trigger downlink packet; validate advertised packets increase in time and count per txMaxDuration",
|
|
10
|
+
"Uniformity - Confirm equal distribution across the 3 primary channels",
|
|
11
|
+
"Test epilog"
|
|
12
|
+
],
|
|
13
|
+
"expectedOutcome": "Equal advertising across 3 primary channels with constant intervals over the specified txMaxDuration",
|
|
14
|
+
"mandatory": 1,
|
|
15
|
+
"multiBridgeTest": 0,
|
|
16
|
+
"gwOnlyTest": 1,
|
|
17
|
+
"dataSimOnlyTest": 0,
|
|
18
|
+
"allSupportedValues": []
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import plotly.express as px
|
|
4
|
+
|
|
5
|
+
from certificate.cert_prints import *
|
|
6
|
+
from certificate.cert_defines import *
|
|
7
|
+
from certificate.wlt_types import *
|
|
8
|
+
import certificate.cert_common as cert_common
|
|
9
|
+
import certificate.cert_config as cert_config
|
|
10
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
11
|
+
from certificate.cert_gw_sim import DEDUPLICATION_PKTS
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# DEFINES
|
|
15
|
+
RAW_TX_DATA = "1E16C6FC123456789123456789123456789123456789123456789100000000"
|
|
16
|
+
STAGE_DURATIONS = [100, 1000, 16000]
|
|
17
|
+
DOWNLINK_PUBLISH_COUNT = range(3)
|
|
18
|
+
CHANNELS = [(37, ag.RX_CHANNEL_37), (38, ag.RX_CHANNEL_38), (39, ag.RX_CHANNEL_39)]
|
|
19
|
+
|
|
20
|
+
# HELPER FUNCTIONS
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def create_unique_raw_packet(base_raw_packet: str, duration: int, retry: int, channel: int) -> str:
|
|
24
|
+
"""
|
|
25
|
+
Modifies the base_raw_packet string by replacing its tail with a padded duration (5 digits) and retry digit.
|
|
26
|
+
Examples:
|
|
27
|
+
create_unique_raw_packet(RAW_TX_DATA, 700, 2, 37) -> '...0000000000000000000000000 00700237'
|
|
28
|
+
create_unique_raw_packet(RAW_TX_DATA, 1500, 1, 38) -> '...0000000000000000000000000 01500138'
|
|
29
|
+
create_unique_raw_packet(RAW_TX_DATA, 16000, 9, 39) -> '...0000000000000000000000000 16000939'
|
|
30
|
+
"""
|
|
31
|
+
return f"{base_raw_packet[:-8]}{duration:05d}{retry:01d}{channel:02d}"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def send_tested_payloads(test, rx_channel, tx_max_durations, downlink_publish_count, sniffed_pkts):
|
|
35
|
+
for duration in tx_max_durations:
|
|
36
|
+
for count_num in downlink_publish_count:
|
|
37
|
+
retries = duration // 20
|
|
38
|
+
raw_tx_data = create_unique_raw_packet(RAW_TX_DATA, duration, count_num, rx_channel)
|
|
39
|
+
dut_mqttc = test.get_mqttc_by_target(DUT)
|
|
40
|
+
utPrint(
|
|
41
|
+
f'Publishing to topic: {dut_mqttc.update_topic} packets with Duration of: {duration} for channel {rx_channel}',
|
|
42
|
+
"BLUE"
|
|
43
|
+
)
|
|
44
|
+
cert_config.gw_downlink(test, raw_tx_data=raw_tx_data, max_duration=duration, max_retries=retries)
|
|
45
|
+
sniffed_pkts[rx_channel][raw_tx_data] = {
|
|
46
|
+
'tx_max_duration': duration,
|
|
47
|
+
'tx_max_retries': retries,
|
|
48
|
+
'retry': count_num,
|
|
49
|
+
'num_pkts_received': 0
|
|
50
|
+
}
|
|
51
|
+
scan_duration = max(0.5, (duration / 1000) * 1.2)
|
|
52
|
+
mqtt_scan_wait(test, duration=scan_duration, target=TESTER)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def process_sniffed_packets(test, channel, sniffed_pkts):
|
|
56
|
+
data_pkts = cert_mqtt.get_all_data_pkts(test.get_mqttc_by_target(TESTER))
|
|
57
|
+
for pkt in data_pkts:
|
|
58
|
+
for sent_pkt in sniffed_pkts[channel]:
|
|
59
|
+
if sent_pkt in pkt[PAYLOAD]:
|
|
60
|
+
sniffed_pkts[channel][sent_pkt]['num_pkts_received'] += 1
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def calc_for_stage_downlink(rsquared, slope):
|
|
64
|
+
error_msg = ''
|
|
65
|
+
if slope == 0: # Meaning no packets received
|
|
66
|
+
error_msg = (
|
|
67
|
+
"Actions were sent to the GW to advertise packets, but no packets "
|
|
68
|
+
"were received by the tester"
|
|
69
|
+
)
|
|
70
|
+
return "failed", error_msg
|
|
71
|
+
elif rsquared > 0.6 and slope > 0:
|
|
72
|
+
return "passed", error_msg
|
|
73
|
+
else:
|
|
74
|
+
error_msg = (
|
|
75
|
+
"The correlation between increasing advertising duration and the "
|
|
76
|
+
"number of packets received by the tester is weak"
|
|
77
|
+
)
|
|
78
|
+
return "failed", error_msg
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def report_and_results(test, sniffed_pkts):
|
|
82
|
+
utPrint('-' * 50)
|
|
83
|
+
for channel, pkt_map in sniffed_pkts.items():
|
|
84
|
+
if not pkt_map:
|
|
85
|
+
continue
|
|
86
|
+
received_width = max(len(str(meta.get('num_pkts_received', 0))) for meta in pkt_map.values())
|
|
87
|
+
sent_width = max(len(str(meta.get('tx_max_retries', 0))) for meta in pkt_map.values())
|
|
88
|
+
duration_width = max(len(str(meta.get('tx_max_duration', ''))) for meta in pkt_map.values())
|
|
89
|
+
retry_width = max(len(str(meta.get('retry', ''))) for meta in pkt_map.values())
|
|
90
|
+
for _, meta in pkt_map.items():
|
|
91
|
+
received_raw = meta.get('num_pkts_received', 0)
|
|
92
|
+
# Guard against fractional artifacts; display only whole packets
|
|
93
|
+
received = int(received_raw)
|
|
94
|
+
sent = int(meta.get('tx_max_retries', 0))
|
|
95
|
+
percentage = (received / sent * 100) if sent else 0.0
|
|
96
|
+
duration = meta.get('tx_max_duration', '')
|
|
97
|
+
retry = meta.get('retry', '')
|
|
98
|
+
print(
|
|
99
|
+
f"Number of pkts received on channel {channel} for duration {duration:>{duration_width}} "
|
|
100
|
+
f"and retry {retry:>{retry_width}} got {received:>{received_width}} packets | "
|
|
101
|
+
f"Sent: {sent:>{sent_width}} [{percentage:6.2f}%]"
|
|
102
|
+
)
|
|
103
|
+
utPrint('-' * 50)
|
|
104
|
+
# Flatten nested dict into list of row dicts
|
|
105
|
+
rows = []
|
|
106
|
+
for channel, pkt_map in sniffed_pkts.items():
|
|
107
|
+
for raw_payload, meta in pkt_map.items():
|
|
108
|
+
row = {'channel': str(channel),
|
|
109
|
+
'raw_tx_data': raw_payload,
|
|
110
|
+
'tx_max_duration': meta.get('tx_max_duration'),
|
|
111
|
+
'tx_max_retries': meta.get('tx_max_retries'),
|
|
112
|
+
'retry': meta.get('retry'),
|
|
113
|
+
'num_pkts_received': meta.get('num_pkts_received')
|
|
114
|
+
}
|
|
115
|
+
rows.append(row)
|
|
116
|
+
df_received_pkts = pd.DataFrame(rows)
|
|
117
|
+
|
|
118
|
+
if df_received_pkts.empty:
|
|
119
|
+
utPrint('No packets collected; skipping graph generation.', 'WARNING')
|
|
120
|
+
test.rc = TEST_FAILED
|
|
121
|
+
test.reason = 'No packets collected.'
|
|
122
|
+
return
|
|
123
|
+
|
|
124
|
+
if test.active_brg.board_type == ag.BOARD_TYPE_FANSTEL_WIFI_V0:
|
|
125
|
+
x_value = ('tx_max_retries', 'TX Max Retries')
|
|
126
|
+
else:
|
|
127
|
+
x_value = ('tx_max_duration', 'TX Max Duration')
|
|
128
|
+
|
|
129
|
+
# Create scatter with OLS trendline per channel
|
|
130
|
+
fig = px.scatter(
|
|
131
|
+
df_received_pkts,
|
|
132
|
+
x=x_value[0], y='num_pkts_received', color='channel', title=f'Packets Received by Sniffer / {x_value[1]}', trendline='ols',
|
|
133
|
+
labels={x_value[0]: x_value[1], 'num_pkts_received': 'Number of packets received', 'channel': 'BLE Adv. Channel'}
|
|
134
|
+
)
|
|
135
|
+
fig.update_layout(scattermode='group', scattergap=0.95)
|
|
136
|
+
|
|
137
|
+
# Extract regression results
|
|
138
|
+
trendline_info = px.get_trendline_results(fig)
|
|
139
|
+
|
|
140
|
+
# Calculate whether stage pass/failed
|
|
141
|
+
for channel, channel_df in trendline_info.groupby('BLE Adv. Channel'):
|
|
142
|
+
channel_pkts = df_received_pkts[df_received_pkts['channel'] == channel]
|
|
143
|
+
channel_trendline = channel_df['px_fit_results'].iloc[0]
|
|
144
|
+
slope = channel_trendline.params[1]
|
|
145
|
+
rsquared = channel_trendline.rsquared
|
|
146
|
+
total_received = int(channel_pkts['num_pkts_received'].sum())
|
|
147
|
+
channel_rc, channel_err_summary = calc_for_stage_downlink(rsquared, slope)
|
|
148
|
+
|
|
149
|
+
utPrint(f'Channel {channel}: {channel_rc}')
|
|
150
|
+
utPrint(f'- Total {len(channel_pkts)} MQTT payloads sent')
|
|
151
|
+
utPrint(f'- Total {total_received} BLE packets received by sniffer (including duplicates)')
|
|
152
|
+
utPrint(f'- R Value: {rsquared} | Slope: {slope}')
|
|
153
|
+
|
|
154
|
+
if channel_rc == 'failed':
|
|
155
|
+
test.rc = TEST_FAILED
|
|
156
|
+
test.reason = channel_err_summary
|
|
157
|
+
|
|
158
|
+
# Export graph
|
|
159
|
+
html_file_path = os.path.join(ARTIFACTS_DIR, test.dir, 'downlink_graph.html')
|
|
160
|
+
fig.write_html(html_file_path)
|
|
161
|
+
utPrint('-' * 50)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def run(test):
|
|
165
|
+
test = cert_common.test_prolog(test)
|
|
166
|
+
if test.rc == TEST_FAILED:
|
|
167
|
+
return cert_common.test_epilog(test)
|
|
168
|
+
|
|
169
|
+
# Stage setup
|
|
170
|
+
utPrint("Setting TESTER GW to allow duplicate packets", "GREEN")
|
|
171
|
+
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0", target=TESTER)
|
|
172
|
+
|
|
173
|
+
# Clean
|
|
174
|
+
sniffed_pkts = {}
|
|
175
|
+
|
|
176
|
+
for channel, channel_idx in CHANNELS:
|
|
177
|
+
# Setup
|
|
178
|
+
test.flush_all_mqtt_packets()
|
|
179
|
+
sniffed_pkts[channel] = {}
|
|
180
|
+
|
|
181
|
+
# Configuring
|
|
182
|
+
utPrint(f'Configuring TESTER to RX channel {channel}', "GREEN")
|
|
183
|
+
test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL],
|
|
184
|
+
values=[channel_idx],
|
|
185
|
+
module=test.tester.internal_brg.datapath,
|
|
186
|
+
target=TESTER)[0]
|
|
187
|
+
time.sleep(2) # Wait for sniffer to start
|
|
188
|
+
|
|
189
|
+
# Send
|
|
190
|
+
send_tested_payloads(test, channel, STAGE_DURATIONS, DOWNLINK_PUBLISH_COUNT, sniffed_pkts)
|
|
191
|
+
|
|
192
|
+
# Receive packets
|
|
193
|
+
process_sniffed_packets(test, channel, sniffed_pkts)
|
|
194
|
+
|
|
195
|
+
# Channel switch setup
|
|
196
|
+
cert_mqtt.generate_log_file(test, f'{channel}', TESTER)
|
|
197
|
+
|
|
198
|
+
# Analyze and report
|
|
199
|
+
report_and_results(test, sniffed_pkts)
|
|
200
|
+
utPrint("Resetting TESTER GW to re-enable packet deduplication", "GREEN")
|
|
201
|
+
cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1", target=TESTER)
|
|
202
|
+
test = cert_config.config_brg_defaults(test, modules=[test.tester.internal_brg.datapath], target=TESTER)[0]
|
|
203
|
+
|
|
204
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Gateway Uplink Extended Advertising Stress",
|
|
3
|
+
"module": "Cloud Connectivity",
|
|
4
|
+
"purpose": "Test gateway's stress handling capabilities for different rates and durations when scanning in extended advertising",
|
|
5
|
+
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network---Gateway-Extended-Advertising-Implementation",
|
|
6
|
+
"initialCondition": "Gateway configured to defaults, in a BLE-clean environment",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"For each pps value, advertise extended advertising packets at that rate, with pointers sent on each of the three BLE advertising channels, and compare the advertised vs uploaded rate",
|
|
9
|
+
"Test epilog"],
|
|
10
|
+
"expectedOutcome": "Find the maximum PPS supported by the gateway when scanning in extended advertising",
|
|
11
|
+
"mandatory": 0,
|
|
12
|
+
"multiBridgeTest": 0,
|
|
13
|
+
"gwOnlyTest": 1,
|
|
14
|
+
"dataSimOnlyTest": 1,
|
|
15
|
+
"allSupportedValues": [20, 40, 60, 80, 100, 120, 140, 160, 180, 200]
|
|
16
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
|
|
2
|
+
from certificate.cert_prints import *
|
|
3
|
+
from certificate.cert_defines import *
|
|
4
|
+
from certificate.wlt_types import *
|
|
5
|
+
from certificate.ag.wlt_types_ag import OUTPUT_POWER_2_4_MAX
|
|
6
|
+
import certificate.cert_common as cert_common
|
|
7
|
+
import certificate.cert_utils as cert_utils
|
|
8
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
9
|
+
import certificate.cert_config as cert_config
|
|
10
|
+
import certificate.cert_gw_sim as cert_gw_sim
|
|
11
|
+
import math
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# DEFINES
|
|
15
|
+
STRESS_TEST_INDICATOR = cert_utils.get_random_hex_str(len=6)
|
|
16
|
+
|
|
17
|
+
DUPLICATES = 1
|
|
18
|
+
ADVA_ASCII_LEN = 12
|
|
19
|
+
|
|
20
|
+
LOWEST_PPS = 20
|
|
21
|
+
ADV_DURATION_LOWEST_PPS = 70
|
|
22
|
+
ADV_DURATION_DEFAULT = 30
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# HELPER FUNCTIONS
|
|
26
|
+
|
|
27
|
+
def generate_extended_adv_payloads_list(pkt, duplicates):
|
|
28
|
+
"""
|
|
29
|
+
Should always stay synced to how cmd_ble_sim generate additional packets with unique_pkts_count
|
|
30
|
+
"""
|
|
31
|
+
data_payload = pkt[12:]
|
|
32
|
+
ext_adv_payload = data_payload * 7
|
|
33
|
+
last_hex = pkt[-8:]
|
|
34
|
+
last_int = int.from_bytes(bytes.fromhex(last_hex), byteorder='little', signed=False)
|
|
35
|
+
|
|
36
|
+
pkts_list = []
|
|
37
|
+
for i in range(duplicates):
|
|
38
|
+
value = last_int + i
|
|
39
|
+
# Convert back to 4 bytes in little-endian and then to hex
|
|
40
|
+
new_hex = value.to_bytes(4, byteorder='little', signed=False).hex().upper()
|
|
41
|
+
|
|
42
|
+
pkts_list.append(pkt[:12] + ext_adv_payload[:-8] + new_hex)
|
|
43
|
+
|
|
44
|
+
return pkts_list
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def run(test):
|
|
48
|
+
test = cert_common.test_prolog(test)
|
|
49
|
+
if test.rc == TEST_FAILED:
|
|
50
|
+
return cert_common.test_epilog(test)
|
|
51
|
+
|
|
52
|
+
cert_config.gw_action(test, f'{cert_gw_sim.BLE_SIM_INIT} 1', TESTER)
|
|
53
|
+
|
|
54
|
+
test_pkts_received = []
|
|
55
|
+
data_pkts_received = []
|
|
56
|
+
results = []
|
|
57
|
+
for param in test.params:
|
|
58
|
+
phase_run_print(f"PPS = {param}")
|
|
59
|
+
test.flush_all_mqtt_packets()
|
|
60
|
+
pps = param.value
|
|
61
|
+
# adv_duration is increased only for lowest pps to increase packets sample for reliable results
|
|
62
|
+
adv_duration = ADV_DURATION_LOWEST_PPS if pps == LOWEST_PPS else ADV_DURATION_DEFAULT
|
|
63
|
+
delay = math.floor(1000 / pps) # This should be bigger than 2ms
|
|
64
|
+
upload_wait_time = test.dut.upload_wait_time + 15
|
|
65
|
+
|
|
66
|
+
# Generate pkts and get ready to advertise
|
|
67
|
+
payload = cert_common.generate_adv_payload(STRESS_TEST_INDICATOR)
|
|
68
|
+
generated_payloads = generate_extended_adv_payloads_list(payload, adv_duration * pps)
|
|
69
|
+
|
|
70
|
+
# We provide the tester with the first pkt only. It then advertises in a loop pkts identical
|
|
71
|
+
# to the ones we generated (by incrementing the last bytes).
|
|
72
|
+
gw_action_cmd = (f'{cert_gw_sim.BLE_SIM_EXT_ADV} {payload} {DUPLICATES} '
|
|
73
|
+
f'{OUTPUT_POWER_2_4_MAX} {delay} {adv_duration * pps}')
|
|
74
|
+
cert_config.gw_action(test, gw_action_cmd, TESTER)
|
|
75
|
+
mqtt_scan_wait(test, adv_duration + upload_wait_time)
|
|
76
|
+
|
|
77
|
+
cert_mqtt.dump_pkts(test, log=param.name)
|
|
78
|
+
phase_pkts_received = cert_mqtt.get_all_aggregated_data_pkts(test.get_mqttc_by_target(DUT), indicator=STRESS_TEST_INDICATOR)
|
|
79
|
+
|
|
80
|
+
test, percentage_received = cert_common.stress_analysis(
|
|
81
|
+
test, pps, generated_payloads,
|
|
82
|
+
[(p[ALIAS_BRIDGE_ID] + p[AGGREGATED_PAYLOAD]) for p in phase_pkts_received])
|
|
83
|
+
results.extend([pps, percentage_received])
|
|
84
|
+
cert_mqtt.generate_log_file(test, param.name)
|
|
85
|
+
|
|
86
|
+
test.set_phase_rc(param.name, test.rc)
|
|
87
|
+
test.add_phase_reason(param.name, test.reason)
|
|
88
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
89
|
+
break # break the whole for loop and keep the test as failed
|
|
90
|
+
test.reset_result() # reset result and continue to next param
|
|
91
|
+
data_pkts_received.extend(cert_mqtt.get_all_data_pkts(test.get_mqttc_by_target(DUT)))
|
|
92
|
+
test_pkts_received.extend(test.get_mqttc_by_target(DUT)._userdata[PKTS].data)
|
|
93
|
+
cert_config.gw_action(test, f'{cert_gw_sim.BLE_SIM_INIT} 0', TESTER)
|
|
94
|
+
|
|
95
|
+
# Generate stress test graphs
|
|
96
|
+
cert_common.generate_graph_stress_test(test, results, data_pkts_received)
|
|
97
|
+
|
|
98
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "GW Reboot Action",
|
|
3
|
+
"module": "Cloud Connectivity",
|
|
4
|
+
"purpose": "Verify the device reboots upon receiving reboot action",
|
|
5
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Gateway-Actions"],
|
|
6
|
+
"initialCondition": "Gateway online and connected to MQTT",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"Reboot action sent to tested GW",
|
|
9
|
+
"Wait for device to connect to MQTT by verifying a status message or fail when timeout occurs",
|
|
10
|
+
"Test epilog"],
|
|
11
|
+
"expectedOutcome": "Device reboot (disconnect from MQTT then reconnect and publish its configurations to the status topic) before timeout",
|
|
12
|
+
"mandatory": 0,
|
|
13
|
+
"multiBridgeTest": 0,
|
|
14
|
+
"gwOnlyTest": 1,
|
|
15
|
+
"allSupportedValues": []
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
from certificate.cert_prints import *
|
|
4
|
+
from certificate.cert_defines import *
|
|
5
|
+
from certificate.wlt_types import *
|
|
6
|
+
import certificate.cert_common as cert_common
|
|
7
|
+
import certificate.cert_config as cert_config
|
|
8
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
9
|
+
from common.api_if.api_validation import api_validation
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# DEFINES
|
|
13
|
+
TIMEOUT_IN_MINUTES = 3
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def run(test):
|
|
17
|
+
test = cert_common.test_prolog(test)
|
|
18
|
+
if test.rc == TEST_FAILED:
|
|
19
|
+
return cert_common.test_epilog(test)
|
|
20
|
+
|
|
21
|
+
# Stage setup
|
|
22
|
+
phase_run_print("Reboot started")
|
|
23
|
+
|
|
24
|
+
# Initiate action
|
|
25
|
+
dut_mqttc = test.get_mqttc_by_target(DUT)
|
|
26
|
+
utPrint(f"Publishing reboot action to {dut_mqttc.update_topic}. Awaiting reboot.. (timeout is {TIMEOUT_IN_MINUTES} minutes)")
|
|
27
|
+
cert_config.gw_action(test, f"{REBOOT_GW_ACTION}", target=DUT)
|
|
28
|
+
dut_mqttc.flush_pkts()
|
|
29
|
+
|
|
30
|
+
# Wait for response
|
|
31
|
+
gw_type = None
|
|
32
|
+
utPrint(f'Waiting for GW to connect... (Timeout {TIMEOUT_IN_MINUTES} minutes)')
|
|
33
|
+
timeout = datetime.datetime.now() + datetime.timedelta(minutes=TIMEOUT_IN_MINUTES)
|
|
34
|
+
while datetime.datetime.now() < timeout:
|
|
35
|
+
gw_type, msg = cert_common.get_gw_type(dut_mqttc)
|
|
36
|
+
if gw_type is not None:
|
|
37
|
+
break
|
|
38
|
+
print_update_wait(5)
|
|
39
|
+
|
|
40
|
+
# generate logs
|
|
41
|
+
cert_mqtt.generate_log_file(test, "reboot")
|
|
42
|
+
|
|
43
|
+
# Analyze results
|
|
44
|
+
if gw_type is None:
|
|
45
|
+
test.rc = TEST_FAILED
|
|
46
|
+
test.reason = "The gateway did not reboot properly, status message was not received"
|
|
47
|
+
elif gw_type == "other":
|
|
48
|
+
test.rc = TEST_FAILED
|
|
49
|
+
test.reason = f"gatewayType must be defined in the status message {msg}"
|
|
50
|
+
else:
|
|
51
|
+
utPrint("Gateway rebooted and uploaded a configuration message as expected.", "GREEN")
|
|
52
|
+
utPrint(f"The configuration message received:\n {msg}")
|
|
53
|
+
|
|
54
|
+
utPrint("Checking the status message matches API format...")
|
|
55
|
+
test = api_validation(test)
|
|
56
|
+
|
|
57
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Registration",
|
|
3
|
+
"module": "Cloud Connectivity",
|
|
4
|
+
"purpose": "Verify the device register, connect to MQTT, upload a status message & manage/refresh tokens correctly",
|
|
5
|
+
"documentation": "https://community.wiliot.com/customers/s/article/Registering-Third-Party-Gateways",
|
|
6
|
+
"initialCondition": "Gateway unregistered anywhere, attempts to connect to Wiliot's AWS MQTT broker. Testing PC has API key as environment variable",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"Registry - Pre-register the gw, then device-authorize & registry requests are expected",
|
|
9
|
+
"Online - Token acquisition and MQTT connection",
|
|
10
|
+
"Active - Status message upload",
|
|
11
|
+
"Refresh - Token refreshed by GW",
|
|
12
|
+
"Test epilog"],
|
|
13
|
+
"expectedOutcome": "Device goes through the Wiliot registration flow & token refresh",
|
|
14
|
+
"mandatory": 1,
|
|
15
|
+
"multiBridgeTest": 0,
|
|
16
|
+
"gwOnlyTest": 1,
|
|
17
|
+
"internalBridge": 0,
|
|
18
|
+
"allSupportedValues": ["registry", "online", "refresh"]
|
|
19
|
+
}
|