wiliot-certificate 1.5.3a1__py3-none-any.whl → 4.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.
Files changed (48) hide show
  1. brg_certificate/certificate_test_list.txt +2 -2
  2. brg_certificate/tests/calibration/interval_test/interval_test.py +6 -5
  3. brg_certificate/tests/calibration/output_power_test/output_power_test.py +6 -5
  4. brg_certificate/tests/calibration/pattern_test/pattern_test.py +18 -8
  5. brg_certificate/tests/datapath/aging_test/aging_test.py +10 -8
  6. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +10 -12
  7. brg_certificate/tests/datapath/output_power_test/output_power_test.py +6 -4
  8. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +12 -7
  9. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +10 -3
  10. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +11 -9
  11. brg_certificate/tests/datapath/pattern_test/pattern_test.py +6 -5
  12. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +12 -9
  13. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +12 -9
  14. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +12 -10
  15. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +12 -10
  16. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +6 -6
  17. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +33 -34
  18. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +40 -43
  19. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +1 -2
  20. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +6 -8
  21. brg_certificate/tests/datapath/stress_test/stress_test.json +1 -2
  22. brg_certificate/tests/datapath/stress_test/stress_test.py +7 -9
  23. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +13 -10
  24. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +6 -4
  25. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +6 -4
  26. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +6 -4
  27. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +6 -4
  28. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +6 -4
  29. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +6 -5
  30. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +6 -4
  31. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +6 -5
  32. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +6 -5
  33. gw_certificate/common/wltPb_pb2.py +4 -4
  34. gw_certificate/common/wltPb_pb2.pyi +2 -1
  35. gw_certificate/interface/{4.4.82_app.zip → 4.4.88_app.zip} +0 -0
  36. gw_certificate/interface/{4.4.82_sd_bl_app.zip → 4.4.88_sd_bl_app.zip} +0 -0
  37. gw_certificate/interface/ble_simulator.py +5 -3
  38. gw_certificate/interface/uart_if.py +6 -4
  39. gw_certificate/tests/actions.py +1 -1
  40. gw_certificate/tests/static/generated_packet_table.py +16 -16
  41. gw_certificate/tests/static/packet_table.csv +10052 -10052
  42. gw_certificate/tests/throughput.py +2 -1
  43. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/METADATA +1 -1
  44. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/RECORD +48 -48
  45. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/WHEEL +0 -0
  46. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/entry_points.txt +0 -0
  47. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/licenses/LICENSE +0 -0
  48. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0a1.dist-info}/top_level.txt +0 -0
@@ -11,7 +11,7 @@ import time
11
11
  def cal_scan_time(test, delay, pacer_interval):
12
12
  # Calculate the scan time to ensure at least 5 packets are captured in data scan
13
13
  # define the num of packet that you want to get
14
- num_of_sending_pkt = 3 # actually it will be 3 because the first one always send
14
+ num_of_sending_pkt = 2 # actually it will be 3 because the first one always send
15
15
  delay = delay / 1000
16
16
  if delay < pacer_interval:
17
17
  scan_time = (pacer_interval * num_of_sending_pkt) + 10
@@ -34,8 +34,8 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
34
34
  pixel_sim_thread.stop()
35
35
  cert_mqtt.dump_pkts(test, log="rx_rate")
36
36
  cert_common.display_data(df, tbc=True, nfpkt=True, rssi=True, dir=test.dir)
37
-
38
- if df.empty:
37
+ # check if the dataframe is empty or not
38
+ if len(df) <= 1:
39
39
  print("Df is empty")
40
40
  test.rc = TEST_FAILED
41
41
  test.add_reason("Df is empty")
@@ -48,11 +48,16 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
48
48
  print(f"Most common tag: {most_common_tag}")
49
49
  df = df[df[TAG_ID] == most_common_tag]
50
50
  df = df[[TAG_ID, TBC, PACKET_TYPE, DATETIME]]
