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,455 @@
|
|
|
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
|
+
import csv
|
|
9
|
+
|
|
10
|
+
# test MACROS definitions #
|
|
11
|
+
DEFAULT_ADVA0 = "112233445566"
|
|
12
|
+
DEFAULT_ADVA1 = "778899AABBCC"
|
|
13
|
+
DEFAULT_ADVA2 = "DDEEFF112233"
|
|
14
|
+
DEFAULT_ADVA3 = "123456123456"
|
|
15
|
+
TESTING_SENSOR_INDICATOR = "2222222222"
|
|
16
|
+
DEFAULT_SENSOR_PAYLOAD_DATA = "0200002929B0FFF98DB1" + TESTING_SENSOR_INDICATOR + "91456B55CC18AADB"
|
|
17
|
+
ERM_SMART_MS_PAYLOAD = "0201060303374C17FFAE04" + TESTING_SENSOR_INDICATOR + "E7AE7C5EB13B744D401CC6CFCF0107"
|
|
18
|
+
ZEBRA_PRINTER_PAYLOAD = "0201020F" + TESTING_SENSOR_INDICATOR + "4A323331363038333435030279FEA5A5A5A5A5A5A5A5"
|
|
19
|
+
UNIFIED_PAYLOAD = "0201020611111111111103FF000505" + TESTING_SENSOR_INDICATOR + "0000000000000000000000"
|
|
20
|
+
DEFAULT_PACKET_LENGTH = "1E"
|
|
21
|
+
|
|
22
|
+
SCAN_TIMEOUT = 60
|
|
23
|
+
|
|
24
|
+
# UUID defines for logs review #
|
|
25
|
+
ZEBRA_PRINTER_UUID = ag.EXTERNAL_SENSORS_ZEBRA_PRINTER >> 8 # Scrambling
|
|
26
|
+
MINEW_S1_UUID = ag.EXTERNAL_SENSORS_MINEWS1 >> 8 # Scrambling
|
|
27
|
+
ERM_SMART_MS_UUID = ag.EXTERNAL_SENSORS_ERM_SMART_MS >> 8 # No scrambling
|
|
28
|
+
SIGNAL_INDICATOR_UUID = ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR >> 8 # Unified Sensor
|
|
29
|
+
|
|
30
|
+
SCRAMBLE_ON = 0x01
|
|
31
|
+
UNIFIED_SCRAMBLE_OFF = 0x00
|
|
32
|
+
UNIFIED_ON = 0x02
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def unscramble(packet):
|
|
36
|
+
unscrambled_packet_id = int(hex(packet[RSSI])[2:] + packet[SENSOR_ID][-6:], 16) # transforming parameters string to hex format
|
|
37
|
+
for idx in range(6, 60, 8):
|
|
38
|
+
current_word = int(packet[PAYLOAD][idx: idx + 8], 16)
|
|
39
|
+
unscrambled_packet_id ^= current_word
|
|
40
|
+
return packet[PAYLOAD][8:-8] + f"{unscrambled_packet_id:08x}"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def find_packet_in_csv(unscrambled_payload):
|
|
44
|
+
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
45
|
+
with open(f'{base_path}/out_sensor_data.csv', 'r') as csv_file:
|
|
46
|
+
csv_reader = csv.DictReader(csv_file)
|
|
47
|
+
next(csv_reader) # stepping over the header line
|
|
48
|
+
for line in csv_reader:
|
|
49
|
+
raw_data_payload = line['raw packet'][20:]
|
|
50
|
+
if raw_data_payload[:-8] == unscrambled_payload[:-8]:
|
|
51
|
+
return True
|
|
52
|
+
return False
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def find_unified_packet_in_csv(pkt):
|
|
56
|
+
unified_pkt = ag.UnifiedSensorPkt(pkt)
|
|
57
|
+
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
58
|
+
with open(f'{base_path}/out_sensor_data.csv', 'r') as csv_file:
|
|
59
|
+
csv_reader = csv.DictReader(csv_file)
|
|
60
|
+
next(csv_reader) # stepping over the header line
|
|
61
|
+
for line in csv_reader:
|
|
62
|
+
raw_data_pkt = ag.UnifiedSensorPkt(line['raw packet'][20:])
|
|
63
|
+
if raw_data_pkt.sensor_payload == unified_pkt.sensor_payload:
|
|
64
|
+
return True
|
|
65
|
+
return False
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def create_csv_file_in(test, length=500):
|
|
69
|
+
if test.data != DATA_SIMULATION:
|
|
70
|
+
return []
|
|
71
|
+
else:
|
|
72
|
+
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
73
|
+
pkts = []
|
|
74
|
+
with open(f"{base_path}/in_sensor_data.csv", "w+") as f:
|
|
75
|
+
f.write("raw packet,output power,delay,duplicates,channel,COM\n")
|
|
76
|
+
for i in range(length):
|
|
77
|
+
# Create pkts
|
|
78
|
+
pkt_0 = cert_data_sim.GenericPkt(adva=DEFAULT_ADVA0, payload=ZEBRA_PRINTER_PAYLOAD)
|
|
79
|
+
pkt_1 = cert_data_sim.GenericPkt(adva=DEFAULT_ADVA1, payload=(DEFAULT_PACKET_LENGTH +
|
|
80
|
+
cert_common.int2mac_get(MINEW_S1_UUID)[6:] +
|
|
81
|
+
DEFAULT_SENSOR_PAYLOAD_DATA +
|
|
82
|
+
f"{i:08X}"))
|
|
83
|
+
pkt_2 = cert_data_sim.GenericPkt(adva=DEFAULT_ADVA2, payload=ERM_SMART_MS_PAYLOAD)
|
|
84
|
+
pkt_unified = cert_data_sim.GenericPkt(adva=DEFAULT_ADVA3, payload=UNIFIED_PAYLOAD)
|
|
85
|
+
# Write to csv
|
|
86
|
+
f.write(pkt_0.get_pkt() + ",8,200,6,37,COM3\n")
|
|
87
|
+
f.write(pkt_1.get_pkt() + ",8,200,6,37,COM3\n")
|
|
88
|
+
f.write(pkt_2.get_pkt() + ",8,200,6,37,COM3\n")
|
|
89
|
+
f.write(pkt_unified.get_pkt() + ",8,200,6,37,COM3\n")
|
|
90
|
+
# Add to pkts list to be sent
|
|
91
|
+
pkts.append(pkt_0)
|
|
92
|
+
pkts.append(pkt_1)
|
|
93
|
+
pkts.append(pkt_2)
|
|
94
|
+
pkts.append(pkt_unified)
|
|
95
|
+
return pkts
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def create_csv_file_out(test):
|
|
99
|
+
if test.data != DATA_SIMULATION:
|
|
100
|
+
return
|
|
101
|
+
else:
|
|
102
|
+
base_path = os.path.dirname(os.path.abspath(__file__))
|
|
103
|
+
uuid_0 = cert_common.int2mac_get(ZEBRA_PRINTER_UUID)[6:]
|
|
104
|
+
uuid_2 = cert_common.int2mac_get(ERM_SMART_MS_UUID)[6:]
|
|
105
|
+
uuid_unified = cert_common.int2mac_get(SIGNAL_INDICATOR_UUID)[6:]
|
|
106
|
+
with (open(f"{base_path}/in_sensor_data.csv", "r") as csv_in,
|
|
107
|
+
open(f"{base_path}/out_sensor_data.csv", "w") as csv_out):
|
|
108
|
+
csv_out.write("raw packet,output power,delay,duplicates,channel,COM\n")
|
|
109
|
+
csv_in = csv.DictReader(csv_in)
|
|
110
|
+
next(csv_in) # stepping over the header line
|
|
111
|
+
for line in csv_in:
|
|
112
|
+
input_payload = line['raw packet'][12:]
|
|
113
|
+
if uuid_0 in input_payload:
|
|
114
|
+
csv_out.write(DEFAULT_ADVA0 + process_sensor_payload(input_payload, uuid_0) + ",8,200,6,37,COM3\n")
|
|
115
|
+
elif uuid_2 in input_payload:
|
|
116
|
+
csv_out.write(DEFAULT_ADVA2 + process_sensor_payload(input_payload, uuid_2) + ",8,200,6,37,COM3\n")
|
|
117
|
+
elif uuid_unified in input_payload:
|
|
118
|
+
csv_out.write(DEFAULT_ADVA3 + process_sensor_payload(input_payload, uuid_unified) + ",8,200,6,37,COM3\n")
|
|
119
|
+
else:
|
|
120
|
+
csv_out.write(line['raw packet'] + ",8,200,6,37,COM3\n")
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def process_sensor_payload(payload, uuid):
|
|
124
|
+
uuid_idx = payload.find(uuid)
|
|
125
|
+
if uuid_idx == -1:
|
|
126
|
+
raise ValueError(f"Pattern {uuid_idx} not found in the packet")
|
|
127
|
+
|
|
128
|
+
len = int(payload[uuid_idx - 2:uuid_idx], 16)
|
|
129
|
+
segment_start_idx = uuid_idx - 2
|
|
130
|
+
segment_end_idx = uuid_idx + len * 2
|
|
131
|
+
segment = payload[segment_start_idx:segment_end_idx]
|
|
132
|
+
output = segment + payload[:segment_start_idx] + payload[segment_end_idx:]
|
|
133
|
+
return output
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def pkts_get(test, phase, is_unified=False, target=DUT):
|
|
137
|
+
test.get_mqttc_by_target(target).flush_pkts()
|
|
138
|
+
mqtt_scan_wait(test, duration=SCAN_TIMEOUT)
|
|
139
|
+
sensor_pkts = cert_mqtt.get_all_sensor_pkts(test, is_unified, remove_embedded=True)
|
|
140
|
+
# protection against real sensors interfering with the test
|
|
141
|
+
sensor_pkts = [p for p in sensor_pkts if TESTING_SENSOR_INDICATOR in p[PAYLOAD]]
|
|
142
|
+
cert_mqtt.generate_log_file(test, phase)
|
|
143
|
+
|
|
144
|
+
if len(sensor_pkts) == 0:
|
|
145
|
+
if phase != "tag_data_only" and phase != "rssi_threshold":
|
|
146
|
+
test.rc = TEST_FAILED
|
|
147
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor packets")
|
|
148
|
+
|
|
149
|
+
return sensor_pkts
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def test_tag_data_only(test, phase, _):
|
|
153
|
+
sensor_pkts = pkts_get(test, phase)
|
|
154
|
+
if len(sensor_pkts) > 0:
|
|
155
|
+
test.rc = TEST_FAILED
|
|
156
|
+
test.add_reason(f"Phase {phase} failed - found sensor packets")
|
|
157
|
+
return test
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def test_rssi_threshold(test, phase, ext_sensors_module):
|
|
161
|
+
rssi_threshold = -25
|
|
162
|
+
# Config
|
|
163
|
+
utPrint(f"EXTERNAL_SENSORS_ZEBRA_PRINTER, RSSI Threshold = {rssi_threshold}\n", "BLUE")
|
|
164
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module,
|
|
165
|
+
fields=[BRG_SENSOR0, BRG_RSSI_THRESHOLD],
|
|
166
|
+
values=[ag.EXTERNAL_SENSORS_ZEBRA_PRINTER, rssi_threshold])[0]
|
|
167
|
+
# Analyze
|
|
168
|
+
sensor_pkts = pkts_get(test, phase)
|
|
169
|
+
if test.rc == TEST_FAILED:
|
|
170
|
+
return test
|
|
171
|
+
rssi_threshold_violation_pkts = [p for p in sensor_pkts if p[RSSI] >= -1 * rssi_threshold]
|
|
172
|
+
if rssi_threshold_violation_pkts:
|
|
173
|
+
test.rc = TEST_FAILED
|
|
174
|
+
test.add_reason("rssi_threshold phase failed - received"
|
|
175
|
+
f" {len(rssi_threshold_violation_pkts)} sensor packets\n with RSSI weaker than {rssi_threshold}")
|
|
176
|
+
return test
|
|
177
|
+
return test
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def test_snsr2_unified(test, phase, ext_sensors_module):
|
|
181
|
+
# Config
|
|
182
|
+
utPrint(f"SIGNAL_INDICATOR_UUID is 0x{SIGNAL_INDICATOR_UUID:06X}", "BLUE")
|
|
183
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module,
|
|
184
|
+
fields=[BRG_SENSOR2],
|
|
185
|
+
values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR])[0]
|
|
186
|
+
if test.rc == TEST_FAILED:
|
|
187
|
+
test.add_reason(f"Configuration for phase {phase} failed")
|
|
188
|
+
return test
|
|
189
|
+
# Analyze
|
|
190
|
+
sensor_pkts = pkts_get(test, phase, is_unified=True)
|
|
191
|
+
if test.rc == TEST_FAILED:
|
|
192
|
+
return test
|
|
193
|
+
for p in sensor_pkts:
|
|
194
|
+
sensor_id = (f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_ad_type:02X}"
|
|
195
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_msb:02X}"
|
|
196
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_lsb:02X}")
|
|
197
|
+
if sensor_id != f"{SIGNAL_INDICATOR_UUID:06X}":
|
|
198
|
+
test.rc = TEST_FAILED
|
|
199
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {sensor_id}")
|
|
200
|
+
return test
|
|
201
|
+
unified_payload = p[PAYLOAD][8:]
|
|
202
|
+
if find_unified_packet_in_csv(unified_payload) is False:
|
|
203
|
+
test.rc = TEST_FAILED
|
|
204
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {SIGNAL_INDICATOR_UUID:06X}")
|
|
205
|
+
return test
|
|
206
|
+
return test
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def test_snsr0_no_scrmbl(test, phase, ext_sensors_module):
|
|
210
|
+
# Config
|
|
211
|
+
utPrint(f"ERM_SMART_MS_UUID only without scrambling - UUID is 0x{ERM_SMART_MS_UUID:06X}", "BLUE")
|
|
212
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module,
|
|
213
|
+
fields=[BRG_SENSOR0],
|
|
214
|
+
values=[ag.EXTERNAL_SENSORS_ERM_SMART_MS])[0]
|
|
215
|
+
if test.rc == TEST_FAILED:
|
|
216
|
+
test.add_reason(f"Configuration for phase {phase} failed")
|
|
217
|
+
return test
|
|
218
|
+
# Analyze
|
|
219
|
+
sensor_pkts = pkts_get(test, phase)
|
|
220
|
+
if test.rc == TEST_FAILED:
|
|
221
|
+
return test
|
|
222
|
+
# verify packets exists
|
|
223
|
+
sensor0_pkts = [p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
224
|
+
if not any(sensor0_pkts):
|
|
225
|
+
test.rc = TEST_FAILED
|
|
226
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor0 packets")
|
|
227
|
+
return test
|
|
228
|
+
# verify packets structure
|
|
229
|
+
for p in sensor_pkts:
|
|
230
|
+
if p[SENSOR_UUID] != f"{ERM_SMART_MS_UUID:06X}":
|
|
231
|
+
test.rc = TEST_FAILED
|
|
232
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {p[SENSOR_UUID]}")
|
|
233
|
+
return test
|
|
234
|
+
payload = p[PAYLOAD][8:]
|
|
235
|
+
if find_packet_in_csv(payload) is False:
|
|
236
|
+
test.rc = TEST_FAILED
|
|
237
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {ERM_SMART_MS_UUID:06X}")
|
|
238
|
+
return test
|
|
239
|
+
return test
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def test_snsr1_scrmbl(test, phase, ext_sensors_module):
|
|
243
|
+
# Config
|
|
244
|
+
utPrint(f"MINEW_S1_UUID only with scrambling - UUID is 0x{MINEW_S1_UUID:06X}", "BLUE")
|
|
245
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module,
|
|
246
|
+
fields=[BRG_SENSOR1],
|
|
247
|
+
values=[ag.EXTERNAL_SENSORS_MINEWS1])[0]
|
|
248
|
+
if test.rc == TEST_FAILED:
|
|
249
|
+
test.add_reason(f"Configuration for phase {phase} failed")
|
|
250
|
+
return test
|
|
251
|
+
# Analyze
|
|
252
|
+
sensor_pkts = pkts_get(test, phase)
|
|
253
|
+
if test.rc == TEST_FAILED:
|
|
254
|
+
return test
|
|
255
|
+
# verify packets exists
|
|
256
|
+
sensor1_pkts = [p[SENSOR_UUID] == f"{MINEW_S1_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
257
|
+
if not any(sensor1_pkts):
|
|
258
|
+
test.rc = TEST_FAILED
|
|
259
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor1 packets")
|
|
260
|
+
return test
|
|
261
|
+
# verify packets structure
|
|
262
|
+
for p in sensor_pkts:
|
|
263
|
+
if p[SENSOR_UUID] != f"{MINEW_S1_UUID:06X}":
|
|
264
|
+
test.rc = TEST_FAILED
|
|
265
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {p[SENSOR_UUID]}")
|
|
266
|
+
return test
|
|
267
|
+
unscrambled_payload = unscramble(p)
|
|
268
|
+
if find_packet_in_csv(unscrambled_payload) is False:
|
|
269
|
+
test.rc = TEST_FAILED
|
|
270
|
+
test.add_reason(f"Phase {phase} failed - couldn't find unscrambled payload")
|
|
271
|
+
return test
|
|
272
|
+
return test
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def test_snsr0_no_scrmbl_snsr1_scrmbl_snsr2_scrmbl(test, phase, ext_sensors_module):
|
|
276
|
+
# Config
|
|
277
|
+
utPrint(f"ERM_SMART_MS without scrambling, ZEBRA_PRINTER with scrambling, MINEW_S1 with scrambling,"
|
|
278
|
+
f"{SCAN_TIMEOUT} sec\n", "BLUE")
|
|
279
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module,
|
|
280
|
+
fields=[BRG_SENSOR0, BRG_SENSOR1, BRG_SENSOR2],
|
|
281
|
+
values=[ag.EXTERNAL_SENSORS_ERM_SMART_MS,
|
|
282
|
+
ag.EXTERNAL_SENSORS_ZEBRA_PRINTER,
|
|
283
|
+
ag.EXTERNAL_SENSORS_MINEWS1])[0]
|
|
284
|
+
if test.rc == TEST_FAILED:
|
|
285
|
+
return test
|
|
286
|
+
# Analyze
|
|
287
|
+
sensor_pkts = pkts_get(test, phase)
|
|
288
|
+
if test.rc == TEST_FAILED:
|
|
289
|
+
return test
|
|
290
|
+
# verify packets exists
|
|
291
|
+
sensor0_pkts = [p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
292
|
+
if not any(sensor0_pkts):
|
|
293
|
+
test.rc = TEST_FAILED
|
|
294
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor0 packets")
|
|
295
|
+
return test
|
|
296
|
+
sensor1_pkts = [p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
297
|
+
if not any(sensor1_pkts):
|
|
298
|
+
test.rc = TEST_FAILED
|
|
299
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor1 packets")
|
|
300
|
+
return test
|
|
301
|
+
sensor2_pkts = [p[SENSOR_UUID] == f"{MINEW_S1_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
302
|
+
if not any(sensor2_pkts):
|
|
303
|
+
test.rc = TEST_FAILED
|
|
304
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor2 packets")
|
|
305
|
+
return test
|
|
306
|
+
# verify packets structure
|
|
307
|
+
for p in sensor_pkts:
|
|
308
|
+
if not (p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}" or p[SENSOR_UUID] == f"{MINEW_S1_UUID:06X}" or
|
|
309
|
+
p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}"):
|
|
310
|
+
test.rc = TEST_FAILED
|
|
311
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {p[SENSOR_UUID]}")
|
|
312
|
+
return test
|
|
313
|
+
if p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}":
|
|
314
|
+
payload = p[PAYLOAD][8:]
|
|
315
|
+
if find_packet_in_csv(payload) is False:
|
|
316
|
+
test.rc = TEST_FAILED
|
|
317
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {ERM_SMART_MS_UUID:06X}")
|
|
318
|
+
return test
|
|
319
|
+
if p[SENSOR_UUID] == f"{MINEW_S1_UUID:06X}":
|
|
320
|
+
unscrambled_payload = unscramble(p)
|
|
321
|
+
if find_packet_in_csv(unscrambled_payload) is False:
|
|
322
|
+
test.rc = TEST_FAILED
|
|
323
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {MINEW_S1_UUID:06X}")
|
|
324
|
+
return test
|
|
325
|
+
if p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}":
|
|
326
|
+
unscrambled_payload = unscramble(p)
|
|
327
|
+
if find_packet_in_csv(unscrambled_payload) is False:
|
|
328
|
+
test.rc = TEST_FAILED
|
|
329
|
+
test.add_reason(f"Phase {phase} failed - couldn't find unscrambled payload for {ZEBRA_PRINTER_UUID:06X}")
|
|
330
|
+
return test
|
|
331
|
+
return test
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
def test_snsr0_no_scrmbl_snsr1_scrmbl_snsr2_unified(test, phase, ext_sensors_module):
|
|
335
|
+
# Config
|
|
336
|
+
utPrint(f"ERM_SMART_MS without scrambling, ZEBRA_PRINTER scrambling, SIGNAL_INDICATOR unified, {SCAN_TIMEOUT} sec\n", "BLUE")
|
|
337
|
+
test = cert_config.brg_configure(test=test, module=ext_sensors_module, fields=[BRG_SENSOR0, BRG_SENSOR1, BRG_SENSOR2],
|
|
338
|
+
values=[ag.EXTERNAL_SENSORS_ERM_SMART_MS,
|
|
339
|
+
ag.EXTERNAL_SENSORS_ZEBRA_PRINTER,
|
|
340
|
+
ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR])[0]
|
|
341
|
+
if test.rc == TEST_FAILED:
|
|
342
|
+
return test
|
|
343
|
+
# Analyze
|
|
344
|
+
sensor_pkts = pkts_get(test, phase, is_unified=True)
|
|
345
|
+
if test.rc == TEST_FAILED:
|
|
346
|
+
return test
|
|
347
|
+
# verify packets exists
|
|
348
|
+
sensor0_pkts = [p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
349
|
+
if not any(sensor0_pkts):
|
|
350
|
+
test.rc = TEST_FAILED
|
|
351
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor0 packets")
|
|
352
|
+
return test
|
|
353
|
+
sensor1_pkts = [p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}" for p in sensor_pkts if SENSOR_UUID in p]
|
|
354
|
+
if not any(sensor1_pkts):
|
|
355
|
+
test.rc = TEST_FAILED
|
|
356
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor1 packets")
|
|
357
|
+
return test
|
|
358
|
+
sensor2_pkts = []
|
|
359
|
+
for p in sensor_pkts:
|
|
360
|
+
if UNIFIED_SENSOR_PKT in p:
|
|
361
|
+
unified_sensor_uuid = (f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_ad_type:02X}"
|
|
362
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_msb:02X}"
|
|
363
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_lsb:02X}")
|
|
364
|
+
if unified_sensor_uuid == f"{SIGNAL_INDICATOR_UUID:06X}":
|
|
365
|
+
sensor2_pkts.append(p)
|
|
366
|
+
if not any(sensor2_pkts):
|
|
367
|
+
test.rc = TEST_FAILED
|
|
368
|
+
test.add_reason(f"Phase {phase} failed - didn't find any sensor2 packets")
|
|
369
|
+
return test
|
|
370
|
+
# verify packets structure
|
|
371
|
+
for p in sensor_pkts:
|
|
372
|
+
if SENSOR_UUID in p:
|
|
373
|
+
if not (p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}" or
|
|
374
|
+
p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}" or
|
|
375
|
+
p[SENSOR_UUID] == f"{SIGNAL_INDICATOR_UUID:06X}"):
|
|
376
|
+
test.rc = TEST_FAILED
|
|
377
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {p[SENSOR_UUID]}")
|
|
378
|
+
return test
|
|
379
|
+
payload = p[PAYLOAD][8:]
|
|
380
|
+
if p[SENSOR_UUID] == f"{ERM_SMART_MS_UUID:06X}":
|
|
381
|
+
if find_packet_in_csv(payload) is False:
|
|
382
|
+
test.rc = TEST_FAILED
|
|
383
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {ERM_SMART_MS_UUID:06X}")
|
|
384
|
+
return test
|
|
385
|
+
if p[SENSOR_UUID] == f"{ZEBRA_PRINTER_UUID:06X}":
|
|
386
|
+
if find_packet_in_csv(payload) is False:
|
|
387
|
+
test.rc = TEST_FAILED
|
|
388
|
+
test.add_reason(f"Phase {phase} failed - couldn't find payload for {ZEBRA_PRINTER_UUID:06X}")
|
|
389
|
+
return test
|
|
390
|
+
elif UNIFIED_SENSOR_PKT in p:
|
|
391
|
+
unified_sensor_uuid = (f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_ad_type:02X}"
|
|
392
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_msb:02X}"
|
|
393
|
+
f"{p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_lsb:02X}")
|
|
394
|
+
if unified_sensor_uuid != f"{SIGNAL_INDICATOR_UUID:06X}":
|
|
395
|
+
test.rc = TEST_FAILED
|
|
396
|
+
test.add_reason(f"Phase {phase} failed - received packets from an un-registered sensor: {unified_sensor_uuid}")
|
|
397
|
+
return test
|
|
398
|
+
payload = p[PAYLOAD][8:]
|
|
399
|
+
if find_unified_packet_in_csv(payload) is False:
|
|
400
|
+
test.rc = TEST_FAILED
|
|
401
|
+
test.add_reason(f"Phase {phase} failed - couldn't find unified payload for {SIGNAL_INDICATOR_UUID}")
|
|
402
|
+
return test
|
|
403
|
+
return test
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
EXT_SENSOR_TEST_MAP = {"tag_data_only": test_tag_data_only,
|
|
407
|
+
"rssi_threshold": test_rssi_threshold,
|
|
408
|
+
"snsr2_unified": test_snsr2_unified,
|
|
409
|
+
"snsr0_no_scrmbl": test_snsr0_no_scrmbl,
|
|
410
|
+
"snsr1_scrmbl": test_snsr1_scrmbl,
|
|
411
|
+
"snsr0_no_scrmbl_snsr1_scrmbl_snsr2_scrmbl": test_snsr0_no_scrmbl_snsr1_scrmbl_snsr2_scrmbl,
|
|
412
|
+
"snsr0_no_scrmbl_snsr1_scrmbl_snsr2_unified": test_snsr0_no_scrmbl_snsr1_scrmbl_snsr2_unified}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
def run(test):
|
|
416
|
+
datapath_module = test.active_brg.datapath
|
|
417
|
+
ext_sensors_module = test.active_brg.sensors
|
|
418
|
+
test = cert_common.test_prolog(test)
|
|
419
|
+
# check for problems in prolog
|
|
420
|
+
if test.rc == TEST_FAILED:
|
|
421
|
+
test = cert_common.test_epilog(test)
|
|
422
|
+
return test
|
|
423
|
+
|
|
424
|
+
# Adaptation of GW configuration for internal BRG test
|
|
425
|
+
if test.internal_brg:
|
|
426
|
+
test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_37], module=datapath_module, wait=True)[0]
|
|
427
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
428
|
+
return cert_common.test_epilog(test, revert_gws=True)
|
|
429
|
+
|
|
430
|
+
# create csv file for the test
|
|
431
|
+
in_pkts = create_csv_file_in(test)
|
|
432
|
+
create_csv_file_out(test)
|
|
433
|
+
|
|
434
|
+
if test.data == DATA_SIMULATION:
|
|
435
|
+
# start generating sensor pkts and send them using data simulator
|
|
436
|
+
pixel_sim_thread = cert_data_sim.GenericSimThread(test=test, duplicates=6, delay=200, pkts=in_pkts)
|
|
437
|
+
pixel_sim_thread.start()
|
|
438
|
+
ble_sim_thread = pixel_sim_thread
|
|
439
|
+
|
|
440
|
+
for param in test.params:
|
|
441
|
+
phase_run_print(param.name)
|
|
442
|
+
test = EXT_SENSOR_TEST_MAP[param.value](test, param.name, ext_sensors_module)
|
|
443
|
+
field_functionality_pass_fail_print(test, param.name)
|
|
444
|
+
test.set_phase_rc(param.name, test.rc)
|
|
445
|
+
test.add_phase_reason(param.name, test.reason)
|
|
446
|
+
if test.rc == TEST_FAILED:
|
|
447
|
+
if test.exit_on_param_failure:
|
|
448
|
+
break # break the whole for loop and keep the test as failed
|
|
449
|
+
test.reset_result() # reset result and continue to next param
|
|
450
|
+
|
|
451
|
+
# Kill the ble simulator
|
|
452
|
+
if test.data == DATA_SIMULATION:
|
|
453
|
+
ble_sim_thread.stop()
|
|
454
|
+
|
|
455
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[ext_sensors_module, datapath_module])
|
certificate/wlt_types.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import certificate.ag.wlt_types_ag as ag
|
|
2
|
+
|
|
3
|
+
def eval_pkt(string):
|
|
4
|
+
try:
|
|
5
|
+
return eval(f'ag.{string}')
|
|
6
|
+
except:
|
|
7
|
+
return None
|
|
8
|
+
|
|
9
|
+
def eval_one_param(string):
|
|
10
|
+
string = string.strip("' ")
|
|
11
|
+
if string in ag.__dict__:
|
|
12
|
+
return eval(f'ag.{string}')
|
|
13
|
+
try:
|
|
14
|
+
return eval(string)
|
|
15
|
+
except:
|
|
16
|
+
return string
|
|
17
|
+
|
|
18
|
+
def eval_param(string):
|
|
19
|
+
if "," in string:
|
|
20
|
+
return [eval_one_param(x) for x in string.strip("[]").split(",")]
|
|
21
|
+
else:
|
|
22
|
+
return eval_one_param(string)
|
|
23
|
+
|
|
24
|
+
class WltPkt():
|
|
25
|
+
supported_pkt_types = ag.WLT_PKT_TYPES
|
|
26
|
+
|
|
27
|
+
def __init__(self, raw='', hdr=None, data_hdr=None, generic=None, pkt=None):
|
|
28
|
+
self.hdr = ag.Hdr() if hdr is None else hdr
|
|
29
|
+
self.data_hdr = ag.DataHdr() if data_hdr is None else data_hdr
|
|
30
|
+
self.generic = generic
|
|
31
|
+
self.pkt = pkt
|
|
32
|
+
if raw:
|
|
33
|
+
self.set(raw)
|
|
34
|
+
|
|
35
|
+
def __repr__(self) -> str:
|
|
36
|
+
if isinstance(self.pkt, (ag.UnifiedEchoPktV0, ag.UnifiedEchoPktV1, ag.UnifiedEchoPktV2, ag.UnifiedEchoExtPktV0, ag.UnifiedEchoExtPktV1)):
|
|
37
|
+
return f"{self.data_hdr}\n{self.pkt}"
|
|
38
|
+
return f"{self.hdr}\n{self.pkt}"
|
|
39
|
+
|
|
40
|
+
def __eq__(self, other):
|
|
41
|
+
if isinstance(other, WltPkt):
|
|
42
|
+
return (
|
|
43
|
+
(self.hdr == other.hdr or
|
|
44
|
+
self.data_hdr == other.data_hdr) and
|
|
45
|
+
self.generic == other.generic and
|
|
46
|
+
self.pkt == other.pkt
|
|
47
|
+
)
|
|
48
|
+
return False
|
|
49
|
+
|
|
50
|
+
def dump(self):
|
|
51
|
+
if self.pkt:
|
|
52
|
+
if isinstance(self.pkt, (ag.UnifiedEchoPktV0, ag.UnifiedEchoPktV1, ag.UnifiedEchoPktV2, ag.UnifiedEchoExtPktV0, ag.UnifiedEchoExtPktV1)):
|
|
53
|
+
return self.data_hdr.dump() + self.pkt.dump()
|
|
54
|
+
else:
|
|
55
|
+
return self.hdr.dump() + self.pkt.dump()
|
|
56
|
+
return self.data_hdr.dump() + self.generic.dump()
|
|
57
|
+
|
|
58
|
+
def set(self, string):
|
|
59
|
+
|
|
60
|
+
self.hdr.set(string[0:14])
|
|
61
|
+
self.data_hdr.set(string[0:14])
|
|
62
|
+
# Sensor pkts
|
|
63
|
+
if self.hdr.uuid_lsb == ag.HDR_DEFAULT_BRG_SENSOR_UUID_LSB and self.hdr.uuid_msb == ag.HDR_DEFAULT_BRG_SENSOR_UUID_MSB:
|
|
64
|
+
unified_sensor_id = int(string[52:58], 16)
|
|
65
|
+
# Unified Sensor pkt - can be identified using bytes 26-28 for the sensor id
|
|
66
|
+
if unified_sensor_id in ag.UNIFIED_SENSOR_ID_LIST:
|
|
67
|
+
self.pkt = ag.UnifiedSensorPkt(string[8:62])
|
|
68
|
+
else:
|
|
69
|
+
# Sensor Data pkt
|
|
70
|
+
self.pkt = ag.SensorData(string)
|
|
71
|
+
else:
|
|
72
|
+
if self.hdr.group_id == ag.GROUP_ID_BRG2GW or self.hdr.group_id == ag.GROUP_ID_GW2BRG:
|
|
73
|
+
# GROUP_ID_BRG2GW & GROUP_ID_GW2BRG
|
|
74
|
+
self.generic = eval_pkt(f'GenericV{ag.API_VERSION_LATEST}()')
|
|
75
|
+
self.generic.set(string[14:62])
|
|
76
|
+
|
|
77
|
+
# MEL modules
|
|
78
|
+
if self.generic.module_type and self.generic.module_type in ag.MODULES_DICT:
|
|
79
|
+
self.pkt = eval_pkt(f'{ag.MODULES_DICT[self.generic.module_type]}{self.generic.api_version}()')
|
|
80
|
+
elif self.generic.module_type == ag.MODULE_GLOBAL:
|
|
81
|
+
# Action pkts
|
|
82
|
+
if self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_ACTION:
|
|
83
|
+
pkt = eval_pkt(f'ActionGenericV{self.generic.api_version}("{string[14:62]}")')
|
|
84
|
+
if self.generic.api_version >= ag.API_VERSION_V8:
|
|
85
|
+
pkt = eval_pkt(f'{ag.ACTIONS_DICT[pkt.action_id]}{self.generic.api_version}()')
|
|
86
|
+
self.pkt = pkt
|
|
87
|
+
# OLD global config (GW2BRG & BRG2GW)
|
|
88
|
+
elif self.hdr.group_id == ag.GROUP_ID_GW2BRG and self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_CFG_SET:
|
|
89
|
+
self.pkt = eval_pkt(f'Gw2BrgCfgV8()') # no api_version field in Gw2BrgCfg pkts - default parse as api version 8 (Latest Gw2BrgCfg)
|
|
90
|
+
elif self.hdr.group_id == ag.GROUP_ID_BRG2GW:
|
|
91
|
+
if self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_CFG_SET or self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_CFG_INFO:
|
|
92
|
+
self.pkt = eval_pkt(f'Brg2GwCfgV{self.generic.api_version}()')
|
|
93
|
+
elif self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_HB:
|
|
94
|
+
self.pkt = eval_pkt(f'Brg2GwHbV{self.generic.api_version}()')
|
|
95
|
+
elif self.generic.msg_type == ag.BRG_MGMT_MSG_TYPE_HB_SLEEP:
|
|
96
|
+
self.pkt = eval_pkt(f'Brg2GwHbSleepV{self.generic.api_version}()')
|
|
97
|
+
# Unified pkt
|
|
98
|
+
elif self.data_hdr.group_id_major in ag.UNIFIED_GROUP_ID_LIST:
|
|
99
|
+
if self.data_hdr.group_id_major == ag.GROUP_ID_UNIFIED_PKT_V0:
|
|
100
|
+
self.pkt = ag.UnifiedEchoPktV0()
|
|
101
|
+
elif self.data_hdr.group_id_major == ag.GROUP_ID_UNIFIED_PKT_V1 or self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_PKT0_V0:
|
|
102
|
+
self.pkt = ag.UnifiedEchoPktV1()
|
|
103
|
+
elif self.data_hdr.group_id_major == ag.GROUP_ID_UNIFIED_PKT_V2 or self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_PKT0_V1:
|
|
104
|
+
self.pkt = ag.UnifiedEchoPktV2()
|
|
105
|
+
elif self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_EXTENDED_V0:
|
|
106
|
+
self.pkt = ag.UnifiedEchoExtPktV0()
|
|
107
|
+
elif self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_EXTENDED_V1:
|
|
108
|
+
self.pkt = ag.UnifiedEchoExtPktV1()
|
|
109
|
+
# SideInfo pkts
|
|
110
|
+
elif self.hdr.group_id == ag.GROUP_ID_SIDE_INFO_SENSOR:
|
|
111
|
+
self.pkt = ag.SideInfoSensor()
|
|
112
|
+
elif self.hdr.group_id == ag.GROUP_ID_SIDE_INFO:
|
|
113
|
+
self.pkt = ag.SideInfo()
|
|
114
|
+
if self.pkt:
|
|
115
|
+
if self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_EXTENDED_V0 or self.data_hdr.group_id_major == ag.GROUP_ID_BLE5_EXTENDED_V1:
|
|
116
|
+
self.pkt.set(string[14:84])
|
|
117
|
+
else:
|
|
118
|
+
self.pkt.set(string[14:62])
|
|
119
|
+
# Unparsed pkts
|
|
120
|
+
else:
|
|
121
|
+
# print(f"Unable to parse packet with payload: {string}")
|
|
122
|
+
pass
|