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,93 @@
|
|
|
1
|
+
# This test verifies that the gateway correctly handles extended advertising packets
|
|
2
|
+
# where a 31-byte payload is expanded to 31*7 bytes (217 bytes) containing the same payload repeated 7 times
|
|
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_utils as cert_utils
|
|
8
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
9
|
+
import certificate.cert_config as cert_config
|
|
10
|
+
import certificate.cert_data_sim as cert_data_sim
|
|
11
|
+
from certificate.cert_gw_sim import GW_CERT_TESTER
|
|
12
|
+
|
|
13
|
+
# DEFINES
|
|
14
|
+
EXT_ADV_TEST_INDICATOR = cert_utils.get_random_hex_str(len=6)
|
|
15
|
+
EXPECTED_REPEAT_COUNT = 7
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def ext_adv_analysis(test, pkts):
|
|
19
|
+
"""
|
|
20
|
+
Analyze received packets to verify extended advertising scanning:
|
|
21
|
+
- Each 31-byte payload should be expanded to 217 bytes (31*7) (aggregated packet generated by the TESTER FW)
|
|
22
|
+
- The aggregated payload should contain the same 31-byte payload repeated 7 times
|
|
23
|
+
"""
|
|
24
|
+
phase_run_print("Extended Advertising Analysis")
|
|
25
|
+
|
|
26
|
+
# Create list of expected expanded payloads (each payload repeated 7 times)
|
|
27
|
+
expected_payloads = [pkt.get_pkt()[12:] * EXPECTED_REPEAT_COUNT for pkt in pkts]
|
|
28
|
+
|
|
29
|
+
# Get received aggregated packets from MQTT
|
|
30
|
+
received_pkts_mqtt = cert_mqtt.get_all_aggregated_data_pkts(test.get_mqttc_by_target(DUT), indicator=EXT_ADV_TEST_INDICATOR)
|
|
31
|
+
|
|
32
|
+
if len(received_pkts_mqtt) == 0:
|
|
33
|
+
test.rc = TEST_FAILED
|
|
34
|
+
test.reason = "No packets were received from the gateway, make sure the gateway is able to receive aggregated \
|
|
35
|
+
packets with 7 31-byte payloads"
|
|
36
|
+
return test
|
|
37
|
+
|
|
38
|
+
# Count how many expected payloads were received
|
|
39
|
+
received_payloads = {pkt[AGGREGATED_PAYLOAD] for pkt in received_pkts_mqtt}
|
|
40
|
+
received_count = sum(expected_payload in received_payloads for expected_payload in expected_payloads)
|
|
41
|
+
expected_count = len(expected_payloads)
|
|
42
|
+
|
|
43
|
+
print(f'Expected payloads: {expected_count}, Received matching payloads: {received_count}')
|
|
44
|
+
|
|
45
|
+
if received_count < expected_count * 0.8:
|
|
46
|
+
test.rc = TEST_FAILED
|
|
47
|
+
print(f"Insufficient packets received: {received_count}/{expected_count} (expected at least 80%)")
|
|
48
|
+
test.reason = f"Insufficient packets received: {received_count}/{expected_count} (expected at least 80%)"
|
|
49
|
+
else:
|
|
50
|
+
test.rc = TEST_PASSED
|
|
51
|
+
print(f"Extended advertising validation passed: {received_count}/{expected_count} packets received")
|
|
52
|
+
test.reason = f"Extended advertising validation passed: {received_count}/{expected_count} packets received"
|
|
53
|
+
return test
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def run(test):
|
|
57
|
+
datapath_module = test.tester.internal_brg.datapath
|
|
58
|
+
test = cert_common.test_prolog(test)
|
|
59
|
+
if test.rc == TEST_FAILED:
|
|
60
|
+
return cert_common.test_epilog(test)
|
|
61
|
+
|
|
62
|
+
utPrint("Setting GW CERT TESTER to enable, to allow the TESTER transmit extended advertising packets", "GREEN")
|
|
63
|
+
cert_config.gw_action(test, f"{GW_CERT_TESTER} 1", target=TESTER)
|
|
64
|
+
|
|
65
|
+
# Configure the tester to transmit in extended advertising
|
|
66
|
+
utPrint('Configuring TESTER to transmit in extended advertising', "GREEN")
|
|
67
|
+
test = cert_config.brg_configure(test, fields=[BRG_PATTERN], values=[ag.DATAPATH_PATTERN_EXTENDED_ADV],
|
|
68
|
+
module=datapath_module, target=TESTER)[0]
|
|
69
|
+
time.sleep(1)
|
|
70
|
+
|
|
71
|
+
phase_run_print("Extended Advertising Gateway Scan Test")
|
|
72
|
+
test.flush_all_mqtt_packets()
|
|
73
|
+
|
|
74
|
+
# Generate packets with pixel header
|
|
75
|
+
# Each packet will have a 31-byte payload, the FW expands it to aggregated packet with 7 packets with the same payload
|
|
76
|
+
pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=100, num_of_brgs=1, pkt_type=PIXELS_PKT,
|
|
77
|
+
indicator=EXT_ADV_TEST_INDICATOR)
|
|
78
|
+
|
|
79
|
+
# Send packets using GenericSimThread
|
|
80
|
+
sim_thread = cert_data_sim.GenericSimThread(test=test, pkts=pkts, send_single_cycle=True)
|
|
81
|
+
sim_thread.start()
|
|
82
|
+
|
|
83
|
+
# Wait for packets to be scanned and uploaded
|
|
84
|
+
mqtt_scan_wait(test, 20)
|
|
85
|
+
|
|
86
|
+
# Analyze the results
|
|
87
|
+
test = ext_adv_analysis(test, pkts)
|
|
88
|
+
|
|
89
|
+
test = cert_config.config_brg_defaults(test, modules=[datapath_module], target=TESTER)[0]
|
|
90
|
+
cert_mqtt.generate_log_file(test, "uplink_ext_adv_test")
|
|
91
|
+
field_functionality_pass_fail_print(test, "Extended advertising scanning")
|
|
92
|
+
cert_config.gw_action(test, f"{GW_CERT_TESTER} 0", target=TESTER)
|
|
93
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Gateway Uplink",
|
|
3
|
+
"module": "Cloud Connectivity",
|
|
4
|
+
"purpose": "Verify gateway BLE scans and MQTT uplinks across packet types",
|
|
5
|
+
"documentation": "https://community.wiliot.com/customers/s/article/Sending-Wiliot-Packets-to-the-Wiliot-Cloud",
|
|
6
|
+
"initialCondition": "Gateway configured to defaults",
|
|
7
|
+
"procedure": [
|
|
8
|
+
"Test prolog",
|
|
9
|
+
"Send packets for each preset packet type (mgmt, pixels, sensor, geolocation)",
|
|
10
|
+
"Analyze received packets: validate counts, JSON serialization structure (when enabled), sequential sequence IDs, and geolocation uploads",
|
|
11
|
+
"Test epilog"
|
|
12
|
+
],
|
|
13
|
+
"expectedOutcome": "Received amount of packets matches the expected amount for each packet type and all additional validations pass as expected",
|
|
14
|
+
"mandatory": 1,
|
|
15
|
+
"multiBridgeTest": 0,
|
|
16
|
+
"gwOnlyTest": 1,
|
|
17
|
+
"dataSimOnlyTest": 1,
|
|
18
|
+
"allSupportedValues": ["mgmt_pkt", "pixels_pkt", "sensor_pkt", "geolocation"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# This test meant to show the GW performance when is put in a pkt stress generated from the BLE via the UART
|
|
2
|
+
from certificate.cert_prints import *
|
|
3
|
+
from certificate.cert_defines import *
|
|
4
|
+
from certificate.wlt_types import *
|
|
5
|
+
from common.api_if.api_validation import api_validation
|
|
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_data_sim as cert_data_sim
|
|
10
|
+
import pandas as pd
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# DEFINES
|
|
14
|
+
|
|
15
|
+
API_VALIDATION = "API Validation"
|
|
16
|
+
UPLINK_TEST_INDICATOR = cert_utils.get_random_hex_str(len=6)
|
|
17
|
+
NUM_OF_BRGS = 3
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# HELPER FUNCTIONS
|
|
21
|
+
def uplink_analysis(test, pkts, received_pkts, pkt_type):
|
|
22
|
+
if len(received_pkts) == 0:
|
|
23
|
+
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
24
|
+
test.add_phase_reason(pkt_type, "No packets were received!")
|
|
25
|
+
return test, 0
|
|
26
|
+
|
|
27
|
+
_sent_pkts = []
|
|
28
|
+
for pkt in pkts:
|
|
29
|
+
pkt_str = pkt.get_pkt()
|
|
30
|
+
adva_endianness_change = cert_common.change_endianness(pkt_str[:12]) + pkt_str[12:] # Switch to big endian adva
|
|
31
|
+
_sent_pkts.append(adva_endianness_change)
|
|
32
|
+
|
|
33
|
+
sent_df = pd.DataFrame(_sent_pkts, columns=[PACKETS])
|
|
34
|
+
received_df = pd.DataFrame(received_pkts, columns=[PACKETS])
|
|
35
|
+
|
|
36
|
+
merged_df = pd.merge(sent_df, received_df, on=PACKETS, how='inner')
|
|
37
|
+
# Drop duplicates to count unique packets that were received
|
|
38
|
+
merged_df_unique = merged_df.drop_duplicates(subset=[PACKETS])
|
|
39
|
+
pkts_sent_count = len(sent_df)
|
|
40
|
+
pkts_received_count = len(merged_df_unique)
|
|
41
|
+
|
|
42
|
+
# Prints
|
|
43
|
+
print(f'Number of {pkt_type} packets sent: {pkts_sent_count}')
|
|
44
|
+
print(f'Number of {pkt_type} packets received: {pkts_received_count}')
|
|
45
|
+
|
|
46
|
+
# Check for division by zero
|
|
47
|
+
if pkts_sent_count == 0:
|
|
48
|
+
test.set_phase_rc(pkt_type, TEST_FAILED)
|
|
49
|
+
test.add_phase_reason(pkt_type, "No packets were sent!")
|
|
50
|
+
return test, 0
|
|
51
|
+
|
|
52
|
+
percentage_received = round(pkts_received_count * 100 / pkts_sent_count)
|
|
53
|
+
|
|
54
|
+
# PASS/FAIL logic
|
|
55
|
+
if percentage_received < 80:
|
|
56
|
+
test.rc = TEST_FAILED
|
|
57
|
+
test.reason = f"Insufficient amount of {pkt_type} packets were scanned & uploaded by the gateway"
|
|
58
|
+
else:
|
|
59
|
+
test.reason = f'{percentage_received}% of {pkt_type} packets received'
|
|
60
|
+
|
|
61
|
+
return test
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def geolocation(test, all_messages_in_test):
|
|
65
|
+
phase_run_print(GEOLOCATION)
|
|
66
|
+
locations_list = []
|
|
67
|
+
locations_df = pd.DataFrame()
|
|
68
|
+
for message in all_messages_in_test:
|
|
69
|
+
message = message.body_ex
|
|
70
|
+
timestamp = message[TIMESTAMP]
|
|
71
|
+
if LOCATION in message.keys():
|
|
72
|
+
loc = message[LOCATION]
|
|
73
|
+
loc.update({TIMESTAMP: timestamp})
|
|
74
|
+
locations_list.append(loc)
|
|
75
|
+
num_unique_locs = 0
|
|
76
|
+
if test.get_phase_rc(GEOLOCATION) == TEST_SKIPPED:
|
|
77
|
+
pass
|
|
78
|
+
elif len(locations_list) == 0:
|
|
79
|
+
test.set_phase_rc(GEOLOCATION, TEST_FAILED)
|
|
80
|
+
test.add_phase_reason(GEOLOCATION, 'No coordinates were uploaded')
|
|
81
|
+
else:
|
|
82
|
+
test.set_phase_rc(GEOLOCATION, TEST_PASSED)
|
|
83
|
+
locations_df = pd.DataFrame(locations_list)
|
|
84
|
+
num_unique_locs = locations_df[['lat', 'lng']].drop_duplicates().shape[0]
|
|
85
|
+
print(f'Number of unique locations received: {num_unique_locs}')
|
|
86
|
+
|
|
87
|
+
# Export all stage data
|
|
88
|
+
csv_path = os.path.join(ARTIFACTS_DIR, test.dir, f'uplink_{GEOLOCATION}.csv')
|
|
89
|
+
locations_df.to_csv(csv_path)
|
|
90
|
+
print(f'\nLocations data saved - {csv_path}')
|
|
91
|
+
field_functionality_pass_fail_print(test.get_phase_by_name(GEOLOCATION), GEOLOCATION)
|
|
92
|
+
|
|
93
|
+
return test
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def run(test):
|
|
97
|
+
test = cert_common.test_prolog(test)
|
|
98
|
+
if test.rc == TEST_FAILED:
|
|
99
|
+
return cert_common.test_epilog(test)
|
|
100
|
+
|
|
101
|
+
dut_mqttc = test.get_mqttc_by_target(DUT)
|
|
102
|
+
all_data_messages_in_test = []
|
|
103
|
+
all_data_pkts = []
|
|
104
|
+
for param in test.params:
|
|
105
|
+
phase_run_print(f"Tested packet type = {param}")
|
|
106
|
+
dut_mqttc.flush_pkts()
|
|
107
|
+
# generate pkts and send them using data simulator
|
|
108
|
+
pkts = []
|
|
109
|
+
bridge_ids = []
|
|
110
|
+
if param.value == PIXELS_PKT:
|
|
111
|
+
pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
|
|
112
|
+
pkt_type=PIXELS_PKT, indicator=UPLINK_TEST_INDICATOR)
|
|
113
|
+
elif param.value == MGMT_PKT:
|
|
114
|
+
pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
|
|
115
|
+
pkt_type=MGMT_PKT, indicator=UPLINK_TEST_INDICATOR)
|
|
116
|
+
# Generate both sensor data and side info sensor packets
|
|
117
|
+
elif param.value == SENSOR_PKT:
|
|
118
|
+
sensor_pkts, bridge_ids = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
|
|
119
|
+
pkt_type=SENSOR_PKT, indicator=UPLINK_TEST_INDICATOR)
|
|
120
|
+
si_pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
|
|
121
|
+
brgs_list=bridge_ids, pkt_type=SIDE_INFO_SENSOR_PKT, indicator=UPLINK_TEST_INDICATOR)
|
|
122
|
+
pkts = sensor_pkts + si_pkts
|
|
123
|
+
else:
|
|
124
|
+
test.rc = TEST_FAILED
|
|
125
|
+
test.reason = "Invalid test parameter!"
|
|
126
|
+
break
|
|
127
|
+
|
|
128
|
+
pixel_sim_thread = cert_data_sim.GenericSimThread(test=test, pkts=pkts, send_single_cycle=True)
|
|
129
|
+
pixel_sim_thread.start()
|
|
130
|
+
|
|
131
|
+
mqtt_scan_wait(test, 10 + test.dut.upload_wait_time)
|
|
132
|
+
cert_mqtt.dump_pkts(test, log=param.name)
|
|
133
|
+
all_data_messages_in_test.extend(dut_mqttc._userdata[PKTS].data)
|
|
134
|
+
all_data_pkts.extend(cert_mqtt.get_all_data_pkts(dut_mqttc))
|
|
135
|
+
recieved_pkts = cert_mqtt.get_all_data_pkts(dut_mqttc, indicator=UPLINK_TEST_INDICATOR)
|
|
136
|
+
|
|
137
|
+
test = uplink_analysis(test, pkts, [p[ALIAS_BRIDGE_ID] + p[PAYLOAD] for p in recieved_pkts], param.name)
|
|
138
|
+
|
|
139
|
+
cert_mqtt.generate_log_file(test, param.name)
|
|
140
|
+
field_functionality_pass_fail_print(test, 'pkt_type', value=param.name)
|
|
141
|
+
test.set_phase_rc(param.name, test.rc)
|
|
142
|
+
test.add_phase_reason(param.name, test.reason)
|
|
143
|
+
if test.rc == TEST_FAILED:
|
|
144
|
+
if test.exit_on_param_failure:
|
|
145
|
+
break # break the whole for loop and keep the test as failed
|
|
146
|
+
test.reset_result() # reset result and continue to next param
|
|
147
|
+
|
|
148
|
+
# Other Validations
|
|
149
|
+
# Api Validation
|
|
150
|
+
if not test.dut.protobuf:
|
|
151
|
+
test = api_validation(test)
|
|
152
|
+
test = cert_common.wiliot_pkts_validation(test, all_data_messages_in_test, all_data_pkts)
|
|
153
|
+
|
|
154
|
+
# Geolocation phase
|
|
155
|
+
if len(all_data_messages_in_test) == 0:
|
|
156
|
+
test.set_phase_rc(param.name, TEST_FAILED)
|
|
157
|
+
test.add_phase_reason(param.name, "No messages were received!")
|
|
158
|
+
return cert_common.test_epilog(test)
|
|
159
|
+
test = geolocation(test, all_data_messages_in_test)
|
|
160
|
+
|
|
161
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
from certificate.cert_prints import *
|
|
2
|
+
from certificate.cert_defines import *
|
|
3
|
+
from certificate.wlt_types import *
|
|
4
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
5
|
+
import certificate.cert_common as cert_common
|
|
6
|
+
import certificate.cert_config as cert_config
|
|
7
|
+
import certificate.cert_data_sim as cert_data_sim
|
|
8
|
+
|
|
9
|
+
DEFAULT_NUM_OF_PIXELS = 300
|
|
10
|
+
DEFAULT_DUPLICATES = 4
|
|
11
|
+
DEFAULT_DELAY = 0
|
|
12
|
+
HIGH_PACER_VALUE = 300
|
|
13
|
+
LOW_PACER_VALUE = 15
|
|
14
|
+
TAGS_CTR_UNDER_THRESHOLD = 0.9
|
|
15
|
+
TAGS_CTR_OVER_THRESHOLD = 1.1
|
|
16
|
+
TIME_OFFSET = 15
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_hb_pkt(test):
|
|
20
|
+
test.get_mqttc_by_target(DUT).flush_pkts()
|
|
21
|
+
cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
|
|
22
|
+
test, hb_pkts = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
23
|
+
tags_ctr = hb_pkts[-1][MGMT_PKT].pkt.tags_ctr if hb_pkts else 0
|
|
24
|
+
return test, tags_ctr
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def wait_in_reference_to_start_time(start_time, wait_time):
|
|
28
|
+
print(f"\nWaiting for {(wait_time - (time.time() - start_time)):.1f} seconds...")
|
|
29
|
+
while (time.time() - start_time) < wait_time:
|
|
30
|
+
print_update_wait()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def wait_for_zero_pixels(test, wait_time=60):
|
|
34
|
+
for i in range(int(wait_time / 10)):
|
|
35
|
+
print(f"\nWaiting {wait_time - (i * 10)} more seconds for pixels table to clear")
|
|
36
|
+
wait_in_reference_to_start_time(time.time(), 10)
|
|
37
|
+
test, tags_ctr = get_hb_pkt(test)
|
|
38
|
+
# tags_ctr will be 0 if the tags table cleared OR if no hb was received - return in both cases
|
|
39
|
+
if tags_ctr > 0:
|
|
40
|
+
print(f"\nPixels count: {tags_ctr}")
|
|
41
|
+
continue
|
|
42
|
+
return test, tags_ctr
|
|
43
|
+
test.rc = TEST_FAILED
|
|
44
|
+
test.add_reason("Floor pixel count value is not zero, make sure there are no pixels (or other energizing devices) around!")
|
|
45
|
+
return test, tags_ctr
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def aging_analysis(test, datapath_module, pacer_interval, num_of_sim_tags):
|
|
49
|
+
# Get tags counter floor
|
|
50
|
+
test, first_floor_tags_ctr = get_hb_pkt(test)
|
|
51
|
+
if test.sterile_run and first_floor_tags_ctr > 0:
|
|
52
|
+
test, first_floor_tags_ctr = wait_for_zero_pixels(test)
|
|
53
|
+
if test.rc == TEST_FAILED:
|
|
54
|
+
return test
|
|
55
|
+
utPrint(f"\nPhase start pixels count: {first_floor_tags_ctr}\n", "BLUE")
|
|
56
|
+
# Configure bridge pacer interval
|
|
57
|
+
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
|
|
58
|
+
if test.rc == TEST_FAILED:
|
|
59
|
+
return test
|
|
60
|
+
# Simualtor pixel packets generation
|
|
61
|
+
cycle_time = DEFAULT_DUPLICATES * (cert_data_sim.PIXEL_SIM_MIN_CYCLE / 1000) * num_of_sim_tags
|
|
62
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_sim_tags, duplicates=DEFAULT_DUPLICATES,
|
|
63
|
+
delay=DEFAULT_DELAY, pkt_types=[0], pixels_type=GEN2)
|
|
64
|
+
sending_time = cycle_time # Send one cycle of pixel pkts
|
|
65
|
+
print(f"Simulator starts sending pixel packets for {sending_time} sec")
|
|
66
|
+
pixel_sim_thread.start()
|
|
67
|
+
start_time = time.time()
|
|
68
|
+
wait_in_reference_to_start_time(start_time, wait_time=sending_time)
|
|
69
|
+
pixel_sim_thread.stop()
|
|
70
|
+
print("\nSimulator stopped sending pixel packets\n")
|
|
71
|
+
print(f"\nWaiting for a {TIME_OFFSET} seconds time offset\n")
|
|
72
|
+
time.sleep(TIME_OFFSET)
|
|
73
|
+
# Get tags counter peak
|
|
74
|
+
test, first_peak_tags_ctr = get_hb_pkt(test)
|
|
75
|
+
if test.rc == TEST_FAILED:
|
|
76
|
+
return test
|
|
77
|
+
utPrint(f"\nEnd of pixel simulation pixels count: {first_peak_tags_ctr}\n", "BLUE")
|
|
78
|
+
if first_peak_tags_ctr - first_floor_tags_ctr < TAGS_CTR_UNDER_THRESHOLD * DEFAULT_NUM_OF_PIXELS:
|
|
79
|
+
test.rc = TEST_FAILED
|
|
80
|
+
test.add_reason("Didn't count sufficient amount of pixels.\n"
|
|
81
|
+
f"tags_ctr value: {first_peak_tags_ctr}\nNumber of simulated pixels: {DEFAULT_NUM_OF_PIXELS}")
|
|
82
|
+
return test
|
|
83
|
+
|
|
84
|
+
# Waiting the aging time
|
|
85
|
+
# Throuout the aging time until deletion starts we expect to get the tags_ctr equal to the number of pixels
|
|
86
|
+
aging_time = max(60, pacer_interval)
|
|
87
|
+
print(f"Waiting the aging time of {aging_time} seconds")
|
|
88
|
+
|
|
89
|
+
# (sending_time - cycle_time + aging_time) is the expected deletion time of the first simulated pixel
|
|
90
|
+
wait_in_reference_to_start_time(start_time, wait_time=(sending_time - cycle_time + aging_time) - TIME_OFFSET)
|
|
91
|
+
test, second_peak_tags_ctr = get_hb_pkt(test)
|
|
92
|
+
if test.rc == TEST_FAILED:
|
|
93
|
+
return test
|
|
94
|
+
utPrint(f"\nBefore deletion start pixels count: {second_peak_tags_ctr}\n", "BLUE")
|
|
95
|
+
if second_peak_tags_ctr < TAGS_CTR_UNDER_THRESHOLD * first_peak_tags_ctr:
|
|
96
|
+
test.rc = TEST_FAILED
|
|
97
|
+
test.add_reason("Pixel count is lower than expected. Looks like aging time is too short.\n"
|
|
98
|
+
f"Found {second_peak_tags_ctr} tags in hb ctr, Previously got {first_peak_tags_ctr},\n"
|
|
99
|
+
f"only {(100 * second_peak_tags_ctr / first_peak_tags_ctr):.1f}% of expected\n")
|
|
100
|
+
return test
|
|
101
|
+
|
|
102
|
+
# (sending_time + aging_time) is the expected deletion time of all simulated pixels
|
|
103
|
+
wait_in_reference_to_start_time(start_time, wait_time=(sending_time + aging_time) + TIME_OFFSET)
|
|
104
|
+
test, second_floor_tags_ctr = get_hb_pkt(test)
|
|
105
|
+
if test.rc == TEST_FAILED:
|
|
106
|
+
return test
|
|
107
|
+
utPrint(f"\nEnd of aging time pixels count: {second_floor_tags_ctr}\n", "BLUE")
|
|
108
|
+
if ((test.sterile_run and second_floor_tags_ctr != 0) or
|
|
109
|
+
(not test.sterile_run and second_floor_tags_ctr > TAGS_CTR_OVER_THRESHOLD * first_floor_tags_ctr)):
|
|
110
|
+
test.rc = TEST_FAILED
|
|
111
|
+
test.add_reason("Pixel count is higher than expected. Looks like aging time is too long.\n"
|
|
112
|
+
f"tags_ctr value: {second_peak_tags_ctr}\nFloor number of pixels: {second_floor_tags_ctr}")
|
|
113
|
+
return test
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def run(test):
|
|
117
|
+
# Test prolog
|
|
118
|
+
datapath_module = test.active_brg.datapath
|
|
119
|
+
test = cert_common.test_prolog(test)
|
|
120
|
+
if test.rc == TEST_FAILED:
|
|
121
|
+
return cert_common.test_epilog(test)
|
|
122
|
+
|
|
123
|
+
AGING_TEST_MAP = {"low_pacer": LOW_PACER_VALUE, "high_pacer": HIGH_PACER_VALUE}
|
|
124
|
+
|
|
125
|
+
for param in test.params:
|
|
126
|
+
phase_run_print(param.name)
|
|
127
|
+
test = aging_analysis(test, datapath_module, pacer_interval=AGING_TEST_MAP[param.value],
|
|
128
|
+
num_of_sim_tags=DEFAULT_NUM_OF_PIXELS)
|
|
129
|
+
cert_mqtt.generate_log_file(test, param.name)
|
|
130
|
+
field_functionality_pass_fail_print(test, param.name)
|
|
131
|
+
test.set_phase_rc(param.name, test.rc)
|
|
132
|
+
test.add_phase_reason(param.name, test.reason)
|
|
133
|
+
if test.rc == TEST_FAILED:
|
|
134
|
+
if test.exit_on_param_failure:
|
|
135
|
+
break # break the whole for loop and keep the test as failed
|
|
136
|
+
test.reset_result() # reset result and continue to next param
|
|
137
|
+
|
|
138
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Event Test BLE 5",
|
|
3
|
+
"module": "Datapath",
|
|
4
|
+
"purpose": "Test pacing disable (later dynamic pacing)",
|
|
5
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"for each supported value - Event Window configuration, Generate pixels packets & scan for packets in the bridge & Compare pacer interval mean per pixel to the simulated tag's pacing.",
|
|
9
|
+
"Test epilog and revert to defaults"],
|
|
10
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the simulated tag's pacing.",
|
|
11
|
+
"mandatory": 0,
|
|
12
|
+
"multiBridgeTest": 0,
|
|
13
|
+
"gwOnlyTest": 0,
|
|
14
|
+
"dataSimOnlyTest": 1,
|
|
15
|
+
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "new_tag_event_hours", "temp_event", "tx_rate_event"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
from certificate.cert_prints import *
|
|
2
|
+
from certificate.cert_defines import *
|
|
3
|
+
from certificate.wlt_types import *
|
|
4
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
5
|
+
import certificate.cert_common as cert_common
|
|
6
|
+
import certificate.cert_config as cert_config
|
|
7
|
+
|
|
8
|
+
NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
|
|
9
|
+
TAG_EVENT_SCAN_TIME = 60 # in seconds
|
|
10
|
+
NEW_TAG_HOURS_EVENT_SCAN_TIME = 62 * 60 # 62 minutes
|
|
11
|
+
RSSI_MOVEMENT_THRESHOLD = 15
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_new_tag_event_hours(test, phase, datapath_module):
|
|
15
|
+
values = [ag.EVENT_TIME_UNIT_HOURS, TEST_EVENT_WINDOW_HR_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
16
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_HOURS_EVENT_SCAN_TIME,
|
|
17
|
+
ag.EVENT_TIME_UNIT_HOURS, ble5_test=True,
|
|
18
|
+
pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_new_tag_event_minutes(test, phase, datapath_module):
|
|
22
|
+
values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
23
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME,
|
|
24
|
+
ag.EVENT_TIME_UNIT_MINUTES, ble5_test=True,
|
|
25
|
+
pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# In seconds phase we also test the dynamic pacer interval
|
|
29
|
+
def test_new_tag_event_seconds(test, phase, datapath_module):
|
|
30
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_EVENT_WINDOW_SEC_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG,
|
|
31
|
+
DATA_SIM_EVENT_PACER_INTERVAL_TESTING]
|
|
32
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME,
|
|
33
|
+
ag.EVENT_TIME_UNIT_SECONDS, ble5_test=True,
|
|
34
|
+
pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_temp_event(test, phase, datapath_module):
|
|
38
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_TEMP_CHANGE, 0]
|
|
39
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
|
|
40
|
+
ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def test_tx_rate_event(test, phase, datapath_module):
|
|
44
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_TX_RATE_CHANGE, 0]
|
|
45
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
|
|
46
|
+
ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_rssi_event(test, phase, datapath_module):
|
|
50
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_250K, ag.EVENT_TRIGGER_RSSI_CHANGE, 0,
|
|
51
|
+
RSSI_MOVEMENT_THRESHOLD]
|
|
52
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
|
|
53
|
+
ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
|
|
57
|
+
"new_tag_event_minutes": test_new_tag_event_minutes, "new_tag_event_hours": test_new_tag_event_hours,
|
|
58
|
+
"temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def run(test):
|
|
62
|
+
# Test prolog
|
|
63
|
+
test = cert_common.test_prolog(test)
|
|
64
|
+
if test.rc == TEST_FAILED:
|
|
65
|
+
return cert_common.test_epilog(test)
|
|
66
|
+
|
|
67
|
+
for param in test.params:
|
|
68
|
+
phase_run_print(param.name)
|
|
69
|
+
test = EVENT_TEST_MAP[param.value](test, param.name, test.active_brg.datapath)
|
|
70
|
+
cert_mqtt.generate_log_file(test, param.name)
|
|
71
|
+
field_functionality_pass_fail_print(test, param.name)
|
|
72
|
+
test.set_phase_rc(param.name, test.rc)
|
|
73
|
+
test.add_phase_reason(param.name, test.reason)
|
|
74
|
+
if test.rc == TEST_FAILED:
|
|
75
|
+
if test.exit_on_param_failure:
|
|
76
|
+
break # break the whole for loop and keep the test as failed
|
|
77
|
+
else:
|
|
78
|
+
test.reset_result() # reset result and continue to next param
|
|
79
|
+
continue
|
|
80
|
+
|
|
81
|
+
# Reset to defaults after every phase (don't fail the phase on that)
|
|
82
|
+
test = cert_config.config_brg_defaults(test, modules=[test.active_brg.datapath], ble5=True)[0]
|
|
83
|
+
print_update_wait(2 * BLE5_MAX_DURATION_SEC)
|
|
84
|
+
if test.rc == TEST_FAILED:
|
|
85
|
+
test.add_reason("Failed to restore brg to defaults")
|
|
86
|
+
|
|
87
|
+
if test.rc == TEST_FAILED:
|
|
88
|
+
test.set_phase_rc(param.name, test.rc)
|
|
89
|
+
test.add_phase_reason(param.name, test.reason)
|
|
90
|
+
if test.exit_on_param_failure:
|
|
91
|
+
break
|
|
92
|
+
else:
|
|
93
|
+
test.reset_result()
|
|
94
|
+
|
|
95
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[test.active_brg.datapath], ble5=True)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Event Test",
|
|
3
|
+
"module": "Datapath",
|
|
4
|
+
"purpose": "Test pacing disable for tags that had location events",
|
|
5
|
+
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog",
|
|
8
|
+
"for each supported value - Event Window configuration, Generate pixels packets & scan for packets in the bridge & Compare pacer interval mean per pixel to the simulated tag's pacing.",
|
|
9
|
+
"Test epilog and revert to defaults"],
|
|
10
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the simulated tag's pacing.",
|
|
11
|
+
"mandatory": 0,
|
|
12
|
+
"multiBridgeTest": 0,
|
|
13
|
+
"gwOnlyTest": 0,
|
|
14
|
+
"dataSimOnlyTest": 1,
|
|
15
|
+
"allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "new_tag_event_hours", "temp_event", "tx_rate_event"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from certificate.cert_prints import *
|
|
2
|
+
from certificate.cert_defines import *
|
|
3
|
+
from certificate.wlt_types import *
|
|
4
|
+
import certificate.cert_mqtt as cert_mqtt
|
|
5
|
+
import certificate.cert_common as cert_common
|
|
6
|
+
import certificate.cert_config as cert_config
|
|
7
|
+
|
|
8
|
+
NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
|
|
9
|
+
TAG_EVENT_SCAN_TIME = 60 # in seconds
|
|
10
|
+
NEW_TAG_HOURS_EVENT_SCAN_TIME = 62 * 60 # 62 minutes
|
|
11
|
+
RSSI_MOVEMENT_THRESHOLD = 15
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_new_tag_event_hours(test, phase, datapath_module):
|
|
15
|
+
values = [ag.EVENT_TIME_UNIT_HOURS, TEST_EVENT_WINDOW_HR_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
16
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_HOURS_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_HOURS)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def test_new_tag_event_minutes(test, phase, datapath_module):
|
|
20
|
+
values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG, 0]
|
|
21
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_MINUTES)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# In seconds phase we also test the dynamic pacer interval
|
|
25
|
+
def test_new_tag_event_seconds(test, phase, datapath_module):
|
|
26
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_EVENT_WINDOW_SEC_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG,
|
|
27
|
+
DATA_SIM_EVENT_PACER_INTERVAL_TESTING]
|
|
28
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_temp_event(test, phase, datapath_module):
|
|
32
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_TEMP_CHANGE, 0]
|
|
33
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_tx_rate_event(test, phase, datapath_module):
|
|
37
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_TX_RATE_CHANGE, 0]
|
|
38
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def test_rssi_event(test, phase, datapath_module):
|
|
42
|
+
values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_RSSI_CHANGE, 0,
|
|
43
|
+
RSSI_MOVEMENT_THRESHOLD]
|
|
44
|
+
return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
|
|
48
|
+
"new_tag_event_minutes": test_new_tag_event_minutes, "new_tag_event_hours": test_new_tag_event_hours,
|
|
49
|
+
"temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def run(test):
|
|
53
|
+
# Test prolog
|
|
54
|
+
test = cert_common.test_prolog(test)
|
|
55
|
+
if test.rc == TEST_FAILED:
|
|
56
|
+
return cert_common.test_epilog(test)
|
|
57
|
+
|
|
58
|
+
for param in test.params:
|
|
59
|
+
phase_run_print(param.name)
|
|
60
|
+
test = EVENT_TEST_MAP[param.value](test, param.name, test.active_brg.datapath)
|
|
61
|
+
cert_mqtt.generate_log_file(test, param.name)
|
|
62
|
+
field_functionality_pass_fail_print(test, param.name)
|
|
63
|
+
test.set_phase_rc(param.name, test.rc)
|
|
64
|
+
test.add_phase_reason(param.name, test.reason)
|
|
65
|
+
if test.rc == TEST_FAILED:
|
|
66
|
+
if test.exit_on_param_failure:
|
|
67
|
+
break # break the whole for loop and keep the test as failed
|
|
68
|
+
else:
|
|
69
|
+
test.reset_result() # reset result and continue to next param
|
|
70
|
+
continue
|
|
71
|
+
|
|
72
|
+
# Reset to defaults after every phase (don't fail the phase on that)
|
|
73
|
+
test = cert_config.config_brg_defaults(test, modules=[test.active_brg.datapath])[0]
|
|
74
|
+
if test.rc == TEST_FAILED:
|
|
75
|
+
test.add_reason("Failed to restore brg to defaults")
|
|
76
|
+
|
|
77
|
+
if test.rc == TEST_FAILED:
|
|
78
|
+
test.set_phase_rc(param.name, test.rc)
|
|
79
|
+
test.add_phase_reason(param.name, test.reason)
|
|
80
|
+
if test.exit_on_param_failure:
|
|
81
|
+
break
|
|
82
|
+
else:
|
|
83
|
+
test.reset_result()
|
|
84
|
+
|
|
85
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[test.active_brg.datapath])
|