51
+ length = len(df)
52
+ mid_index = int(length // 2)
53
+ if mid_index == 0:
54
+ mid_index = 1
55
+ print(f"Length of df: {length}, mid index: {mid_index}")
51
56
  print(f"df:\n {df}")
52
57
 
53
58
  tag = df.iloc[0][TAG_ID]
54
59
  # iloc [1:] to skip the first value of tbc_values which could be 0 sometimes.
55
- actual_address_value = round(df.iloc[1:][TBC].mean(), 2) # extract the tbc value from df
60
+ actual_address_value = round(df.iloc[mid_index:][TBC].mean(), 2) # extract the tbc value from df
56
61
  print(f"\nactual address value: {actual_address_value}\nexpected address value: {expected_address_value}")
57
62
  THRESHOLD_ADDRESS_VALUE = 5
58
63
  # check if the actual address value is in the range of -+5 of the expected address value
@@ -128,29 +133,28 @@ def max_value(test, datapath_module):
128
133
  def diff_rate(test, datapath_module):
129
134
  # diff rate - a filter: Generate packets with delay 1 and change to 5, according the delay change test the tolerance address value
130
135
  pacer_interval = 1
131
- delay = {500: 5, 3000: 30} # key=delay and value = the duration it will be activated
132
- first_delay = list(delay.keys())[0]
133
- first_duration = list(delay.values())[0]
134
- second_delay = list(delay.keys())[1]
135
-
136
+ delay_duration = [[500, 5], [3000, 3]]
137
+ first_delay = delay_duration[0][0]
138
+ first_duration = delay_duration[0][1]
139
+ second_delay = delay_duration[1][0]
136
140
  test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
137
141
  if test.rc == TEST_FAILED:
138
142
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
139
143
  return test
140
- pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=3,
144
+ pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=2,
141
145
  delay=first_delay, pkt_types=[0], pixels_type=GEN3)
142
146
  pixel_sim_thread.start()
143
147
  time_sleep = first_duration - ((first_delay / 1000) / 2)
144
148
  print(f"sleep for {time_sleep} sec\n")
145
149
  time.sleep(time_sleep)
146
150
  pixel_sim_thread.delay = second_delay
147
- print(f"changing delay value to {second_delay}\n")
148
- scan_time = sum(delay.values()) + 20
151
+ scan_time = sum(duration for _, duration in delay_duration) + 20
149
152
  df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
150
153
  pixel_sim_thread.stop()
151
154
  df = df[[TAG_ID, TBC]]
155
+ lenght = len(df)
152
156
 
153
- if df.empty:
157
+ if len(df) <= 1:
154
158
  test.add_reason("Df is empty")
155
159
  test.rc = TEST_FAILED
156
160
  return test
@@ -158,35 +162,27 @@ def diff_rate(test, datapath_module):
158
162
  print(f"Df:\n {df}")
159
163
  # NOTE: all next rows are specific for the values: delay 0.5 and 3, and in relation address values 128 and 235
160
164
  # check if the last tbc value is as we expected for delay 3 sec we need to get 235 according to LUT table
161
- # we define tolerance of +-2 units for address value
165
+ # we define tolerance of +-10 units for address value
166
+
167
+ # Most important check, verify it converges to the correct value
162
168
  if df.iloc[-1][TBC] not in range(232, 237):
163
169
  test.rc = TEST_FAILED
164
170
  test.add_reason(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236]")
165
171
  print(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236] according to delay:{second_delay / 1000} sec")
