wiliot-certificate 1.3.0a1__py3-none-any.whl → 1.4.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/__init__.py +0 -0
- brg_certificate/ag/energous_v0_defines.py +925 -0
- brg_certificate/ag/energous_v1_defines.py +931 -0
- brg_certificate/ag/energous_v2_defines.py +925 -0
- brg_certificate/ag/energous_v3_defines.py +925 -0
- brg_certificate/ag/energous_v4_defines.py +925 -0
- brg_certificate/ag/fanstel_lan_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_lte_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_wifi_v0_defines.py +925 -0
- brg_certificate/ag/minew_lte_v0_defines.py +925 -0
- brg_certificate/ag/wlt_cmd_if.html +102 -0
- brg_certificate/ag/wlt_types.html +6114 -0
- brg_certificate/ag/wlt_types_ag.py +7840 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +142 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +785 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +139 -0
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +394 -0
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +515 -0
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +672 -0
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +550 -0
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +595 -0
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +598 -0
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +938 -0
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +1234 -0
- brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +105 -0
- brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +77 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +61 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +110 -0
- brg_certificate/brg_certificate.py +191 -0
- brg_certificate/brg_certificate_cli.py +47 -0
- brg_certificate/cert_common.py +828 -0
- brg_certificate/cert_config.py +395 -0
- brg_certificate/cert_data_sim.py +188 -0
- brg_certificate/cert_defines.py +337 -0
- brg_certificate/cert_gw_sim.py +285 -0
- brg_certificate/cert_mqtt.py +373 -0
- brg_certificate/cert_prints.py +181 -0
- brg_certificate/cert_protobuf.py +88 -0
- brg_certificate/cert_results.py +300 -0
- brg_certificate/cert_utils.py +358 -0
- brg_certificate/certificate_sanity_test_list.txt +36 -0
- brg_certificate/certificate_test_list.txt +43 -0
- brg_certificate/config/eclipse.json +10 -0
- brg_certificate/config/hivemq.json +10 -0
- brg_certificate/config/mosquitto.json +10 -0
- brg_certificate/config/mosquitto.md +95 -0
- brg_certificate/config/wiliot-dev.json +10 -0
- brg_certificate/restore_brg.py +59 -0
- brg_certificate/tests/calibration/interval_test/interval_test.json +13 -0
- brg_certificate/tests/calibration/interval_test/interval_test.py +28 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +28 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +70 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.json +13 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.py +76 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +13 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +83 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +43 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +63 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +50 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +51 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +54 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +55 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +13 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +73 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +13 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +41 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +184 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +210 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +30 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +203 -0
- brg_certificate/tests/datapath/stress_test/stress_test.json +30 -0
- brg_certificate/tests/datapath/stress_test/stress_test.py +210 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +113 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +79 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +13 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +432 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +94 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +87 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +13 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +210 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +83 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.json +13 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.py +48 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +26 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +398 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +153 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +264 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +27 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +26 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +397 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +27 -0
- brg_certificate/wltPb_pb2.py +72 -0
- brg_certificate/wltPb_pb2.pyi +227 -0
- brg_certificate/wlt_types.py +114 -0
- gw_certificate/api/extended_api.py +7 -1531
- gw_certificate/api_if/200/data.json +106 -0
- gw_certificate/api_if/200/logs.json +12 -0
- gw_certificate/api_if/200/status.json +47 -0
- gw_certificate/api_if/201/data.json +98 -0
- gw_certificate/api_if/201/logs.json +12 -0
- gw_certificate/api_if/201/status.json +53 -0
- gw_certificate/api_if/202/data.json +83 -0
- gw_certificate/api_if/202/logs.json +12 -0
- gw_certificate/api_if/202/status.json +60 -0
- gw_certificate/api_if/203/data.json +85 -0
- gw_certificate/api_if/203/logs.json +12 -0
- gw_certificate/api_if/203/status.json +63 -0
- gw_certificate/api_if/204/data.json +85 -0
- gw_certificate/api_if/204/logs.json +12 -0
- gw_certificate/api_if/204/status.json +63 -0
- gw_certificate/api_if/205/data.json +85 -0
- gw_certificate/api_if/205/logs.json +12 -0
- gw_certificate/api_if/205/status.json +63 -0
- gw_certificate/api_if/api_validation.py +0 -2
- gw_certificate/common/analysis_data_bricks.py +18 -1413
- gw_certificate/common/debug.py +0 -21
- gw_certificate/common/utils.py +1 -212
- gw_certificate/common/utils_defines.py +0 -87
- gw_certificate/gw_certificate.py +9 -7
- gw_certificate/gw_certificate_cli.py +39 -23
- gw_certificate/interface/4.4.52_app.zip +0 -0
- gw_certificate/interface/4.4.52_sd_bl_app.zip +0 -0
- gw_certificate/interface/ble_simulator.py +0 -32
- gw_certificate/interface/if_defines.py +1 -0
- gw_certificate/interface/mqtt.py +96 -19
- 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 -82
- gw_certificate/interface/uart_if.py +73 -43
- gw_certificate/templates/results.html +1 -1
- gw_certificate/tests/__init__.py +1 -2
- gw_certificate/tests/actions.py +134 -9
- gw_certificate/tests/connection.py +10 -5
- gw_certificate/tests/downlink.py +2 -4
- gw_certificate/tests/generic.py +62 -12
- gw_certificate/tests/registration.py +78 -27
- gw_certificate/tests/static/generated_packet_table.py +12 -48
- gw_certificate/tests/static/packet_table.csv +10048 -10048
- gw_certificate/tests/static/references.py +2 -1
- gw_certificate/tests/static/uplink_defines.py +0 -7
- gw_certificate/tests/throughput.py +7 -12
- gw_certificate/tests/uplink.py +83 -43
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/METADATA +59 -8
- wiliot_certificate-1.4.0a1.dist-info/RECORD +198 -0
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/WHEEL +1 -1
- wiliot_certificate-1.4.0a1.dist-info/entry_points.txt +3 -0
- wiliot_certificate-1.4.0a1.dist-info/top_level.txt +2 -0
- gw_certificate/interface/packet_error.py +0 -22
- wiliot_certificate-1.3.0a1.dist-info/RECORD +0 -51
- wiliot_certificate-1.3.0a1.dist-info/entry_points.txt +0 -2
- wiliot_certificate-1.3.0a1.dist-info/top_level.txt +0 -1
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# The certificate should run for every bridge change
|
|
2
|
+
# The setup will include 1 tested BRG + 1 GW connected with UART
|
|
3
|
+
# python ut.py --gw SIM --brg <XXXXXXXXXXXX> --tl certificate_sanity_test_list.txt --data sim --port <COM_PORT>
|
|
4
|
+
|
|
5
|
+
# ------------- edge_mgmt -------------
|
|
6
|
+
edge_mgmt/stat_test
|
|
7
|
+
edge_mgmt/actions_test ACTION_GW_HB ACTION_BLINK ACTION_SEND_HB ACTION_GET_BATTERY_SENSOR ACTION_GET_POF_DATA ACTION_PL_STATUS ACTION_GET_MODULE ACTION_REBOOT ACTION_RESTORE_DEFAULTS
|
|
8
|
+
|
|
9
|
+
# ------------- energy2400 -------------
|
|
10
|
+
energy2400/pattern_test ENERGY_PATTERN_2_4_CHANNEL_37 ENERGY_PATTERN_2_4_CHANNEL_39 ENERGY_PATTERN_2_4_FREQ_2454
|
|
11
|
+
energy2400/output_power_test -12 0 3
|
|
12
|
+
energy2400/duty_cycle_test 1 50 75
|
|
13
|
+
energy2400/signal_indicator_test internal_brg brg0_rxtx_brg1_rxtx
|
|
14
|
+
|
|
15
|
+
# ------------- energy_sub1g -------------
|
|
16
|
+
energy_sub1g/pattern_test SUB1G_ENERGY_PATTERN_NO_ENERGIZING SUB1G_ENERGY_PATTERN_FCC_HOPPING SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500 SUB1G_ENERGY_PATTERN_NZ_HOPPING
|
|
17
|
+
energy_sub1g/duty_cycle_test 15 20 40 0
|
|
18
|
+
energy_sub1g/signal_indicator_test 60,4
|
|
19
|
+
|
|
20
|
+
# ------------- datapath -------------
|
|
21
|
+
datapath/rssi_threshold_test -80
|
|
22
|
+
datapath/pattern_test DATAPATH_PATTERN_38_38_39 DATAPATH_PATTERN_EU_PATTERN
|
|
23
|
+
datapath/tx_repetition_test 2 4
|
|
24
|
+
datapath/output_power_test -12 0 3
|
|
25
|
+
datapath/pkt_filter_test PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT
|
|
26
|
+
datapath/pkt_filter_gen3_test PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT
|
|
27
|
+
datapath/pkt_filter_ble5_test PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT
|
|
28
|
+
datapath/rx_channel_test RX_CHANNEL_37 RX_CHANNEL_38 RX_CHANNEL_10_250K RX_CHANNEL_10_500K
|
|
29
|
+
datapath/num_of_tags_test 500
|
|
30
|
+
datapath/stress_gen3_test rep1_adaptive_pacer
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# ------------- calibration -------------
|
|
34
|
+
calibration/output_power_test -12 0 3
|
|
35
|
+
calibration/interval_test 1 25 50
|
|
36
|
+
calibration/pattern_test CALIBRATION_PATTERN_38_38_39 CALIBRATION_PATTERN_DISABLE_BEACON
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# The certificate should run for every bridge change
|
|
2
|
+
# The setup will include 1 tested BRG + 1 GW connected with UART
|
|
3
|
+
# Run command example:
|
|
4
|
+
# python ut.py --gw SIM --brg <XXXXXXXXXXXX> --tl certificate_test_list.txt --data sim --port <COM_PORT>
|
|
5
|
+
|
|
6
|
+
# ------------- edge_mgmt -------------
|
|
7
|
+
edge_mgmt/stat_test
|
|
8
|
+
edge_mgmt/actions_test ACTION_GW_HB ACTION_BLINK ACTION_SEND_HB ACTION_GET_BATTERY_SENSOR ACTION_GET_POF_DATA ACTION_PL_STATUS ACTION_GET_MODULE ACTION_REBOOT ACTION_RESTORE_DEFAULTS
|
|
9
|
+
|
|
10
|
+
# ------------- energy2400 -------------
|
|
11
|
+
energy2400/pattern_test ENERGY_PATTERN_2_4_NO_ENERGIZING ENERGY_PATTERN_2_4_CHANNEL_37 ENERGY_PATTERN_2_4_CHANNEL_38 ENERGY_PATTERN_2_4_CHANNEL_39 ENERGY_PATTERN_2_4_FREQ_2450 ENERGY_PATTERN_2_4_FREQ_2454
|
|
12
|
+
energy2400/output_power_test -12 -8 -4 0 2 3
|
|
13
|
+
energy2400/duty_cycle_test 1 25 50 75
|
|
14
|
+
energy2400/signal_indicator_test internal_brg rssi_threshold brg0_rx_brg1_tx brg0_none_brg1_rx brg0_rxtx_brg1_rxtx brg0_tx_brg1_none
|
|
15
|
+
|
|
16
|
+
# ------------- energy_sub1g -------------
|
|
17
|
+
energy_sub1g/pattern_test SUB1G_ENERGY_PATTERN_NO_ENERGIZING SUB1G_ENERGY_PATTERN_SINGLE_TONE_915000 SUB1G_ENERGY_PATTERN_FCC_HOPPING SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500 SUB1G_ENERGY_PATTERN_NZ_HOPPING
|
|
18
|
+
energy_sub1g/duty_cycle_test 15 20 40 0
|
|
19
|
+
energy_sub1g/signal_indicator_test 60,4 100,3
|
|
20
|
+
|
|
21
|
+
# ------------- datapath -------------
|
|
22
|
+
datapath/rssi_threshold_test -80 -65 -10
|
|
23
|
+
datapath/pattern_test DATAPATH_PATTERN_38_38_39 DATAPATH_PATTERN_EU_PATTERN
|
|
24
|
+
datapath/tx_repetition_test 2 4
|
|
25
|
+
datapath/output_power_test -12 -8 -4 0 2 3
|
|
26
|
+
datapath/pacer_interval_test 5 15 30 60
|
|
27
|
+
datapath/pacer_interval_ble5_test 5 15 30 60
|
|
28
|
+
datapath/pkt_filter_test PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT PKT_FILTER_ADVANCED_PKT PKT_FILTER_TEMP_AND_ADVANCED_PKTS PKT_FILTER_TEMP_ADVANCED_AND_DEBUG_PKTS
|
|
29
|
+
datapath/pkt_filter_gen3_test PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT PKT_FILTER_ADVANCED_PKT PKT_FILTER_TEMP_AND_ADVANCED_PKTS
|
|
30
|
+
datapath/pkt_filter_ble5_test PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT PKT_FILTER_DISABLE_FORWARDING PKT_FILTER_TEMP_PKT PKT_FILTER_ADVANCED_PKT PKT_FILTER_TEMP_AND_ADVANCED_PKTS
|
|
31
|
+
datapath/rx_channel_test RX_CHANNEL_37 RX_CHANNEL_38 RX_CHANNEL_39 RX_CHANNEL_10_250K RX_CHANNEL_10_500K
|
|
32
|
+
datapath/rx_rate_gen2_test mid_values diff_pacer min_value max_value diff_rate
|
|
33
|
+
datapath/rx_rate_gen3_test mid_values diff_pacer min_value max_value diff_rate
|
|
34
|
+
datapath/num_of_tags_test 2500
|
|
35
|
+
datapath/pacer_interval_tags_count_test 1 10 15 30
|
|
36
|
+
datapath/stress_test rep3 rep2 rep1 rep1_adaptive_pacer pixel_burst
|
|
37
|
+
datapath/stress_gen3_test rep3 rep2 rep1 rep1_adaptive_pacer pixel_burst
|
|
38
|
+
|
|
39
|
+
# ------------- calibration -------------
|
|
40
|
+
calibration/output_power_test -12 -8 -4 0 2 3
|
|
41
|
+
calibration/interval_test 1 25 50
|
|
42
|
+
calibration/pattern_test CALIBRATION_PATTERN_38_38_39 CALIBRATION_PATTERN_STANDARD CALIBRATION_PATTERN_EU_PATTERN CALIBRATION_PATTERN_DISABLE_BEACON
|
|
43
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
|
|
2
|
+
## Downloading and Running a Mosquitto MQTT Broker Locally
|
|
3
|
+
|
|
4
|
+
This guide will walk you through the process of downloading and running the Mosquitto MQTT broker on your local machine.
|
|
5
|
+
|
|
6
|
+
__Step 1:__ Download Mosquitto
|
|
7
|
+
|
|
8
|
+
For Windows:
|
|
9
|
+
1. Visit the Mosquitto website download page: https://mosquitto.org/download/
|
|
10
|
+
2. Download the latest Windows installer (mosquitto-{version}-install-windows-x64.exe).
|
|
11
|
+
3. Run the installer and follow the installation steps.
|
|
12
|
+
- <strong style="color:red">IMPORTANT NOTE:</strong> Make sure to check the option to add Mosquitto to your system's PATH during installation!
|
|
13
|
+
4. The default installation path is C:\Program Files\mosquitto.
|
|
14
|
+
|
|
15
|
+
For Linux (Ubuntu/Debian):
|
|
16
|
+
1. Open the terminal.
|
|
17
|
+
2. Run the following commands to install Mosquitto and the client utilities:
|
|
18
|
+
```bash
|
|
19
|
+
sudo apt update
|
|
20
|
+
sudo apt install mosquitto mosquitto-clients
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For macOS:
|
|
24
|
+
1. Install Homebrew if you don’t have it by running:
|
|
25
|
+
```bash
|
|
26
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
27
|
+
```
|
|
28
|
+
2. Run the following command to install Mosquitto:
|
|
29
|
+
```bash
|
|
30
|
+
brew install mosquitto
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
__Step 2:__ Start the Mosquitto Broker
|
|
34
|
+
|
|
35
|
+
For Windows:
|
|
36
|
+
1. Open the Command Prompt or PowerShell.
|
|
37
|
+
2. Navigate to the Mosquitto installation folder, if it’s not added to your PATH:
|
|
38
|
+
```bash
|
|
39
|
+
cd "C:\Program Files\mosquitto"
|
|
40
|
+
```
|
|
41
|
+
3. Run the Mosquitto broker:
|
|
42
|
+
```bash
|
|
43
|
+
mosquitto
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For Linux (Ubuntu/Debian):
|
|
47
|
+
1. Start the Mosquitto service:
|
|
48
|
+
```bash
|
|
49
|
+
sudo systemctl start mosquitto
|
|
50
|
+
```
|
|
51
|
+
Or, to run it manually for testing:
|
|
52
|
+
```bash
|
|
53
|
+
mosquitto -v
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For macOS:
|
|
57
|
+
1. Start Mosquitto using the terminal:
|
|
58
|
+
```bash
|
|
59
|
+
mosquitto -v
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
__Step 3:__ Test the Mosquitto Broker
|
|
63
|
+
|
|
64
|
+
You can test the broker by publishing and subscribing to a topic.
|
|
65
|
+
|
|
66
|
+
Open two terminal windows:
|
|
67
|
+
|
|
68
|
+
1. In the first window (Subscriber):
|
|
69
|
+
```bash
|
|
70
|
+
mosquitto_sub -t test/topic
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
2. In the second window (Publisher):
|
|
74
|
+
```bash
|
|
75
|
+
mosquitto_pub -t test/topic -m "Hello, MQTT!"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If everything works correctly, you should see the message "Hello, MQTT!" in the subscriber window.
|
|
79
|
+
|
|
80
|
+
__Step 4:__ Enable Mosquitto on Startup (Optional)
|
|
81
|
+
|
|
82
|
+
For Linux (Ubuntu/Debian):
|
|
83
|
+
To make Mosquitto start automatically on boot:
|
|
84
|
+
```bash
|
|
85
|
+
sudo systemctl enable mosquitto
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
__Step 5:__ Stop the Mosquitto Broker
|
|
89
|
+
|
|
90
|
+
To stop the broker, use CTRL+C in the terminal where it’s running or stop the service:
|
|
91
|
+
|
|
92
|
+
For Linux:
|
|
93
|
+
```bash
|
|
94
|
+
sudo systemctl stop mosquitto
|
|
95
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"customBroker" : true,
|
|
3
|
+
"port" : 8883,
|
|
4
|
+
"brokerUrl" : "mqtts://mqtt.us-east-2.dev.wiliot.cloud",
|
|
5
|
+
"username" : "wiliot",
|
|
6
|
+
"password" : "wiliot",
|
|
7
|
+
"updateTopic" : "update-test/wiliot/",
|
|
8
|
+
"statusTopic" : "status-test/wiliot/",
|
|
9
|
+
"dataTopic" : "data-test/wiliot/"
|
|
10
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import argparse
|
|
3
|
+
import brg_certificate.cert_common as cert_common
|
|
4
|
+
from brg_certificate.cert_utils import *
|
|
5
|
+
|
|
6
|
+
os.system('')
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
|
|
10
|
+
parser = argparse.ArgumentParser(description='Process some integers.')
|
|
11
|
+
parser.add_argument('--brg', '-b', required=True, help='Bridge id to restore')
|
|
12
|
+
parser.add_argument('--gw', '-g', required=True, help='GW id to use')
|
|
13
|
+
args = parser.parse_args()
|
|
14
|
+
utPrint(str(args.__dict__))
|
|
15
|
+
|
|
16
|
+
mqttc = cert_mqtt.mqttc_init(args.gw, data="sim")
|
|
17
|
+
brg = Bridge(args.brg)
|
|
18
|
+
test = WltTest("", args.gw, mqttc, brg0=brg, server="prod")
|
|
19
|
+
|
|
20
|
+
utPrint(SEP)
|
|
21
|
+
utPrint(f"Getting GW {args.gw} Information", "BLUE")
|
|
22
|
+
response = cert_common.get_gw_info(test)
|
|
23
|
+
if response == NO_RESPONSE:
|
|
24
|
+
error = f"ERROR: Didn't get response from {args.gw} !"
|
|
25
|
+
utPrint(error, "red")
|
|
26
|
+
sys.exit(-1)
|
|
27
|
+
else:
|
|
28
|
+
if ENTRIES in response[GW_INFO]:
|
|
29
|
+
test.protobuf = True
|
|
30
|
+
|
|
31
|
+
utPrint(SEP)
|
|
32
|
+
utPrint(f"Getting BRG {brg.id_str} interface pkt", "BLUE")
|
|
33
|
+
test, _ = cert_common.get_module_if_pkt(test)
|
|
34
|
+
if test.rc == TEST_PASSED:
|
|
35
|
+
utPrint("Success! Done!", "green")
|
|
36
|
+
sys.exit(0)
|
|
37
|
+
else:
|
|
38
|
+
error = f"ERROR: Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}!"
|
|
39
|
+
utPrint(error, "red")
|
|
40
|
+
# Send restore defaults for 16 seconds
|
|
41
|
+
test.rc = TEST_PASSED
|
|
42
|
+
print(f"\nSending {ag.ACTIONS_DICT[ag.ACTION_RESTORE_DEFAULTS]}{test.active_brg.api_version} for 16 seconds")
|
|
43
|
+
action_pkt = cert_config.get_default_brg_pkt(test, pkt_type=eval_pkt(f'{ag.ACTIONS_DICT[ag.ACTION_RESTORE_DEFAULTS]}{test.active_brg.api_version}'))
|
|
44
|
+
cert_config.gw_downlink(test, raw_tx_data=action_pkt.dump(), max_retries=cert_config.BLE5_MAX_RETRIES*2)
|
|
45
|
+
|
|
46
|
+
print("Waiting for 16*2 seconds broadcast + 30 seconds reboot!")
|
|
47
|
+
for _ in range(16*2 + 30):
|
|
48
|
+
print_update_wait(1)
|
|
49
|
+
test, _ = cert_common.get_module_if_pkt(test)
|
|
50
|
+
if test.rc == TEST_PASSED:
|
|
51
|
+
utPrint("Success! Done!", "green")
|
|
52
|
+
sys.exit(0)
|
|
53
|
+
else:
|
|
54
|
+
error = f"ERROR: Still Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}!"
|
|
55
|
+
utPrint(error, "red")
|
|
56
|
+
sys.exit(-1)
|
|
57
|
+
|
|
58
|
+
if __name__ == "__main__":
|
|
59
|
+
main()
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "interval_test",
|
|
3
|
+
"module": "calibration",
|
|
4
|
+
"purpose": "Test configuration for all supported calibration interval values",
|
|
5
|
+
"documentaion": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Calibration-Module",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [1, 25, 50, 100, 255]
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
|
|
8
|
+
def run(test):
|
|
9
|
+
|
|
10
|
+
fields = [BRG_CALIB_INTERVAL]
|
|
11
|
+
calib_module = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
|
|
12
|
+
|
|
13
|
+
test = cert_common.test_prolog(test)
|
|
14
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
15
|
+
return cert_common.test_epilog(test)
|
|
16
|
+
for param in test.params:
|
|
17
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
|
|
18
|
+
# param epilog
|
|
19
|
+
generate_log_file(test, param.name)
|
|
20
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
|
+
test.set_phase_rc(param.name, test.rc)
|
|
22
|
+
test.add_phase_reason(param.name, test.reason)
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result()
|
|
27
|
+
|
|
28
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "output_power_test",
|
|
3
|
+
"module": "calibration",
|
|
4
|
+
"purpose": "Test configuration for all supported calibration output power values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["OUTPUT_POWER_2_4_NEG_12", "OUTPUT_POWER_2_4_NEG_8", "OUTPUT_POWER_2_4_NEG_4", "OUTPUT_POWER_2_4_POS_0", "OUTPUT_POWER_2_4_POS_2", "OUTPUT_POWER_2_4_POS_3"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
|
|
8
|
+
def run(test):
|
|
9
|
+
|
|
10
|
+
fields = [BRG_OUTPUT_POWER]
|
|
11
|
+
calib_module = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
|
|
12
|
+
|
|
13
|
+
test = cert_common.test_prolog(test)
|
|
14
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
15
|
+
return cert_common.test_epilog(test)
|
|
16
|
+
|
|
17
|
+
for param in test.params:
|
|
18
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
|
|
19
|
+
generate_log_file(test, param.name)
|
|
20
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
|
+
test.set_phase_rc(param.name, test.rc)
|
|
22
|
+
test.add_phase_reason(param.name, test.reason)
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result()
|
|
27
|
+
|
|
28
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pattern_test",
|
|
3
|
+
"module": "calibration",
|
|
4
|
+
"purpose": "Test configuration for all supported calibration pattern values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations and received packets sanity check (for specific patterns)", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and packets received only on included channels. When configuring the brg to CALIBRATION_PATTERN_38_38_39 we configure the GW to rx channel 37 and make sure GW doesn't get any pixels",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["CALIBRATION_PATTERN_STANDARD", "CALIBRATION_PATTERN_38_38_39", "CALIBRATION_PATTERN_EU_PATTERN", "CALIBRATION_PATTERN_DISABLE_BEACON"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
|
|
8
|
+
def run(test):
|
|
9
|
+
|
|
10
|
+
fields = [BRG_PATTERN]
|
|
11
|
+
calib_module = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
|
|
12
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
13
|
+
|
|
14
|
+
test = cert_common.test_prolog(test)
|
|
15
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
16
|
+
return cert_common.test_epilog(test)
|
|
17
|
+
|
|
18
|
+
for param in test.params:
|
|
19
|
+
if param.value == ag.CALIBRATION_PATTERN_38_38_39:
|
|
20
|
+
utPrint("\nCALIBRATION_PATTERN_38_38_39 was configured - checking the GW doesn't receive tag packets", "BLUE")
|
|
21
|
+
# Config internal_brg's rx_channel to CHANNEL_37
|
|
22
|
+
test = cert_config.internal_brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_37], module=datapath_module)[0]
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
# Configure the BRG, wait=False
|
|
26
|
+
test = cert_config.brg_configure(test, fields=[BRG_PATTERN, BRG_CALIB_INTERVAL],
|
|
27
|
+
values=[param.value, 1], module=calib_module, wait=False)[0]
|
|
28
|
+
cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
|
|
29
|
+
# MQTT scan
|
|
30
|
+
if test.data == DATA_SIMULATION:
|
|
31
|
+
# start generating pkts and send them using data simulator
|
|
32
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=10, duplicates=1, delay=100, pkt_types=[0])
|
|
33
|
+
pixel_sim_thread.start()
|
|
34
|
+
df = cert_common.data_scan(test, gw_data=True, brg_data=True, scan_time=(40))
|
|
35
|
+
if test.data == DATA_SIMULATION:
|
|
36
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
37
|
+
pixel_sim_thread.stop()
|
|
38
|
+
time.sleep(5)
|
|
39
|
+
|
|
40
|
+
# Analyze pass/fail
|
|
41
|
+
gw_tags_pkts = len(df.query('src_id == gw_id'))
|
|
42
|
+
brg_tags_pkts = len(df.query('src_id != gw_id'))
|
|
43
|
+
print(f"Found gw_tags_pkts={gw_tags_pkts}, brg_tags_pkts={brg_tags_pkts}")
|
|
44
|
+
if (gw_tags_pkts == 0 and test.data == DATA_REAL_TAGS) or brg_tags_pkts != 0:
|
|
45
|
+
test.rc = TEST_FAILED
|
|
46
|
+
test.add_reason(f"gw_tags_pkts={gw_tags_pkts} brg_tags_pkts={brg_tags_pkts} for BRG 38,38,39 calibration, "
|
|
47
|
+
"and GW scanning on ch 37")
|
|
48
|
+
break
|
|
49
|
+
# Revert internal_brg
|
|
50
|
+
test = cert_config.internal_brg_configure(test, module=datapath_module)[0]
|
|
51
|
+
generate_log_file(test, param.name)
|
|
52
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
53
|
+
test.set_phase_rc(param.name, test.rc)
|
|
54
|
+
test.add_phase_reason(param.name, test.reason)
|
|
55
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
56
|
+
break
|
|
57
|
+
else:
|
|
58
|
+
test.reset_result()
|
|
59
|
+
else:
|
|
60
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
|
|
61
|
+
generate_log_file(test, param.name)
|
|
62
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
63
|
+
test.set_phase_rc(param.name, test.rc)
|
|
64
|
+
test.add_phase_reason(param.name, test.reason)
|
|
65
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
66
|
+
break
|
|
67
|
+
else:
|
|
68
|
+
test.reset_result()
|
|
69
|
+
|
|
70
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module, datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adaptive_pacer_algo_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test the adaptive pacer algorithm",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Turn on adaptive pacer and configure bridge to encourage adaptive pacer algorithm activation", "Wait for tx repetition algorithm to work and then activate pacing algorithm", "Check effective pacer incrementation is stable", "Test actual tags pacing interval", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All configurations completed successfully and adaptive pacing works as expected",
|
|
9
|
+
"mandatory": 0,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# This test check for the algo of the adaptive pacer - run with 1 gw & 1 brg
|
|
2
|
+
# In order to have a lot of stress on the BRG you best use ble sim with pacer_algo_test_pkts.csv
|
|
3
|
+
from brg_certificate.cert_prints import *
|
|
4
|
+
from brg_certificate.cert_defines import *
|
|
5
|
+
from brg_certificate.wlt_types import *
|
|
6
|
+
import brg_certificate.cert_common as cert_common
|
|
7
|
+
import brg_certificate.cert_config as cert_config
|
|
8
|
+
|
|
9
|
+
def effective_pacer_increment_highest_get(test):
|
|
10
|
+
cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
|
|
11
|
+
test, mgmt_pkts = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
12
|
+
highest = 0
|
|
13
|
+
if mgmt_pkts:
|
|
14
|
+
for p in mgmt_pkts:
|
|
15
|
+
if p[MGMT_PKT].pkt.effective_pacer_increment:
|
|
16
|
+
highest = p[MGMT_PKT].pkt.effective_pacer_increment if p[MGMT_PKT].pkt.effective_pacer_increment > highest else highest
|
|
17
|
+
return highest
|
|
18
|
+
|
|
19
|
+
def run(test):
|
|
20
|
+
|
|
21
|
+
fields = [BRG_ADAPTIVE_PACER, BRG_PACER_INTERVAL, BRG_PKT_FILTER, BRG_TX_REPETITION]
|
|
22
|
+
values = [ag.ADAPTIVE_PACER_ON, 1, ag.PKT_FILTER_TEMP_ADVANCED_AND_DEBUG_PKTS, 1]
|
|
23
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
24
|
+
calib_module = eval_pkt(f'ModuleCalibrationV{test.active_brg.api_version}')
|
|
25
|
+
|
|
26
|
+
test = cert_common.test_prolog(test)
|
|
27
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
28
|
+
return cert_common.test_epilog(test)
|
|
29
|
+
|
|
30
|
+
# Turn on adaptive pacer and set cfgs to help activating adaptive pacer algo
|
|
31
|
+
test = cert_config.brg_configure(test, fields=fields, values=values, module=datapath_module)[0]
|
|
32
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
33
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
34
|
+
test = cert_config.brg_configure(test, fields=[BRG_CALIB_INTERVAL], values=[30], module=calib_module)[0]
|
|
35
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
36
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
|
|
37
|
+
|
|
38
|
+
# Wait for tx rep algo to work & then activate pacing algo
|
|
39
|
+
# Checking effective_pacer_increment every minute untill its
|
|
40
|
+
# stable for 3 mins to start checking tags actual pacing
|
|
41
|
+
effective_pacer_increment = False
|
|
42
|
+
last_incarement = 0
|
|
43
|
+
count = 0
|
|
44
|
+
for i in range(10):
|
|
45
|
+
effective_pacer_increment = effective_pacer_increment_highest_get(test)
|
|
46
|
+
print(f"Current eff_pacer_increment = {effective_pacer_increment}, i = {i}")
|
|
47
|
+
|
|
48
|
+
if effective_pacer_increment == 0:
|
|
49
|
+
if i == 10:
|
|
50
|
+
test.rc == TEST_FAILED
|
|
51
|
+
test.add_reason("The effective_pacer_increment is 0 after 10 minutes")
|
|
52
|
+
return cert_common.test_epilog(test)
|
|
53
|
+
cert_common.wait_time_n_print(15)
|
|
54
|
+
continue
|
|
55
|
+
|
|
56
|
+
if last_incarement == effective_pacer_increment:
|
|
57
|
+
count += 1
|
|
58
|
+
if count == 3:
|
|
59
|
+
break
|
|
60
|
+
else:
|
|
61
|
+
last_incarement = effective_pacer_increment
|
|
62
|
+
|
|
63
|
+
if count != 3:
|
|
64
|
+
test.rc == TEST_FAILED
|
|
65
|
+
test.add_reason("The effective_pacer_increment havn't been stable for 10 minutes")
|
|
66
|
+
return cert_common.test_epilog(test)
|
|
67
|
+
|
|
68
|
+
df = cert_common.data_scan(test, scan_time=60, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
69
|
+
cert_mqtt.dump_pkts(test, log=str(values))
|
|
70
|
+
cert_common.display_data(df, nfpkt=True, pkt_cntr_diff=True, cer_per_tag=True, name_prefix=test.module_name, dir=test.dir)
|
|
71
|
+
|
|
72
|
+
test = cert_common.pacing_analysis(test, df=df, pacer_interval=1+effective_pacer_increment)
|
|
73
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
74
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module, calib_module])
|
|
75
|
+
|
|
76
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module, calib_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "num_of_tags_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test pixels handling in the bridge for different amount of pixels",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Generate packets from the given amount of pixels & scan for packets in the bridge", "Compare received amount of pixels and the heartbeat pixels counter to the given value","Repeat for all given pixels amounts", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [500, 1000, 2500]
|
|
13
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
from brg_certificate.cert_prints import *
|
|
3
|
+
from brg_certificate.cert_defines import *
|
|
4
|
+
from brg_certificate.wlt_types import *
|
|
5
|
+
import brg_certificate.cert_common as cert_common
|
|
6
|
+
import brg_certificate.cert_config as cert_config
|
|
7
|
+
|
|
8
|
+
GW_CYCLE_TIME = 0.02 # GW sends BLE packet every 20 nsec
|
|
9
|
+
|
|
10
|
+
def run(test):
|
|
11
|
+
|
|
12
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
13
|
+
print(f"values: {[param.value for param in test.params]}")
|
|
14
|
+
|
|
15
|
+
test = cert_common.test_prolog(test)
|
|
16
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
17
|
+
return cert_common.test_epilog(test)
|
|
18
|
+
|
|
19
|
+
duplicates = 3
|
|
20
|
+
|
|
21
|
+
for param in test.params:
|
|
22
|
+
|
|
23
|
+
# The time it takes to send two cycles from the GW/DataSimThread
|
|
24
|
+
time_of_sending_pkts = duplicates * param.value * GW_CYCLE_TIME * 2
|
|
25
|
+
|
|
26
|
+
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[time_of_sending_pkts], module=datapath_module)[0]
|
|
27
|
+
if test.rc == TEST_FAILED and test.reason != TEST_SUCCESS:
|
|
28
|
+
return cert_common.test_epilog(test)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if test.data == DATA_SIMULATION:
|
|
32
|
+
# start generating pkts and send them using data simulator
|
|
33
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=param.value, duplicates=duplicates, delay=0, pkt_types=[0])
|
|
34
|
+
pixel_sim_thread.start()
|
|
35
|
+
|
|
36
|
+
df = cert_common.data_scan(test, scan_time=time_of_sending_pkts+5, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
37
|
+
|
|
38
|
+
if test.data == DATA_SIMULATION:
|
|
39
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
40
|
+
pixel_sim_thread.stop()
|
|
41
|
+
time.sleep(10)
|
|
42
|
+
|
|
43
|
+
cert_common.display_data(df, nfpkt=True, name_prefix=f"num_of_tags_{param.name}_", dir=test.dir)
|
|
44
|
+
|
|
45
|
+
num_of_tags = len(df[TAG_ID].unique())
|
|
46
|
+
print(f"Tags from DF: {num_of_tags}")
|
|
47
|
+
|
|
48
|
+
cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
|
|
49
|
+
test, mgmt_pkts = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
50
|
+
if not mgmt_pkts:
|
|
51
|
+
test.rc = TEST_FAILED
|
|
52
|
+
test.add_reason("Didn't find ACTION HB pkt")
|
|
53
|
+
break
|
|
54
|
+
|
|
55
|
+
num_of_tags_HB = mgmt_pkts[0][MGMT_PKT].pkt.tags_ctr
|
|
56
|
+
print(f"Tags from HB: {num_of_tags_HB}\n ")
|
|
57
|
+
|
|
58
|
+
cert_common.display_data(df, nfpkt=True, name_prefix=f"num_of_tags_{param.name}_", dir=test.dir)
|
|
59
|
+
|
|
60
|
+
# compare the numbers of tags that come from the brg, success in 95% from number of tags (value) or more.
|
|
61
|
+
if num_of_tags < (param.value*0.95):
|
|
62
|
+
test.rc = TEST_FAILED
|
|
63
|
+
test.add_reason(f"Found {num_of_tags} pixels instead of {param.name} pixels!")
|
|
64
|
+
test.add_reason(f"Note - HB was {num_of_tags_HB}")
|
|
65
|
+
|
|
66
|
+
# compare the counter tags in the HB packet
|
|
67
|
+
if num_of_tags_HB < param.value or num_of_tags_HB > (param.value + 100):
|
|
68
|
+
test.rc = TEST_FAILED
|
|
69
|
+
test.add_reason(f"pixels counter in HB packet is {num_of_tags_HB} instead of {param.name} pixels!")
|
|
70
|
+
test.add_reason(f"Note - tag counter field = {num_of_tags}")
|
|
71
|
+
|
|
72
|
+
# param epilog
|
|
73
|
+
time.sleep(10)
|
|
74
|
+
generate_log_file(test, param.name)
|
|
75
|
+
field_functionality_pass_fail_print(test, "num_of_tags", value=param.name)
|
|
76
|
+
test.set_phase_rc(param.name, test.rc)
|
|
77
|
+
test.add_phase_reason(param.name, test.reason)
|
|
78
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
79
|
+
break
|
|
80
|
+
else:
|
|
81
|
+
test.reset_result()
|
|
82
|
+
|
|
83
|
+
return cert_common.test_epilog(test)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "output_power_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test configuration for all supported datapath output power values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [-12, -8, -4, 0, 2, 3]
|
|
13
|
+
}
|