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
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
from brg_certificate.cert_prints import *
|
|
2
|
-
from brg_certificate.cert_defines import *
|
|
3
|
-
from brg_certificate.wlt_types import *
|
|
4
|
-
import brg_certificate.cert_common as cert_common
|
|
5
|
-
import brg_certificate.cert_config as cert_config
|
|
6
|
-
import random
|
|
7
|
-
|
|
8
|
-
BATTERY_SENSOR_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_MINEW_DUAL_BAND_V0, ag.BOARD_TYPE_ERM_V0,
|
|
9
|
-
ag.BOARD_TYPE_ERM_V1, ag.BOARD_TYPE_KOAMTAC_V0]
|
|
10
|
-
POF_NOT_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_FANSTEL_WIFI_V0, ag.BOARD_TYPE_FANSTEL_LAN_V0]
|
|
11
|
-
|
|
12
|
-
# Non Default defines
|
|
13
|
-
BRG_NON_DEFAULT_DUTY_CYCLE = 15
|
|
14
|
-
BRG_NON_DEFAULT_OP_2_4 = 6
|
|
15
|
-
BRG_NON_DEFAULT_EP_2_4 = 1
|
|
16
|
-
BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_2_4 = 100
|
|
17
|
-
BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_2_4 = 3
|
|
18
|
-
BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_SUB1G = 100
|
|
19
|
-
BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_SUB1G = 3
|
|
20
|
-
BRG_NON_DEFAULT_OUTPUT_POWER_SUB1G = 26
|
|
21
|
-
BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN = 0
|
|
22
|
-
BRG_NON_DEFAULT_TX_REPETITION = 2
|
|
23
|
-
BRG_NON_DEFAULT_PACER_INTERVAL = 20
|
|
24
|
-
BRG_NON_DEFAULT_RSSI_THRESHOLD = -80
|
|
25
|
-
BRG_NON_DEFAULT_CALIB_OUTPUT_POWER = 8
|
|
26
|
-
BRG_NON_DEFAULT_PKT_FILTER = 17
|
|
27
|
-
BRG_NON_DEFAULT_CALIB_PATTERN = 2
|
|
28
|
-
BRG_NON_DEFAULT_CALIB_INTERVAL = 15
|
|
29
|
-
|
|
30
|
-
LIS2DW12_NON_DEFAULT_STATE_THRESHOLD = 620
|
|
31
|
-
LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION = 120
|
|
32
|
-
LIS2DW12_NON_DEFAULT_SLEEP_DURATION = 35
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def get_brg_non_default_module_pkt(test, module):
|
|
36
|
-
if 'Energy2400' in module.__name__:
|
|
37
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.energy2400,
|
|
38
|
-
duty_cycle=BRG_NON_DEFAULT_DUTY_CYCLE,
|
|
39
|
-
output_power=BRG_NON_DEFAULT_OP_2_4, pattern=BRG_NON_DEFAULT_EP_2_4,
|
|
40
|
-
signal_indicator_cycle=BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_2_4,
|
|
41
|
-
signal_indicator_rep=BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_2_4)
|
|
42
|
-
elif 'EnergySub1G' in module.__name__:
|
|
43
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.energy_sub1g,
|
|
44
|
-
duty_cycle=BRG_NON_DEFAULT_DUTY_CYCLE,
|
|
45
|
-
signal_indicator_cycle=BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_SUB1G,
|
|
46
|
-
signal_indicator_rep=BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_SUB1G)
|
|
47
|
-
elif 'PwrMgmt' in module.__name__:
|
|
48
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.pwr_mgmt,
|
|
49
|
-
dynamic_keep_alive_scan=BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN)
|
|
50
|
-
elif 'Custom' in module.__name__:
|
|
51
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.custom,
|
|
52
|
-
motion_sensitivity_threshold=LIS2DW12_NON_DEFAULT_STATE_THRESHOLD,
|
|
53
|
-
s2d_transition_time=LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION,
|
|
54
|
-
d2s_transition_time=LIS2DW12_NON_DEFAULT_SLEEP_DURATION)
|
|
55
|
-
elif 'Datapath' in module.__name__:
|
|
56
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.datapath,
|
|
57
|
-
tx_repetition=BRG_NON_DEFAULT_TX_REPETITION,
|
|
58
|
-
pkt_filter=BRG_NON_DEFAULT_PKT_FILTER,
|
|
59
|
-
output_power=BRG_NON_DEFAULT_OP_2_4,
|
|
60
|
-
pattern=ag.DATAPATH_PATTERN_EU_PATTERN,
|
|
61
|
-
pacer_interval=BRG_NON_DEFAULT_PACER_INTERVAL,
|
|
62
|
-
rssi_threshold=BRG_NON_DEFAULT_RSSI_THRESHOLD)
|
|
63
|
-
elif 'Calibration' in module.__name__:
|
|
64
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.calibration,
|
|
65
|
-
output_power=BRG_NON_DEFAULT_CALIB_OUTPUT_POWER,
|
|
66
|
-
interval=BRG_NON_DEFAULT_CALIB_INTERVAL,
|
|
67
|
-
pattern=BRG_NON_DEFAULT_CALIB_PATTERN)
|
|
68
|
-
elif 'ExtSensors' in module.__name__:
|
|
69
|
-
return cert_config.get_default_brg_pkt(test, pkt_type=test.active_brg.sensors,
|
|
70
|
-
sensor0=ag.EXTERNAL_SENSORS_MINEWS1,
|
|
71
|
-
sensor1=ag.EXTERNAL_SENSORS_VOLTAIC_BATT_LEVEL_DONGLE,
|
|
72
|
-
rssi_threshold=BRG_NON_DEFAULT_RSSI_THRESHOLD,
|
|
73
|
-
sub1g_rssi_threshold=BRG_NON_DEFAULT_RSSI_THRESHOLD)
|
|
74
|
-
return None
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def brg_non_default_modules_cfg(test):
|
|
78
|
-
for module in test.active_brg.modules:
|
|
79
|
-
cfg_pkt = get_brg_non_default_module_pkt(test, module)
|
|
80
|
-
if cfg_pkt:
|
|
81
|
-
utPrint(f"Configuring {module.__name__} non-default cfg", "BLUE")
|
|
82
|
-
test = cert_config.brg_configure(test=test, cfg_pkt=cfg_pkt)[0]
|
|
83
|
-
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
84
|
-
test.add_reason(f"{module.__name__} non-default cfg pkt was not found after {DEFAULT_BRG_FIELD_UPDATE_TIMEOUT} sec!")
|
|
85
|
-
return test
|
|
86
|
-
return test
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
def search_action_ack(test, action_id, **kwargs):
|
|
90
|
-
test, mgmt_pkts = cert_common.scan_for_mgmt_pkts(test,
|
|
91
|
-
mgmt_type=[eval_pkt(f'{ag.ACTIONS_DICT[action_id]}{test.active_brg.api_version}')])
|
|
92
|
-
if test.rc == TEST_FAILED:
|
|
93
|
-
return test
|
|
94
|
-
print("\nReceived ACK pkts:")
|
|
95
|
-
for p in mgmt_pkts:
|
|
96
|
-
print(p[MGMT_PKT].pkt)
|
|
97
|
-
pkt = cert_config.get_default_brg_pkt(test,
|
|
98
|
-
pkt_type=eval_pkt(f'{ag.ACTIONS_DICT[action_id]}{test.active_brg.api_version}'),
|
|
99
|
-
**kwargs).pkt
|
|
100
|
-
if p[MGMT_PKT].pkt == pkt:
|
|
101
|
-
utPrint("Received ACK for action", "GREEN")
|
|
102
|
-
return test
|
|
103
|
-
test.rc = TEST_FAILED
|
|
104
|
-
test.add_reason(f"Didn't find action ACK for action id {action_id} {ag.ACTIONS_DICT[action_id]}")
|
|
105
|
-
return test
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# modules should receive a list of module names to look for - identical to their actual classes' names!
|
|
109
|
-
def scan_for_modules(test, modules=[]):
|
|
110
|
-
modules = test.active_brg.modules if not modules else modules
|
|
111
|
-
found = {module.__name__: False for module in modules}
|
|
112
|
-
start_time = datetime.datetime.now()
|
|
113
|
-
|
|
114
|
-
# Search for packets
|
|
115
|
-
while not all(found.values()):
|
|
116
|
-
for module in found:
|
|
117
|
-
pkts = cert_mqtt.get_brg2gw_mgmt_pkts(test.mqttc, test, mgmt_types=[eval_pkt(module)])
|
|
118
|
-
if pkts and not found[module]:
|
|
119
|
-
found[module] = True
|
|
120
|
-
print("\nGot {} packet after {} sec!".format(module, (datetime.datetime.now() - start_time).seconds))
|
|
121
|
-
print(pkts[-1][MGMT_PKT].pkt)
|
|
122
|
-
print_update_wait()
|
|
123
|
-
if (datetime.datetime.now() - start_time).seconds > DEFAULT_BRG_FIELD_UPDATE_TIMEOUT:
|
|
124
|
-
test.rc = TEST_FAILED
|
|
125
|
-
err_print = ','.join([module for module, value in found.items() if not value])
|
|
126
|
-
test.add_reason("Didn't receive {} after {} seconds!".format(err_print, DEFAULT_BRG_FIELD_UPDATE_TIMEOUT))
|
|
127
|
-
break
|
|
128
|
-
return test
|
|
129
|
-
|
|
130
|
-
########################################################
|
|
131
|
-
# ACTIONS
|
|
132
|
-
########################################################
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
def test_action_gw_hb(test):
|
|
136
|
-
# Create randomized 13 bytes hex to send as the gw
|
|
137
|
-
randomized_gw = ''.join(f'{b:02X}' for b in bytes([random.randint(0, 255) for _ in range(13)]))
|
|
138
|
-
randomized_gw = hex_str2int(randomized_gw)
|
|
139
|
-
# send action
|
|
140
|
-
cert_config.send_brg_action(test, ag.ACTION_GW_HB, gw_id=randomized_gw)
|
|
141
|
-
# analysis
|
|
142
|
-
gw_hb_pkt = eval_pkt(f'ActionGwHbV{test.active_brg.api_version}')
|
|
143
|
-
test, mgmt_pkts = cert_common.scan_for_mgmt_pkts(test, [gw_hb_pkt])
|
|
144
|
-
if not mgmt_pkts:
|
|
145
|
-
test.add_reason("Didn't find ACTION GW HB ACK pkts")
|
|
146
|
-
test.rc = TEST_FAILED
|
|
147
|
-
else:
|
|
148
|
-
for p in mgmt_pkts:
|
|
149
|
-
if p[MGMT_PKT].pkt.rssi == 0 or randomized_gw != p[MGMT_PKT].pkt.gw_id:
|
|
150
|
-
print(f'''ERROR: PKT RSSI: {p[MGMT_PKT].pkt.rssi}\nGW_ID:{p[MGMT_PKT].pkt.gw_id}\n
|
|
151
|
-
randomized_gw: {randomized_gw}''')
|
|
152
|
-
test.add_reason("GW ID not found OR RSSI is zero on the ACTION GW HB ACK pkt")
|
|
153
|
-
test.rc = TEST_FAILED
|
|
154
|
-
return test
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
def test_action_blink(test):
|
|
158
|
-
# send action
|
|
159
|
-
cert_config.send_brg_action(test, ag.ACTION_BLINK)
|
|
160
|
-
# analysis
|
|
161
|
-
test = search_action_ack(test, ag.ACTION_BLINK)
|
|
162
|
-
return test
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
def test_action_send_hb(test):
|
|
166
|
-
|
|
167
|
-
# send action
|
|
168
|
-
cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
|
|
169
|
-
# analysis
|
|
170
|
-
test, mgmt_pkts = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
171
|
-
if not mgmt_pkts:
|
|
172
|
-
test.add_reason("Didn't find ACTION HB pkt")
|
|
173
|
-
test.rc = TEST_FAILED
|
|
174
|
-
return test
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
def test_action_get_battery_sensor(test):
|
|
178
|
-
if test.active_brg.board_type not in BATTERY_SENSOR_SUPPORTING_BOARD_TYPES:
|
|
179
|
-
test.rc = TEST_SKIPPED
|
|
180
|
-
return test
|
|
181
|
-
# prolog
|
|
182
|
-
functionality_run_print('ACTION_GET_BATTERY_SENSOR')
|
|
183
|
-
# send action
|
|
184
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_BATTERY_SENSOR)
|
|
185
|
-
# analysis
|
|
186
|
-
test = search_action_ack(test, ag.ACTION_GET_BATTERY_SENSOR)
|
|
187
|
-
if test.rc == TEST_FAILED:
|
|
188
|
-
return test
|
|
189
|
-
|
|
190
|
-
start_time = datetime.datetime.now()
|
|
191
|
-
# This timeout is due to queueing si pkt with needed info at the back of the queue
|
|
192
|
-
scan_time = ACTION_SI_PKT_TIMEOUT
|
|
193
|
-
found_packet = False
|
|
194
|
-
while ((datetime.datetime.now() - start_time).seconds <= scan_time):
|
|
195
|
-
custom_pkts = cert_mqtt.get_all_custom_pkts(test)
|
|
196
|
-
for p in custom_pkts:
|
|
197
|
-
if p[SENSOR_UUID] == f"{ag.SENSOR_SERVICE_ID_BATTERY_SENSOR:06X}":
|
|
198
|
-
print_pkt(p)
|
|
199
|
-
found_packet = True
|
|
200
|
-
break
|
|
201
|
-
if found_packet is True:
|
|
202
|
-
break
|
|
203
|
-
print_update_wait()
|
|
204
|
-
if found_packet is False:
|
|
205
|
-
test.rc = TEST_FAILED
|
|
206
|
-
test.add_reason(f"Didn't find battery sensor data packet within {scan_time} seconds")
|
|
207
|
-
return test
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
def test_action_get_pof_data(test):
|
|
211
|
-
if test.active_brg.board_type in POF_NOT_SUPPORTING_BOARD_TYPES:
|
|
212
|
-
test.rc = TEST_SKIPPED
|
|
213
|
-
return test
|
|
214
|
-
# send action
|
|
215
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_POF_DATA)
|
|
216
|
-
# analysis
|
|
217
|
-
test = search_action_ack(test, ag.ACTION_GET_POF_DATA)
|
|
218
|
-
if test.rc == TEST_FAILED:
|
|
219
|
-
return test
|
|
220
|
-
|
|
221
|
-
start_time = datetime.datetime.now()
|
|
222
|
-
# This timeout is due to queueing si pkt with needed info at the back of the queue
|
|
223
|
-
scan_time = ACTION_SI_PKT_TIMEOUT
|
|
224
|
-
found_packet = False
|
|
225
|
-
while ((datetime.datetime.now() - start_time).seconds <= scan_time):
|
|
226
|
-
custom_pkts = cert_mqtt.get_all_custom_pkts(test)
|
|
227
|
-
for p in custom_pkts:
|
|
228
|
-
if p[SENSOR_UUID] == f"{ag.SENSOR_SERVICE_ID_POF_DATA:06X}":
|
|
229
|
-
print_pkt(p)
|
|
230
|
-
found_packet = True
|
|
231
|
-
break
|
|
232
|
-
if found_packet is True:
|
|
233
|
-
break
|
|
234
|
-
print_update_wait()
|
|
235
|
-
if found_packet is False:
|
|
236
|
-
test.rc = TEST_FAILED
|
|
237
|
-
test.add_reason(f"Didn't find pof data packet within {scan_time} seconds")
|
|
238
|
-
return test
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
def test_action_pl_status(test):
|
|
242
|
-
# send action - Set status to 0 only, if pl is set to 1 BRG works differently
|
|
243
|
-
cert_config.send_brg_action(test, ag.ACTION_PL_STATUS, status=0)
|
|
244
|
-
# analysis
|
|
245
|
-
test = search_action_ack(test, ag.ACTION_PL_STATUS, status=0)
|
|
246
|
-
return test
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
def test_action_get_module(test):
|
|
250
|
-
# CHECK ONLY FOR ONE MODULE (ModuleDatapath) #
|
|
251
|
-
# send action
|
|
252
|
-
print("\nCHECK ONLY FOR ModuleDatapath\n")
|
|
253
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_MODULE, datapath=1)
|
|
254
|
-
# analysis
|
|
255
|
-
test = search_action_ack(test, ag.ACTION_GET_MODULE, datapath=1)
|
|
256
|
-
test = scan_for_modules(test, [test.active_brg.datapath])
|
|
257
|
-
if test.rc == TEST_FAILED:
|
|
258
|
-
return test
|
|
259
|
-
|
|
260
|
-
# CHECK FOR ALL MODULES AT ONCE #
|
|
261
|
-
# send action
|
|
262
|
-
print("\nCHECK FOR ALL MODULES AT ONCE\n")
|
|
263
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_MODULE, interface=1, datapath=1, energy2400=1,
|
|
264
|
-
energy_sub1g=1, calibration=1, pwr_mgmt=1, ext_sensors=1, custom=1)
|
|
265
|
-
# analysis
|
|
266
|
-
test = search_action_ack(test, ag.ACTION_GET_MODULE, interface=1, datapath=1, energy2400=1,
|
|
267
|
-
energy_sub1g=1, calibration=1, pwr_mgmt=1, ext_sensors=1, custom=1)
|
|
268
|
-
test = scan_for_modules(test)
|
|
269
|
-
return test
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
def test_action_reboot(test):
|
|
273
|
-
# non-default cfg
|
|
274
|
-
test = brg_non_default_modules_cfg(test)
|
|
275
|
-
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
276
|
-
return cert_common.test_epilog(test, revert_brgs=True)
|
|
277
|
-
# sample non-default cfg_hash
|
|
278
|
-
test, non_default_hash = cert_common.get_cfg_hash(test)
|
|
279
|
-
if test.active_brg.cfg_hash == non_default_hash:
|
|
280
|
-
test.rc = TEST_FAILED
|
|
281
|
-
test.add_reason(f"Config failed default_hash==non_default==0x{non_default_hash:08X}")
|
|
282
|
-
if test.rc == TEST_FAILED:
|
|
283
|
-
return test
|
|
284
|
-
print(f"\nnon_default_hash: 0x{non_default_hash:08X}\n")
|
|
285
|
-
# send action
|
|
286
|
-
cert_config.send_brg_action(test, ag.ACTION_REBOOT)
|
|
287
|
-
# analysis
|
|
288
|
-
test = cert_common.reboot_config_analysis(test, expected_hash=non_default_hash, timeout=40)
|
|
289
|
-
# epilog
|
|
290
|
-
test = cert_config.config_brg_defaults(test)[0]
|
|
291
|
-
return test
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
def test_action_restore_defaults(test):
|
|
295
|
-
# non-default cfg
|
|
296
|
-
test = brg_non_default_modules_cfg(test)
|
|
297
|
-
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
298
|
-
return cert_common.test_epilog(test, revert_brgs=True)
|
|
299
|
-
# sample non-default cfg_hash
|
|
300
|
-
test, non_default_hash = cert_common.get_cfg_hash(test)
|
|
301
|
-
if test.rc == TEST_FAILED:
|
|
302
|
-
# revert to defaults without restore_defaults action if action failed
|
|
303
|
-
test = cert_config.config_brg_defaults(test)[0]
|
|
304
|
-
return test
|
|
305
|
-
# send action
|
|
306
|
-
cert_config.send_brg_action(test, ag.ACTION_RESTORE_DEFAULTS)
|
|
307
|
-
# analysis
|
|
308
|
-
expected_hash = test.active_brg.cfg_hash
|
|
309
|
-
utPrint("Analyzing Restore Defaults", "BLUE")
|
|
310
|
-
# First 30 for wlt app start + 10 sec extra for brg to settle to recieve its get module action
|
|
311
|
-
cert_common.wait_time_n_print(40)
|
|
312
|
-
|
|
313
|
-
start_time = datetime.datetime.now()
|
|
314
|
-
seq_ids = []
|
|
315
|
-
cfg_once = True
|
|
316
|
-
test.mqttc.flush_pkts()
|
|
317
|
-
|
|
318
|
-
utPrint(f"Get Interface Module from BRG {test.active_brg.id_str}")
|
|
319
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_MODULE, interface=1)
|
|
320
|
-
test = search_action_ack(test, ag.ACTION_GET_MODULE, interface=1)
|
|
321
|
-
if test.rc == TEST_FAILED:
|
|
322
|
-
return test
|
|
323
|
-
|
|
324
|
-
while True:
|
|
325
|
-
# scan for ModuleIf pkt of all api versions to support api version change on update
|
|
326
|
-
pkts = cert_mqtt.get_brg2gw_mgmt_pkts(test.mqttc, test, mgmt_types=[eval_pkt(f'ModuleIfV{test.active_brg.api_version}')])
|
|
327
|
-
for p in pkts:
|
|
328
|
-
if (not seq_ids or p[SEQUENCE_ID] not in seq_ids):
|
|
329
|
-
seq_ids.append(p[SEQUENCE_ID])
|
|
330
|
-
interface = p[MGMT_PKT].pkt
|
|
331
|
-
if interface:
|
|
332
|
-
test.active_brg.api_version = interface.api_version
|
|
333
|
-
print(f"\nGot pkt after {(datetime.datetime.now() - start_time).seconds} sec!")
|
|
334
|
-
print(interface)
|
|
335
|
-
received_hash = interface.cfg_hash
|
|
336
|
-
print(f"\nexpected cfg_hash: 0x{expected_hash:08X}\n"
|
|
337
|
-
f"received cfg_hash: 0x{received_hash:08X}\n"
|
|
338
|
-
f"non_default_hash: 0x{non_default_hash:08X}")
|
|
339
|
-
if received_hash == non_default_hash:
|
|
340
|
-
# test.rc = TEST_FAILED
|
|
341
|
-
test.add_reason("received_hash is equal to non_default_hash, ACTION_RESTORE_DEFAULTS was not received by the brg!")
|
|
342
|
-
# return test
|
|
343
|
-
elif received_hash == expected_hash:
|
|
344
|
-
return test
|
|
345
|
-
else:
|
|
346
|
-
# Default SUB1G EP in the BRG is 0 and in the UT is 9
|
|
347
|
-
# in order to allign BRG cfg to the one after ut.py start script
|
|
348
|
-
# we should configure sub1g ep individually once after reboot in case cfg hash dont match
|
|
349
|
-
if ag.MODULE_ENERGY_SUB1G in test.active_brg.sup_caps and cfg_once:
|
|
350
|
-
cfg_once = False
|
|
351
|
-
cfg_pkt = cert_config.get_default_brg_pkt(test,
|
|
352
|
-
test.active_brg.energy_sub1g,
|
|
353
|
-
**{BRG_PATTERN: ag.SUB1G_ENERGY_PATTERN_ISRAEL})
|
|
354
|
-
test = cert_config.brg_configure(test, cfg_pkt=cfg_pkt)[0]
|
|
355
|
-
if test.rc == TEST_FAILED:
|
|
356
|
-
return test
|
|
357
|
-
cert_config.send_brg_action(test, ag.ACTION_GET_MODULE, interface=1)
|
|
358
|
-
print_update_wait()
|
|
359
|
-
|
|
360
|
-
if (datetime.datetime.now() - start_time).seconds > DEFAULT_BRG_FIELD_UPDATE_TIMEOUT:
|
|
361
|
-
test.rc = TEST_FAILED
|
|
362
|
-
test.add_reason(f"Didn't receive expected ModuleIfV{test.active_brg.api_version} pkt "
|
|
363
|
-
f"after {DEFAULT_BRG_FIELD_UPDATE_TIMEOUT} seconds!")
|
|
364
|
-
# revert to defaults without restore_defaults action if action failed
|
|
365
|
-
test = cert_config.config_brg_defaults(test)[0]
|
|
366
|
-
break
|
|
367
|
-
return test
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
ACTIONS_TEST_MAP = {ag.ACTION_GW_HB: test_action_gw_hb, ag.ACTION_BLINK: test_action_blink,
|
|
371
|
-
ag.ACTION_SEND_HB: test_action_send_hb, ag.ACTION_GET_BATTERY_SENSOR: test_action_get_battery_sensor,
|
|
372
|
-
ag.ACTION_GET_POF_DATA: test_action_get_pof_data, ag.ACTION_PL_STATUS: test_action_pl_status,
|
|
373
|
-
ag.ACTION_GET_MODULE: test_action_get_module, ag.ACTION_REBOOT: test_action_reboot,
|
|
374
|
-
ag.ACTION_RESTORE_DEFAULTS: test_action_restore_defaults}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
def run(test):
|
|
378
|
-
test = cert_common.test_prolog(test)
|
|
379
|
-
if test.rc == TEST_FAILED:
|
|
380
|
-
return cert_common.test_epilog(test)
|
|
381
|
-
|
|
382
|
-
for param in test.params:
|
|
383
|
-
# Run action
|
|
384
|
-
functionality_run_print(param.name)
|
|
385
|
-
test = ACTIONS_TEST_MAP[param.value](test)
|
|
386
|
-
# action Epilog
|
|
387
|
-
generate_log_file(test, param.name)
|
|
388
|
-
field_functionality_pass_fail_print(test, param.name)
|
|
389
|
-
test.set_phase_rc(param.name, test.rc)
|
|
390
|
-
test.add_phase_reason(param.name, test.reason)
|
|
391
|
-
if test.rc == TEST_FAILED:
|
|
392
|
-
if test.exit_on_param_failure:
|
|
393
|
-
break # break the whole for loop and keep the test as failed
|
|
394
|
-
test.reset_result() # reset result and continue to next param
|
|
395
|
-
|
|
396
|
-
return cert_common.test_epilog(test)
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Bridge to Bridge OTA BLE5",
|
|
3
|
-
"module": "Edge Management",
|
|
4
|
-
"purpose": "Verify BRG2BRG OTA firmware/bootloader version upgrade functionality using BLE_5.0.",
|
|
5
|
-
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
-
"initialCondition": "1 GW and 2 BRG's (source, destination) from the same type connected to the GW - the source BRG posses the newer firmware/bootloader version, and the destination BRG posses older firmware/bootloader version.",
|
|
7
|
-
"procedure": ["Test prolog",
|
|
8
|
-
"Verify initial conditions - same board type, different firmware/bootloader versions",
|
|
9
|
-
"Determine the source & destination BRG according to version",
|
|
10
|
-
"Configure destination BRG rx channel to BLE_5.0 channel (channel 10)",
|
|
11
|
-
"Send brg2brg ota message to the source BRG - initiate brg2brg ota",
|
|
12
|
-
"Verify destination BRG firmware/bootloader version upgrade through module IF packet",
|
|
13
|
-
"Test epilog"],
|
|
14
|
-
"expectedOutcome": "Destination BRG firmware/bootloader version is upgraded to the source BRG firmware/bootloader version.",
|
|
15
|
-
"mandatory": 0,
|
|
16
|
-
"multiBridgeTest": 1,
|
|
17
|
-
"gwOnlyTest": 0,
|
|
18
|
-
"internalBridge": 0,
|
|
19
|
-
"allSupportedValues": ["BOOTLOADER", "APP"]
|
|
20
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
from brg_certificate.cert_prints import *
|
|
2
|
-
from brg_certificate.cert_defines import *
|
|
3
|
-
from brg_certificate.wlt_types import *
|
|
4
|
-
import brg_certificate.cert_common as cert_common
|
|
5
|
-
import brg_certificate.cert_config as cert_config
|
|
6
|
-
|
|
7
|
-
# Test Description:
|
|
8
|
-
# Requires 1 GW and 2 BRGs where the BRGs aren't of the same FW version.
|
|
9
|
-
# Initiates BRG2BRG OTA - have the bridge with the newer FW version (source) update the bridge with the older
|
|
10
|
-
# FW version (destination). Source bridge will get a gw2brg message initiating the ota process from the firmware
|
|
11
|
-
# code, making the source bridge copy its image to the destination bridge.
|
|
12
|
-
# For a bootloader image OTA, the gw2brg message includes a "bootloader" field and it is updated to True if the OTA
|
|
13
|
-
# required is for bootloader image. The FW and bootloader images can currently only be updated separately.
|
|
14
|
-
|
|
15
|
-
# Test Defines
|
|
16
|
-
VERSIONS_SAME = "Both bridges FW versions are the same!"
|
|
17
|
-
BL_VERSIONS_SAME = "Both bridges Bootloader versions are the same!"
|
|
18
|
-
BOARDS_MISMATCH = "Bridges are of different board types!"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def run(test):
|
|
22
|
-
|
|
23
|
-
# Test initialization
|
|
24
|
-
is_bl_ota = "BOOTLOADER" in test.params[0].name
|
|
25
|
-
|
|
26
|
-
test = cert_common.test_prolog(test)
|
|
27
|
-
# Initialize bridges
|
|
28
|
-
brg0 = test.brg0
|
|
29
|
-
brg1 = test.brg1
|
|
30
|
-
|
|
31
|
-
# Protections from same version & different board types
|
|
32
|
-
if not is_bl_ota and brg0.version == brg1.version:
|
|
33
|
-
utPrint(VERSIONS_SAME, "RED")
|
|
34
|
-
test.add_reason(VERSIONS_SAME)
|
|
35
|
-
test.rc = TEST_FAILED
|
|
36
|
-
if is_bl_ota and brg0.bl_version == brg1.bl_version:
|
|
37
|
-
utPrint(BL_VERSIONS_SAME, "RED")
|
|
38
|
-
test.add_reason(BL_VERSIONS_SAME)
|
|
39
|
-
test.rc = TEST_FAILED
|
|
40
|
-
if brg0.board_type != brg1.board_type:
|
|
41
|
-
utPrint(BOARDS_MISMATCH, "RED")
|
|
42
|
-
test.add_reason(BOARDS_MISMATCH)
|
|
43
|
-
test.rc = TEST_FAILED
|
|
44
|
-
|
|
45
|
-
if test.rc == TEST_FAILED:
|
|
46
|
-
return cert_common.test_epilog(test, revert_brgs=True)
|
|
47
|
-
|
|
48
|
-
# Decide on source and destination bridges
|
|
49
|
-
if is_bl_ota:
|
|
50
|
-
if brg0.bl_version > brg1.bl_version:
|
|
51
|
-
src_brg = brg0
|
|
52
|
-
dest_brg = brg1
|
|
53
|
-
else:
|
|
54
|
-
src_brg = brg1
|
|
55
|
-
dest_brg = brg0
|
|
56
|
-
else:
|
|
57
|
-
if brg0.version > brg1.version:
|
|
58
|
-
src_brg = brg0
|
|
59
|
-
dest_brg = brg1
|
|
60
|
-
else:
|
|
61
|
-
src_brg = brg1
|
|
62
|
-
dest_brg = brg0
|
|
63
|
-
|
|
64
|
-
# BLE5 test - configure the destination brg to rx channel 10
|
|
65
|
-
utPrint(f"Configuring destination BRG {dest_brg.id_str} to RX Channel 10!")
|
|
66
|
-
test.active_brg = dest_brg
|
|
67
|
-
test = cert_config.brg_configure_ble5(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_10_250K],
|
|
68
|
-
module=test.active_brg.datapath)[0]
|
|
69
|
-
test.active_brg = src_brg
|
|
70
|
-
time.sleep(5)
|
|
71
|
-
|
|
72
|
-
desired_version_print = src_brg.bl_version if is_bl_ota else src_brg.version
|
|
73
|
-
older_version_print = dest_brg.bl_version if is_bl_ota else dest_brg.version
|
|
74
|
-
utPrint(f"Source {"bootloader" if is_bl_ota else ""} bridge version: {desired_version_print}. "
|
|
75
|
-
f"Destination bridge {"bootloader" if is_bl_ota else ""} version: {older_version_print}", "BLUE")
|
|
76
|
-
|
|
77
|
-
# Send BRG2BRG_OTA message to source bridge
|
|
78
|
-
functionality_run_print(f"BRG2BRG OTA - Source Bridge MAC: {src_brg.id_str}, Destination Bridge MAC: {dest_brg.id_str}")
|
|
79
|
-
brg2brg_ota_pkt = eval_pkt(f'Brg2BrgOtaV{test.active_brg.api_version}')(src_brg_mac=src_brg.id_int,
|
|
80
|
-
dest_brg_mac=dest_brg.id_int,
|
|
81
|
-
seq_id=test.get_seq_id(),
|
|
82
|
-
bootloader=is_bl_ota)
|
|
83
|
-
brg2brg_ota_pkt_downlink = WltPkt(hdr=ag.Hdr(group_id=ag.GROUP_ID_GW2BRG), pkt=brg2brg_ota_pkt)
|
|
84
|
-
# BRG OTA - Flush pkts ONLY before starting to avoid deletion of needed GW Logs
|
|
85
|
-
test.mqttc.flush_pkts()
|
|
86
|
-
cert_config.gw_downlink(test, raw_tx_data=brg2brg_ota_pkt_downlink.dump())
|
|
87
|
-
|
|
88
|
-
# Get version of the destination bridge
|
|
89
|
-
test.active_brg = dest_brg
|
|
90
|
-
# expected_hash=1 due to different cfgs and versions between builds
|
|
91
|
-
test = cert_common.reboot_config_analysis(test=test, expected_hash=1, ble_version=src_brg.version if not is_bl_ota else None,
|
|
92
|
-
bl_version=src_brg.bl_version if is_bl_ota else None, timeout=VER_UPDATE_TIMEOUT)
|
|
93
|
-
|
|
94
|
-
return cert_common.test_epilog(test)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Bridge to Bridge OTA",
|
|
3
|
-
"module": "Edge Management",
|
|
4
|
-
"purpose": "Verify BRG2BRG OTA firmware/bootloader version upgrade functionality",
|
|
5
|
-
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
-
"initialCondition": "1 GW and 2 BRG's (source, destination) from the same type connected to the GW - the source BRG posses the newer firmware/bootloader version, and the destination BRG posses older firmware/bootloader version.",
|
|
7
|
-
"procedure": ["Test prolog",
|
|
8
|
-
"Verify initial conditions - same board type, different firmware/bootloader versions",
|
|
9
|
-
"Determine the source & destination BRG according to version",
|
|
10
|
-
"Send brg2brg ota message to the source BRG - initiate brg2brg ota",
|
|
11
|
-
"Verify destination BRG firmware/bootloader version upgrade through module IF packet",
|
|
12
|
-
"Test epilog"],
|
|
13
|
-
"expectedOutcome": "Destination BRG firmware/bootloader version is upgraded to the source BRG firmware/bootloader version.",
|
|
14
|
-
"mandatory": 0,
|
|
15
|
-
"multiBridgeTest": 1,
|
|
16
|
-
"gwOnlyTest": 0,
|
|
17
|
-
"internalBridge": 0,
|
|
18
|
-
"allSupportedValues": ["BOOTLOADER", "APP"]
|
|
19
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
from brg_certificate.cert_prints import *
|
|
2
|
-
from brg_certificate.cert_defines import *
|
|
3
|
-
from brg_certificate.wlt_types import *
|
|
4
|
-
import brg_certificate.cert_common as cert_common
|
|
5
|
-
import brg_certificate.cert_config as cert_config
|
|
6
|
-
|
|
7
|
-
# Test Description:
|
|
8
|
-
# Requires 1 GW and 2 BRGs where the BRGs aren't of the same FW version.
|
|
9
|
-
# Initiates BRG2BRG OTA - have the bridge with the newer FW version (source) update the bridge with the older
|
|
10
|
-
# FW version (destination). Source bridge will get a gw2brg message initiating the ota process from the firmware
|
|
11
|
-
# code, making the source bridge copy its image to the destination bridge.
|
|
12
|
-
# For a bootloader image OTA, the gw2brg message includes a "bootloader" field and it is updated to True if the OTA
|
|
13
|
-
# required is for bootloader image. The FW and bootloader images can currently only be updated separately.
|
|
14
|
-
|
|
15
|
-
# Test Defines
|
|
16
|
-
VERSIONS_SAME = "Both bridges FW versions are the same!"
|
|
17
|
-
BL_VERSIONS_SAME = "Both bridges Bootloader versions are the same!"
|
|
18
|
-
BOARDS_MISMATCH = "Bridges are of different board types!"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def run(test):
|
|
22
|
-
|
|
23
|
-
# Test initialization
|
|
24
|
-
is_bl_ota = "BOOTLOADER" in test.params[0].name
|
|
25
|
-
|
|
26
|
-
test = cert_common.test_prolog(test)
|
|
27
|
-
# Initialize bridges
|
|
28
|
-
brg0 = test.brg0
|
|
29
|
-
brg1 = test.brg1
|
|
30
|
-
|
|
31
|
-
# Protections from same version & different board types
|
|
32
|
-
if not is_bl_ota and brg0.version == brg1.version:
|
|
33
|
-
utPrint(VERSIONS_SAME, "RED")
|
|
34
|
-
test.add_reason(VERSIONS_SAME)
|
|
35
|
-
test.rc = TEST_FAILED
|
|
36
|
-
if is_bl_ota and brg0.bl_version == brg1.bl_version:
|
|
37
|
-
utPrint(BL_VERSIONS_SAME, "RED")
|
|
38
|
-
test.add_reason(BL_VERSIONS_SAME)
|
|
39
|
-
test.rc = TEST_FAILED
|
|
40
|
-
if brg0.board_type != brg1.board_type:
|
|
41
|
-
utPrint(BOARDS_MISMATCH, "RED")
|
|
42
|
-
test.add_reason(BOARDS_MISMATCH)
|
|
43
|
-
test.rc = TEST_FAILED
|
|
44
|
-
|
|
45
|
-
if test.rc == TEST_FAILED:
|
|
46
|
-
return cert_common.test_epilog(test, revert_brgs=True)
|
|
47
|
-
|
|
48
|
-
# Decide on source and destination bridges
|
|
49
|
-
if is_bl_ota:
|
|
50
|
-
if brg0.bl_version > brg1.bl_version:
|
|
51
|
-
src_brg = brg0
|
|
52
|
-
dest_brg = brg1
|
|
53
|
-
else:
|
|
54
|
-
src_brg = brg1
|
|
55
|
-
dest_brg = brg0
|
|
56
|
-
else:
|
|
57
|
-
if brg0.version > brg1.version:
|
|
58
|
-
src_brg = brg0
|
|
59
|
-
dest_brg = brg1
|
|
60
|
-
else:
|
|
61
|
-
src_brg = brg1
|
|
62
|
-
dest_brg = brg0
|
|
63
|
-
test.active_brg = src_brg
|
|
64
|
-
|
|
65
|
-
desired_version_print = src_brg.bl_version if is_bl_ota else src_brg.version
|
|
66
|
-
older_version_print = dest_brg.bl_version if is_bl_ota else dest_brg.version
|
|
67
|
-
utPrint(f"Source {"bootloader" if is_bl_ota else ""} bridge version: {desired_version_print}. "
|
|
68
|
-
f"Destination bridge {"bootloader" if is_bl_ota else ""} version: {older_version_print}", "BLUE")
|
|
69
|
-
|
|
70
|
-
# Send BRG2BRG_OTA message to source bridge
|
|
71
|
-
functionality_run_print(f"BRG2BRG OTA - Source Bridge MAC: {src_brg.id_str}, Destination Bridge MAC: {dest_brg.id_str}")
|
|
72
|
-
brg2brg_ota_pkt = eval_pkt(f'Brg2BrgOtaV{test.active_brg.api_version}')(src_brg_mac=src_brg.id_int,
|
|
73
|
-
dest_brg_mac=dest_brg.id_int,
|
|
74
|
-
seq_id=test.get_seq_id(),
|
|
75
|
-
bootloader=is_bl_ota)
|
|
76
|
-
brg2brg_ota_pkt_downlink = WltPkt(hdr=ag.Hdr(group_id=ag.GROUP_ID_GW2BRG), pkt=brg2brg_ota_pkt)
|
|
77
|
-
# BRG OTA - Flush pkts ONLY before starting to avoid deletion of needed GW Logs
|
|
78
|
-
test.mqttc.flush_pkts()
|
|
79
|
-
cert_config.gw_downlink(test, raw_tx_data=brg2brg_ota_pkt_downlink.dump())
|
|
80
|
-
|
|
81
|
-
# Get version of the destination bridge
|
|
82
|
-
test.active_brg = dest_brg
|
|
83
|
-
# expected_hash=1 due to different cfgs and versions between builds
|
|
84
|
-
test = cert_common.reboot_config_analysis(test=test, expected_hash=1, ble_version=src_brg.version if not is_bl_ota else None,
|
|
85
|
-
bl_version=src_brg.bl_version if is_bl_ota else None, timeout=VER_UPDATE_TIMEOUT)
|
|
86
|
-
|
|
87
|
-
return cert_common.test_epilog(test)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "LEDs Behaviour",
|
|
3
|
-
"module": "Edge Management",
|
|
4
|
-
"purpose": "Test the behavior and indications of LEDs during different operational states.",
|
|
5
|
-
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
-
"initialCondition": "Bridge configured to defaults",
|
|
7
|
-
"procedure": ["Test prolog",
|
|
8
|
-
"pre-stage to verify connection to a GW and associate LED color with capability",
|
|
9
|
-
"Test LED behavior during different operational states and behaviors - Advertising, Energizing, Echoing, KEEP_ALIVE, blink action & power management",
|
|
10
|
-
"Test epilog"],
|
|
11
|
-
"expectedOutcome": "LEDs behave as expected during all operational states and behaviors",
|
|
12
|
-
"mandatory": 0,
|
|
13
|
-
"multiBridgeTest": 0,
|
|
14
|
-
"gwOnlyTest": 0,
|
|
15
|
-
"internalBridge": 1,
|
|
16
|
-
"allSupportedValues": []
|
|
17
|
-
}
|