166
- # skip the first packet in case the second one is still from the last delay value
167
- index = 0
168
- if df.iloc[1][TBC] in range(232, 237):
169
- index = 1
170
-
171
- # verify the first tbc value
172
- first_tbc = df.iloc[index][TBC]
173
- if first_tbc not in range(120, 145):
174
- test.rc = TEST_FAILED
175
- test.add_reason(f"TBC value: {first_tbc}, expected value [120,144]")
176
- print(f"TBC value of last packet before the delay change is wrong\n"
177
- f"TBC value: {first_tbc}, expected value [120,144] according to delay:{first_delay / 1000} sec")
178
-
179
- # check the first change of tbc value after delay changing which is verify the calculation of alpha filter
180
- second_tbc = df.iloc[index + 1][TBC]
181
- expected_address_value = 200
182
- # 4 is equal to 0.09 sec error
183
- threshold = 4 # 2 equal to 0.04 sec error
184
- if not expected_address_value - threshold <= second_tbc <= expected_address_value + threshold:
172
+ return test
173
+ # for loop that skip the first row and check if somewhere there is the expected gap 130 to 200
174
+ result = False
175
+ for i in range(0, lenght - 1):
176
+ prev = df.iloc[i][TBC]
177
+ current = df.iloc[i + 1][TBC]
178
+ if prev in range(120, 140) and current in range(190, 210):
179
+ print(f"Found the gap between {prev} and {current}")
180
+ print(f"row {i}: {df.iloc[i][TBC]}")
181
+ print(f"row {i + 1}: {df.iloc[i + 1][TBC]}")
182
+ result = True
183
+ if not result:
185
184
  test.rc = TEST_FAILED
186
- test.add_reason(f"TBC value: {second_tbc}, expected value [196,204]")
187
- print(f"first change of address value is wrong.\n"
188
- f"alpha filter probably is not define well\n"
189
- f"TBC value: {second_tbc}, expected value [196,204]")
185
+ test.add_reason("Didn't find the correct gap according to alpha filter calculation")
190
186
  return test
191
187
 
192
188
 
@@ -201,7 +197,7 @@ def run(test):
201
197
  test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
202
198
  if test.rc == TEST_FAILED:
203
199
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
204
- return test
200
+ return cert_common.test_epilog(test)
205
201
 
206
202
  RX_RATE_TEST_MAP = {"mid_values": mid_values, "diff_pacer": diff_pacer, "min_value": min_value,
207
203
  "max_value": max_value, "diff_rate": diff_rate}
@@ -212,9 +208,10 @@ def run(test):
212
208
  field_functionality_pass_fail_print(test, param.name)
213
209
  test.set_phase_rc(param.name, test.rc)
214
210
  test.add_phase_reason(param.name, test.reason)
215
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
216
- break
217
- else:
218
- test.reset_result()
219
-
211
+ if test.rc == TEST_FAILED:
212
+ if test.exit_on_param_failure:
213
+ break # break the whole for loop and keep the test as failed
214
+ else:
215
+ test.reset_result() # reset result and continue to next param
216
+ continue
220
217
  return cert_common.test_epilog(test)
@@ -11,12 +11,11 @@
11
11
  "rep 3 - config pacer interval 22, then check repetition value = 3, pacer increment = 0, num of tags = all tags",
12
12
  "rep 2 - config pacer interval 12, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
13
13
  "rep 1 - config pacer interval 7, then check repetition value = 1, pacer increment = 0, num of tags = all tags",
14
- "rep 1 adaptive pacer - config pacer interval 1, then check repetition value = 1, pacer increment = 3 , num of tags = all tags",
15
14
  "Test epilog"],
16
15
  "expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
17
16
  "mandatory": 1,
18
17
  "multiBridgeTest": 0,
19
18
  "gwOnlyTest": 0,
20
19
  "internalBridge": 0,
21
- "allSupportedValues": ["rep3", "rep2", "rep1", "rep1_adaptive_pacer"]
20
+ "allSupportedValues": ["rep3", "rep2", "rep1"]
22
21
  }
@@ -172,10 +172,7 @@ def run(test):
172
172
  # config GW deduplication pkts = 0
173
173
  print("Configuring GW with !deduplication_pkts 0")
174
174
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
175
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
176
- return cert_common.test_epilog(test, revert_gws=True)
177
-
178
- STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1, "rep1_adaptive_pacer": rep1_adaptive_pacer}
175
+ STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1}
179
176
  num_of_pixels = 300
180
177
  pixel_sim_thread = cert_data_sim.DataSimThread(test=test,
181
178
  num_of_pixels=num_of_pixels,
@@ -192,10 +189,11 @@ def run(test):
192
189
  field_functionality_pass_fail_print(test, param.name)
193
190
  test.set_phase_rc(param.name, test.rc)
194
191
  test.add_phase_reason(param.name, test.reason)
195
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
196
- break
197
- else:
198
- test.reset_result()
192
+ if test.rc == TEST_FAILED:
193
+ if test.exit_on_param_failure:
194
+ break
195
+ else:
196
+ test.reset_result()
199
197
  time.sleep(5)
200
198
  pixel_sim_thread.stop()
201
199
  # Re-enable unified packets deduplication
@@ -11,12 +11,11 @@
11
11
  "rep 3 - config pacer interval 22, then check repetition value = 3, pacer increment = 0, num of tags = all tags",
12
12
  "rep 2 - config pacer interval 12, then check repetition value = 2, pacer increment = 0, num of tags = all tags",
13
13
  "rep 1 - config pacer interval 7, then check repetition value = 1, pacer increment = 0, num of tags = all tags",
14
- "rep 1 adaptive pacer - config pacer interval 1, then check repetition value = 1, pacer increment = 3 , num of tags = all tags",
15
14
  "Test epilog"],
16
15
  "expectedOutcome": "all metrics values will be as expected then the bridge is working correctly and the algorithms are working correctly",
17
16
  "mandatory": 1,
18
17
  "multiBridgeTest": 0,
19
18
  "gwOnlyTest": 0,
20
19
  "internalBridge": 0,
21
- "allSupportedValues": ["rep3", "rep2", "rep1", "rep1_adaptive_pacer"]
20
+ "allSupportedValues": ["rep3", "rep2", "rep1"]
22
21
  }
@@ -96,7 +96,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
96
96
  test = metric_checking_HB(test, check, hbs, tx_queue_expected, pacer_increment_expected)
97
97
  return test
98
98
  else:
99
- # in case it failed because the repetition value.
99
+ # in case it failed because the repetition value. the reason has been added in the metric_checking_df function
100
100
  return test
101
101
 
102
102
  time.sleep(30)
@@ -172,10 +172,7 @@ def run(test):
172
172
  # config GW deduplication pkts = 0
173
173
  print("Configuring GW with !deduplication_pkts 0")
174
174
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
175
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
176
- return cert_common.test_epilog(test, revert_gws=True)
177
-
178
- STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1, "rep1_adaptive_pacer": rep1_adaptive_pacer}
175
+ STRESS_TEST_MAP = {"rep3": rep3, "rep2": rep2, "rep1": rep1}
179
176
  num_of_pixels = 300
180
177
  pixel_sim_thread = cert_data_sim.DataSimThread(test=test,
181
178
  num_of_pixels=num_of_pixels,
@@ -192,10 +189,11 @@ def run(test):
192
189
  field_functionality_pass_fail_print(test, param.name)
193
190
  test.set_phase_rc(param.name, test.rc)
194
191
  test.add_phase_reason(param.name, test.reason)
195
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
196
- break
197
- else:
198
- test.reset_result()
192
+ if test.rc == TEST_FAILED:
193
+ if test.exit_on_param_failure:
194
+ break
195
+ else:
196
+ test.reset_result()
199
197
  time.sleep(5)
200
198
  pixel_sim_thread.stop()
201
199
  # Re-enable unified packets deduplication
@@ -58,24 +58,27 @@ def run(test):
58
58
 
59
59
  print("Configuring GW with !deduplication_pkts 0")
60
60
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
61
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
62
- return cert_common.test_epilog(test, revert_gws=True)
63
61
 
64
62
  for param in test.params:
65
63
  test = cert_config.brg_configure(test, fields=fields,
66
64
  values=[param.value, ag.PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT, ag.RX_CHANNEL_37],
67
65
  module=datapath_module)[0]
68
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
69
- break
66
+ if test.rc == TEST_FAILED:
67
+ if test.exit_on_param_failure:
68
+ break # break the whole for loop and keep the test as failed
69
+ else:
70
+ test.reset_result() # reset result and continue to next param
71
+ continue
70
72
  tx_repetitions_analysis(test, param.name)
71
73
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
72
74
  test.set_phase_rc(param.name, test.rc)
73
75
  test.add_phase_reason(param.name, test.reason)
74
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
75
- break
76
- else:
77
- test.reset_result()
78
-
76
+ if test.rc == TEST_FAILED:
77
+ if test.exit_on_param_failure:
78
+ break # break the whole for loop and keep the test as failed
79
+ else:
80
+ test.reset_result() # reset result and continue to next param
81
+ continue
79
82
  # Re-enable unified packets deduplication
80
83
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
81
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=True, modules=[datapath_module])
84
+ return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -388,9 +388,11 @@ def run(test):
388
388
  field_functionality_pass_fail_print(test, param.name)
389
389
  test.set_phase_rc(param.name, test.rc)
390
390
  test.add_phase_reason(param.name, test.reason)
391
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
392
- break
393
- else:
394
- test.reset_result()
391
+ if test.rc == TEST_FAILED:
392
+ if test.exit_on_param_failure:
393
+ break # break the whole for loop and keep the test as failed
394
+ else:
395
+ test.reset_result() # reset result and continue to next param
396
+ continue
395
397
 
396
398
  return cert_common.test_epilog(test)
@@ -19,9 +19,11 @@ def run(test):
19
19
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
20
20
  test.set_phase_rc(param.name, test.rc)
21
21
  test.add_phase_reason(param.name, test.reason)
22
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
23
- break
24
- else:
25
- test.reset_result()
22
+ if test.rc == TEST_FAILED:
23
+ if test.exit_on_param_failure:
24
+ break # break the whole for loop and keep the test as failed
25
+ else:
26
+ test.reset_result() # reset result and continue to next param
27
+ continue
26
28
 
27
29
  return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
@@ -20,9 +20,11 @@ def run(test):
20
20
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
21
21
  test.set_phase_rc(param.name, test.rc)
22
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()
23
+ if test.rc == TEST_FAILED:
24
+ if test.exit_on_param_failure:
25
+ break # break the whole for loop and keep the test as failed
26
+ else:
27
+ test.reset_result() # reset result and continue to next param
28
+ continue
27
29
 
28
30
  return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
@@ -21,9 +21,11 @@ def run(test):
21
21
  field_functionality_pass_fail_print(test, fields[0], value=param.name)
22
22
  test.set_phase_rc(param.name, test.rc)
23
23
  test.add_phase_reason(param.name, test.reason)
24
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
25
- break
26
- else:
27
- test.reset_result()
24
+ if test.rc == TEST_FAILED:
25
+ if test.exit_on_param_failure:
26
+ break # break the whole for loop and keep the test as failed
27
+ else:
28
+ test.reset_result() # reset result and continue to next param
29
+ continue
28
30
 
29
31
  return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
@@ -249,10 +249,12 @@ def run(test):
249
249
  field_functionality_pass_fail_print(test, param.name)
250
250
  test.set_phase_rc(param.name, test.rc)
251
251
  test.add_phase_reason(param.name, test.reason)
252
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
253
- break
254
- else:
255
- test.reset_result()
252
+ if test.rc == TEST_FAILED:
253
+ if test.exit_on_param_failure:
254
+ break # break the whole for loop and keep the test as failed
255
+ else:
256
+ test.reset_result() # reset result and continue to next param
257
+ continue
256
258
 
257
259
  # Reset to defaults after every phase (don't fail the phase on that)
258
260
  test = cert_config.config_brg_defaults(test, modules=[test.brg0.energy2400, test.brg0.sensors])[0]
@@ -20,9 +20,10 @@ def run(test):
20
20
  field_functionality_pass_fail_print(test, fields, value=param_name)
21
21
  test.set_phase_rc(param.name, test.rc)
22
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
-
23
+ if test.rc == TEST_FAILED:
24
+ if test.exit_on_param_failure:
25
+ break # break the whole for loop and keep the test as failed
26
+ else:
27
+ test.reset_result() # reset result and continue to next param
28
+ continue
28
29
  return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
@@ -19,9 +19,11 @@ def run(test):
19
19
  field_functionality_pass_fail_print(test, fields, value=param.name)
20
20
  test.set_phase_rc(param.name, test.rc)
21
21
  test.add_phase_reason(param.name, test.reason)
22
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
23
- break
24
- else:
25
- test.reset_result()
22
+ if test.rc == TEST_FAILED:
23
+ if test.exit_on_param_failure:
24
+ break # break the whole for loop and keep the test as failed
25
+ else:
26
+ test.reset_result() # reset result and continue to next param
27
+ continue
26
28
 
27
29
  return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
@@ -20,9 +20,10 @@ def run(test):
20
20
  generate_log_file(test, param_name)
21
21
  test.set_phase_rc(param.name, test.rc)
22
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
-
23
+ if test.rc == TEST_FAILED:
24
+ if test.exit_on_param_failure:
25
+ break # break the whole for loop and keep the test as failed
26
+ else:
27
+ test.reset_result() # reset result and continue to next param
28
+ continue
28
29
  return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
@@ -293,11 +293,12 @@ def run(test):
293
293
  field_functionality_pass_fail_print(test, param.name)
294
294
  test.set_phase_rc(param.name, test.rc)
295
295
  test.add_phase_reason(param.name, test.reason)
296
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
297
- field_functionality_pass_fail_print(test, 'phase', param.name)
298
- break
299
- else:
300
- test.reset_result()
296
+ if test.rc == TEST_FAILED:
297
+ if test.exit_on_param_failure:
298
+ break # break the whole for loop and keep the test as failed
299
+ else:
300
+ test.reset_result() # reset result and continue to next param
301
+ continue
301
302
 
302
303
  # Kill the ble simulator
303
304
  if test.data == DATA_SIMULATION:
@@ -2,7 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
4
  # source: wltPb.proto
5
- # Protobuf Python Version: 5.29.1
5
+ # Protobuf Python Version: 6.30.2
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
8
8
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -11,9 +11,9 @@ from google.protobuf import symbol_database as _symbol_database
11
11
  from google.protobuf.internal import builder as _builder
12
12
  _runtime_version.ValidateProtobufRuntimeVersion(
13
13
  _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 1,
14
+ 6,
15
+ 30,
16
+ 2,
17
17
  '',
18
18
  'wltPb.proto'
19
19
  )
@@ -1,7 +1,8 @@
1
1
  from google.protobuf.internal import containers as _containers
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
4
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
5
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
5
6
 
6
7
  DESCRIPTOR: _descriptor.FileDescriptor
7
8
 
@@ -20,19 +20,21 @@ class BLESimulator():
20
20
  self.uart.reset_gw()
21
21
  time.sleep(3)
22
22
 
23
- def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS, delay=DEFAULT_DELAY):
23
+ def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS,
24
+ delay=DEFAULT_DELAY, print_for_debug=True):
24
25
  assert self.sim_mode is True, 'BLE Sim not initialized!'
25
26
  if len(raw_packet) == 62:
26
27
  # Add ADVA
27
28
  raw_packet = DEFAULT_ADVA + raw_packet
28
29
  if len(raw_packet) != 74:
29
30
  raise ValueError('Raw Packet must be 62/74 chars long!')
30
- self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}")
31
+ self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}", print_for_debug=print_for_debug)
31
32
  if delay > 0:
32
33
  diff = time.perf_counter()
33
34
  time.sleep((delay/1000) * duplicates)
34
35
  diff = time.perf_counter() - diff
35
- debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
+ if print_for_debug:
37
+ debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
38
 
37
39
 
38
40
  def send_data_si_pair(self, data_packet, si_packet, duplicates, output_power=DEFAULT_OUTPUT_POWER, delay=DEFAULT_DELAY, packet_error=None):
@@ -12,7 +12,7 @@ import pkg_resources
12
12
  from gw_certificate.common.debug import debug_print
13
13
  from gw_certificate.interface.if_defines import *
14
14
 
15
- LATEST_VERSION = '4.4.82'
15
+ LATEST_VERSION = '4.4.88'
16
16
  LATEST_VERSION_FILE = f'{LATEST_VERSION}_sd_bl_app.zip'
17
17
  LATEST_VERSION_PATH = pkg_resources.resource_filename(__name__, LATEST_VERSION_FILE)
18
18
  LATEST_VERSION_FILE_APP = f'{LATEST_VERSION}_app.zip'
@@ -65,9 +65,10 @@ class UARTInterface:
65
65
  return None
66
66
  return answer
67
67
 
68
- def write_ble_command(self, cmd, read=False):
68
+ def write_ble_command(self, cmd, read=False, print_for_debug=True):
69
69
  # This function writes a command (cmd) to the ble using a serial connection (ble_ser) that are provided to it beforehand.. and returns the answer from the device as string
70
- debug_print("Write to BLE: {}".format(cmd))
70
+ if print_for_debug:
71
+ debug_print("Write to BLE: {}".format(cmd))
71
72
  # Shows on terminal what command is about to be printed to the BLE device
72
73
  bytes_to_write = bytes(cmd.encode("utf-8")) + b'\r\n'
73
74
  self.serial.write(bytes_to_write)
@@ -77,7 +78,8 @@ class UARTInterface:
77
78
  # Pauses the program for execution for 0.01sec. This is done to allow the device to process the command and provide a response before reading the response.
78
79
  time.sleep(1)
79
80
  answer = self.read_line()
80
- debug_print(answer)
81
+ if print_for_debug:
82
+ debug_print(answer)
81
83
  return answer
82
84
 
83
85
  def flush(self, request_power_cycle=False):
@@ -131,7 +131,7 @@ class BridgeOTAStage(GenericActionsStage):
131
131
  self.error_summary = "Bridge wasn't upgraded."
132
132
  self.action = "Bridge Upgrade"
133
133
 
134
- OTA_VERSIONS_TO_USE = ("4.4.82", "4.4.83")
134
+ OTA_VERSIONS_TO_USE = ("4.4.88", "4.4.89")
135
135
  if version.parse(OTA_VERSIONS_TO_USE[0]) != self.uart.fw_version:
136
136
  self.desired_version = version.parse(OTA_VERSIONS_TO_USE[0])
137
137
  else:
@@ -134,22 +134,22 @@ class GeneratedPacketTable:
134
134
 
135
135
  def _acl_data(df):
136
136
  hardcoded_data = [
137
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110100"},
138
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110100"},
139
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110101"},
140
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110101"},
141
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110102"},
142
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110102"},
143
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110103"},
144
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110103"},
145
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110104"},
146
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110104"},
147
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110105"},
148
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110105"},
149
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110106"},
150
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110106"},
151
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110107"},
152
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110107"},
137
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110100"},
138
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110100"},
139
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110101"},
140
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110101"},
141
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110102"},
142
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110102"},
143
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110103"},
144
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110103"},
145
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110104"},
146
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110104"},
147
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110105"},
148
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110105"},
149
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110106"},
150
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110106"},
151
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "D659CAFE65A31E16C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FECA5916", "adva": "D659CAFE65A3", "pkt_id": "00110107"},
152
+ {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "DA59C6FE65A31E16C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FEC6591A", "adva": "DA59C6FE65A3", "pkt_id": "00110107"},
153
153
  ]
154
154
 
155
155
  hardcoded_df = pd.DataFrame(hardcoded_data)