wiliot-certificate 4.4.2__py3-none-any.whl → 4.5.0__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 (297) hide show
  1. {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
  2. {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
  3. certificate/cert_common.py +1488 -0
  4. certificate/cert_config.py +480 -0
  5. {brg_certificate → certificate}/cert_data_sim.py +134 -46
  6. {brg_certificate → certificate}/cert_defines.py +129 -128
  7. {brg_certificate → certificate}/cert_gw_sim.py +183 -53
  8. {brg_certificate → certificate}/cert_mqtt.py +179 -64
  9. {brg_certificate → certificate}/cert_prints.py +35 -33
  10. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  11. {brg_certificate → certificate}/cert_results.py +240 -64
  12. certificate/cert_utils.py +634 -0
  13. certificate/certificate.py +205 -0
  14. certificate/certificate_cli.py +76 -0
  15. certificate/certificate_eth_test_list.txt +76 -0
  16. certificate/certificate_sanity_test_list.txt +66 -0
  17. certificate/certificate_test_list.txt +76 -0
  18. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +3 -2
  19. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  20. certificate/tests/calibration/output_power_test/output_power_test.json +23 -0
  21. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  22. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +2 -1
  23. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  24. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +15 -0
  25. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  26. certificate/tests/cloud_connectivity/acl_test/acl_test.json +15 -0
  27. certificate/tests/cloud_connectivity/acl_test/acl_test.py +96 -0
  28. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +19 -0
  29. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +41 -0
  30. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +19 -0
  31. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  32. certificate/tests/cloud_connectivity/connection_test/connection_test.json +18 -0
  33. certificate/tests/cloud_connectivity/connection_test/connection_test.py +67 -0
  34. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +15 -0
  35. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +80 -0
  36. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +21 -0
  37. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +201 -0
  38. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +17 -0
  39. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +104 -0
  40. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +18 -0
  41. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +59 -0
  42. certificate/tests/cloud_connectivity/registration_test/registration_test.json +20 -0
  43. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  44. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  45. certificate/tests/cloud_connectivity/stress_test/stress_test.json +17 -0
  46. certificate/tests/cloud_connectivity/stress_test/stress_test.py +101 -0
  47. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +25 -0
  48. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +92 -0
  49. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +20 -0
  50. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +169 -0
  51. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +2 -1
  52. certificate/tests/datapath/aging_test/aging_test.py +142 -0
  53. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +17 -0
  54. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +89 -0
  55. certificate/tests/datapath/event_test/event_test.json +17 -0
  56. certificate/tests/datapath/event_test/event_test.py +80 -0
  57. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +4 -3
  58. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +19 -13
  59. certificate/tests/datapath/output_power_test/output_power_test.json +23 -0
  60. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  61. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +2 -1
  62. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -11
  63. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -1
  64. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  65. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +3 -2
  66. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  67. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +20 -0
  68. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  69. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +2 -1
  70. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +15 -14
  71. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +19 -0
  72. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +85 -0
  73. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -1
  74. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  75. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -1
  76. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  77. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -2
  78. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  79. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +6 -4
  80. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  81. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +3 -2
  82. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  83. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +8 -7
  84. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +113 -73
  85. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +8 -7
  86. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  87. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +4 -3
  88. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +15 -11
  89. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +4 -3
  90. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +15 -11
  91. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +3 -1
  92. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  93. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +15 -0
  94. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  95. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +15 -0
  96. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  97. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +15 -0
  98. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  99. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +15 -0
  100. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  101. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +16 -0
  102. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  103. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +15 -0
  104. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  105. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +15 -0
  106. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  107. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +15 -0
  108. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +45 -0
  109. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +3 -2
  110. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  111. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +2 -1
  112. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  113. certificate/tests/energy2400/output_power_test/output_power_test.json +23 -0
  114. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  115. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +2 -1
  116. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  117. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +26 -0
  118. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +379 -0
  119. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +20 -0
  120. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +173 -0
  121. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +24 -0
  122. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  123. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -1
  124. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  125. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +2 -1
  126. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  127. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +2 -1
  128. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  129. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +5 -4
  130. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +450 -0
  131. certificate/wlt_types.py +122 -0
  132. {gw_certificate → common}/api_if/202/status.json +6 -0
  133. {gw_certificate → common}/api_if/203/status.json +6 -0
  134. {gw_certificate → common}/api_if/204/status.json +6 -0
  135. common/api_if/206/data.json +85 -0
  136. common/api_if/206/status.json +69 -0
  137. common/api_if/api_validation.py +91 -0
  138. common/web/templates/generator.html +210 -0
  139. common/web/templates/index.html +20 -0
  140. common/web/templates/menu.html +54 -0
  141. common/web/templates/parser.html +53 -0
  142. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  143. common/web/web_utils.py +399 -0
  144. {brg_certificate → common}/wltPb_pb2.py +14 -12
  145. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  146. gui_certificate/gui_certificate_cli.py +14 -0
  147. gui_certificate/server.py +1267 -0
  148. gui_certificate/templates/cert_run.html +1273 -0
  149. wiliot_certificate-4.5.0.dist-info/METADATA +99 -0
  150. wiliot_certificate-4.5.0.dist-info/RECORD +168 -0
  151. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/WHEEL +1 -1
  152. wiliot_certificate-4.5.0.dist-info/entry_points.txt +5 -0
  153. wiliot_certificate-4.5.0.dist-info/top_level.txt +3 -0
  154. brg_certificate/ag/energous_v0_defines.py +0 -925
  155. brg_certificate/ag/energous_v1_defines.py +0 -931
  156. brg_certificate/ag/energous_v2_defines.py +0 -925
  157. brg_certificate/ag/energous_v3_defines.py +0 -925
  158. brg_certificate/ag/energous_v4_defines.py +0 -925
  159. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  160. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  161. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  162. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  163. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -142
  164. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -785
  165. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -139
  166. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -394
  167. brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -515
  168. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +0 -672
  169. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -550
  170. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -595
  171. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -598
  172. brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -938
  173. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1234
  174. brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
  175. brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
  176. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  177. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -110
  178. brg_certificate/brg_certificate.py +0 -225
  179. brg_certificate/brg_certificate_cli.py +0 -63
  180. brg_certificate/cert_common.py +0 -923
  181. brg_certificate/cert_config.py +0 -402
  182. brg_certificate/cert_utils.py +0 -362
  183. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  184. brg_certificate/certificate_bcc_test_list.txt +0 -48
  185. brg_certificate/certificate_sanity_test_list.txt +0 -43
  186. brg_certificate/certificate_test_list.txt +0 -53
  187. brg_certificate/config/eclipse.json +0 -10
  188. brg_certificate/config/hivemq.json +0 -10
  189. brg_certificate/config/mosquitto.json +0 -10
  190. brg_certificate/config/mosquitto.md +0 -95
  191. brg_certificate/config/wiliot-dev.json +0 -10
  192. brg_certificate/restore_brg.py +0 -61
  193. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  194. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  195. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  196. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  197. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  198. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  199. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  200. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  201. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  204. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  205. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  206. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  208. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  209. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  210. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  211. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  213. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +0 -321
  215. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  216. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  217. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  218. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  219. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  220. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  221. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  222. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  223. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  224. brg_certificate/wltPb_pb2.pyi +0 -234
  225. brg_certificate/wlt_types.py +0 -113
  226. gw_certificate/ag/ut_defines.py +0 -364
  227. gw_certificate/ag/wlt_types.py +0 -85
  228. gw_certificate/ag/wlt_types_ag.py +0 -5310
  229. gw_certificate/ag/wlt_types_data.py +0 -64
  230. gw_certificate/api/extended_api.py +0 -23
  231. gw_certificate/api_if/200/data.json +0 -106
  232. gw_certificate/api_if/200/status.json +0 -47
  233. gw_certificate/api_if/201/data.json +0 -98
  234. gw_certificate/api_if/201/status.json +0 -53
  235. gw_certificate/api_if/205/logs.json +0 -12
  236. gw_certificate/api_if/api_validation.py +0 -38
  237. gw_certificate/api_if/gw_capabilities.py +0 -54
  238. gw_certificate/cert_results.py +0 -145
  239. gw_certificate/common/analysis_data_bricks.py +0 -60
  240. gw_certificate/common/debug.py +0 -42
  241. gw_certificate/common/serialization_formatter.py +0 -93
  242. gw_certificate/common/utils.py +0 -8
  243. gw_certificate/common/utils_defines.py +0 -15
  244. gw_certificate/common/wltPb_pb2.py +0 -84
  245. gw_certificate/gw_certificate.py +0 -154
  246. gw_certificate/gw_certificate_cli.py +0 -87
  247. gw_certificate/interface/4.4.91_app.zip +0 -0
  248. gw_certificate/interface/4.4.91_sd_bl_app.zip +0 -0
  249. gw_certificate/interface/ble_simulator.py +0 -61
  250. gw_certificate/interface/ble_sniffer.py +0 -189
  251. gw_certificate/interface/flash_fw.py +0 -90
  252. gw_certificate/interface/if_defines.py +0 -36
  253. gw_certificate/interface/mqtt.py +0 -563
  254. gw_certificate/interface/nrfutil-linux +0 -0
  255. gw_certificate/interface/nrfutil-mac +0 -0
  256. gw_certificate/interface/nrfutil.exe +0 -0
  257. gw_certificate/interface/pkt_generator.py +0 -594
  258. gw_certificate/interface/uart_if.py +0 -236
  259. gw_certificate/interface/uart_ports.py +0 -20
  260. gw_certificate/templates/results.html +0 -241
  261. gw_certificate/templates/stage.html +0 -22
  262. gw_certificate/templates/table.html +0 -6
  263. gw_certificate/templates/test.html +0 -38
  264. gw_certificate/tests/__init__.py +0 -10
  265. gw_certificate/tests/actions.py +0 -289
  266. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  267. gw_certificate/tests/connection.py +0 -188
  268. gw_certificate/tests/downlink.py +0 -172
  269. gw_certificate/tests/generic.py +0 -238
  270. gw_certificate/tests/registration.py +0 -340
  271. gw_certificate/tests/static/__init__.py +0 -0
  272. gw_certificate/tests/static/connection_defines.py +0 -9
  273. gw_certificate/tests/static/downlink_defines.py +0 -9
  274. gw_certificate/tests/static/generated_packet_table.py +0 -195
  275. gw_certificate/tests/static/packet_table.csv +0 -10067
  276. gw_certificate/tests/static/references.py +0 -5
  277. gw_certificate/tests/static/uplink_defines.py +0 -14
  278. gw_certificate/tests/throughput.py +0 -240
  279. gw_certificate/tests/uplink.py +0 -853
  280. wiliot_certificate-4.4.2.dist-info/METADATA +0 -211
  281. wiliot_certificate-4.4.2.dist-info/RECORD +0 -210
  282. wiliot_certificate-4.4.2.dist-info/entry_points.txt +0 -3
  283. wiliot_certificate-4.4.2.dist-info/top_level.txt +0 -3
  284. {brg_certificate → certificate}/__init__.py +0 -0
  285. {gw_certificate → common}/api_if/202/data.json +0 -0
  286. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/203/data.json +0 -0
  288. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/204/data.json +0 -0
  290. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/data.json +0 -0
  292. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  293. {gw_certificate → common}/api_if/205/status.json +0 -0
  294. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  295. {gw_certificate → common/api_if}/__init__.py +0 -0
  296. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  297. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,92 @@
1
+ # This test verifies that the gateway correctly handles extended advertising packets
2
+ # where a 31-byte payload is expanded to 31*7 bytes (217 bytes) containing the same payload repeated 7 times
3
+ from certificate.cert_prints import *
4
+ from certificate.cert_defines import *
5
+ from certificate.wlt_types import *
6
+ import certificate.cert_common as cert_common
7
+ import certificate.cert_mqtt as cert_mqtt
8
+ import certificate.cert_config as cert_config
9
+ import certificate.cert_data_sim as cert_data_sim
10
+ from certificate.cert_gw_sim import GW_CERT_TESTER
11
+
12
+ # DEFINES
13
+ EXT_ADV_TEST_INDICATOR = get_random_hex_str(6)
14
+ EXPECTED_REPEAT_COUNT = 7
15
+
16
+
17
+ def ext_adv_analysis(test, pkts):
18
+ """
19
+ Analyze received packets to verify extended advertising scanning:
20
+ - Each 31-byte payload should be expanded to 217 bytes (31*7) (aggregated packet generated by the TESTER FW)
21
+ - The aggregated payload should contain the same 31-byte payload repeated 7 times
22
+ """
23
+ phase_run_print("Extended Advertising Analysis")
24
+
25
+ # Create list of expected expanded payloads (each payload repeated 7 times)
26
+ expected_payloads = [pkt.get_pkt()[12:] * EXPECTED_REPEAT_COUNT for pkt in pkts]
27
+
28
+ # Get received aggregated packets from MQTT
29
+ received_pkts_mqtt = cert_mqtt.get_all_aggregated_data_pkts(test.get_mqttc_by_target(DUT), indicator=EXT_ADV_TEST_INDICATOR)
30
+
31
+ if len(received_pkts_mqtt) == 0:
32
+ test.rc = TEST_FAILED
33
+ test.reason = "No packets were received from the gateway, make sure the gateway is able to receive aggregated \
34
+ packets with 7 31-byte payloads"
35
+ return test
36
+
37
+ # Count how many expected payloads were received
38
+ received_payloads = {pkt[AGGREGATED_PAYLOAD] for pkt in received_pkts_mqtt}
39
+ received_count = sum(expected_payload in received_payloads for expected_payload in expected_payloads)
40
+ expected_count = len(expected_payloads)
41
+
42
+ print(f'Expected payloads: {expected_count}, Received matching payloads: {received_count}')
43
+
44
+ if received_count < expected_count * 0.8:
45
+ test.rc = TEST_FAILED
46
+ print(f"Insufficient packets received: {received_count}/{expected_count} (expected at least 80%)")
47
+ test.reason = f"Insufficient packets received: {received_count}/{expected_count} (expected at least 80%)"
48
+ else:
49
+ test.rc = TEST_PASSED
50
+ print(f"Extended advertising validation passed: {received_count}/{expected_count} packets received")
51
+ test.reason = f"Extended advertising validation passed: {received_count}/{expected_count} packets received"
52
+ return test
53
+
54
+
55
+ def run(test):
56
+ datapath_module = test.tester.internal_brg.datapath
57
+ test = cert_common.test_prolog(test)
58
+ if test.rc == TEST_FAILED:
59
+ return cert_common.test_epilog(test)
60
+
61
+ utPrint("Setting GW CERT TESTER to enable, to allow the TESTER transmit extended advertising packets", "GREEN")
62
+ cert_config.gw_action(test, f"{GW_CERT_TESTER} 1", target=TESTER)
63
+
64
+ # Configure the tester to transmit in extended advertising
65
+ utPrint('Configuring TESTER to transmit in extended advertising', "GREEN")
66
+ test = cert_config.brg_configure(test, fields=[BRG_PATTERN], values=[ag.DATAPATH_PATTERN_EXTENDED_ADV],
67
+ module=datapath_module, target=TESTER)[0]
68
+ time.sleep(1)
69
+
70
+ phase_run_print("Extended Advertising Gateway Scan Test")
71
+ test.flush_all_mqtt_packets()
72
+
73
+ # Generate packets with pixel header
74
+ # Each packet will have a 31-byte payload, the FW expands it to aggregated packet with 7 packets with the same payload
75
+ pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=100, num_of_brgs=1, pkt_type=PIXELS_PKT,
76
+ indicator=EXT_ADV_TEST_INDICATOR)
77
+
78
+ # Send packets using GenericSimThread
79
+ sim_thread = cert_data_sim.GenericSimThread(test=test, pkts=pkts, send_single_cycle=True)
80
+ sim_thread.start()
81
+
82
+ # Wait for packets to be scanned and uploaded
83
+ mqtt_scan_wait(test, 20)
84
+
85
+ # Analyze the results
86
+ test = ext_adv_analysis(test, pkts)
87
+
88
+ test = cert_config.config_brg_defaults(test, modules=[datapath_module], target=TESTER)[0]
89
+ cert_mqtt.generate_log_file(test, "uplink_ext_adv_test")
90
+ field_functionality_pass_fail_print(test, "Extended advertising scanning")
91
+ cert_config.gw_action(test, f"{GW_CERT_TESTER} 0", target=TESTER)
92
+ return cert_common.test_epilog(test)
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "Gateway Uplink",
3
+ "module": "Cloud Connectivity",
4
+ "purpose": "Verify gateway BLE scans and MQTT uplinks across packet types",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Sending-Wiliot-Packets-to-the-Wiliot-Cloud",
6
+ "initialCondition": "Gateway configured to defaults",
7
+ "procedure": [
8
+ "Test prolog",
9
+ "Send packets for each preset packet type (mgmt, pixels, sensor, geolocation)",
10
+ "Analyze received packets: validate counts, JSON serialization structure (when enabled), sequential sequence IDs, and geolocation uploads",
11
+ "Test epilog"
12
+ ],
13
+ "expectedOutcome": "Received amount of packets matches the expected amount for each packet type and all additional validations pass as expected",
14
+ "mandatory": 1,
15
+ "multiBridgeTest": 0,
16
+ "gwOnlyTest": 1,
17
+ "dataSimOnlyTest": 1,
18
+ "SupportedFromApiVersion": 203,
19
+ "allSupportedValues": ["mgmt_pkt", "pixels_pkt", "sensor_pkt", "geolocation"]
20
+ }
@@ -0,0 +1,169 @@
1
+ # This test meant to show the GW performance when is put in a pkt stress generated from the BLE via the UART
2
+ from certificate.cert_prints import *
3
+ from certificate.cert_defines import *
4
+ from certificate.wlt_types import *
5
+ from common.api_if.api_validation import api_validation
6
+ import certificate.cert_common as cert_common
7
+ import certificate.cert_mqtt as cert_mqtt
8
+ import certificate.cert_data_sim as cert_data_sim
9
+ import pandas as pd
10
+
11
+
12
+ # DEFINES
13
+
14
+ API_VALIDATION = "API Validation"
15
+ UPLINK_TEST_INDICATOR = get_random_hex_str(6)
16
+ NUM_OF_BRGS = 3
17
+
18
+
19
+ # HELPER FUNCTIONS
20
+ def uplink_analysis(test, sent_pkts, received_pkts, pkt_type):
21
+ if len(received_pkts) == 0:
22
+ test.set_phase_rc(pkt_type, TEST_FAILED)
23
+ test.add_phase_reason(pkt_type, "No packets were received!")
24
+ return test
25
+
26
+ # Verify packets were received from NUM_OF_BRGS bridges
27
+ received_brgs = set([p[ALIAS_BRIDGE_ID] for p in received_pkts])
28
+ if len(received_brgs) != NUM_OF_BRGS:
29
+ test.set_phase_rc(pkt_type, TEST_FAILED)
30
+ test.add_phase_reason(pkt_type, f"Received packets from {len(received_brgs)} bridges instead of {NUM_OF_BRGS} bridges!")
31
+ utPrint(f"Received packets from {received_brgs} bridges instead of {NUM_OF_BRGS} bridges!", "RED")
32
+ return test
33
+
34
+ _sent_pkts = [p.get_pkt()[12:] for p in sent_pkts]
35
+ sent_df = pd.DataFrame(_sent_pkts, columns=[PACKETS])
36
+ received_pkts = [p[PAYLOAD] for p in received_pkts]
37
+ received_df = pd.DataFrame(received_pkts, columns=[PACKETS])
38
+
39
+ merged_df = pd.merge(sent_df, received_df, on=PACKETS, how='inner')
40
+ # Drop duplicates to count unique packets that were received
41
+ merged_df_unique = merged_df.drop_duplicates(subset=[PACKETS])
42
+ pkts_sent_count = len(sent_df)
43
+ pkts_received_count = len(merged_df_unique)
44
+
45
+ # Prints
46
+ print(f'Number of {pkt_type} packets sent: {pkts_sent_count}')
47
+ print(f'Number of {pkt_type} packets received: {pkts_received_count}')
48
+
49
+ # Check for division by zero
50
+ if pkts_sent_count == 0:
51
+ test.set_phase_rc(pkt_type, TEST_FAILED)
52
+ test.add_phase_reason(pkt_type, "No packets were sent!")
53
+ return test
54
+
55
+ percentage_received = round(pkts_received_count * 100 / pkts_sent_count)
56
+
57
+ # PASS/FAIL logic
58
+ if percentage_received < 80:
59
+ test.set_phase_rc(pkt_type, TEST_FAILED)
60
+ test.add_phase_reason(pkt_type, f'{percentage_received}% of {pkt_type} packets received')
61
+ else:
62
+ test.set_phase_rc(pkt_type, TEST_PASSED)
63
+ test.add_phase_reason(pkt_type, f'{percentage_received}% of {pkt_type} packets received')
64
+
65
+ return test
66
+
67
+
68
+ def geolocation(test, all_messages_in_test):
69
+ phase_run_print(GEOLOCATION)
70
+ locations_list = []
71
+ locations_df = pd.DataFrame()
72
+ for message in all_messages_in_test:
73
+ message = message.body_ex
74
+ timestamp = message[TIMESTAMP]
75
+ if LOCATION in message.keys():
76
+ loc = message[LOCATION]
77
+ loc.update({TIMESTAMP: timestamp})
78
+ locations_list.append(loc)
79
+ num_unique_locs = 0
80
+ if test.get_phase_rc(GEOLOCATION) == TEST_SKIPPED:
81
+ pass
82
+ elif len(locations_list) == 0:
83
+ test.set_phase_rc(GEOLOCATION, TEST_FAILED)
84
+ test.add_phase_reason(GEOLOCATION, 'No coordinates were uploaded')
85
+ else:
86
+ test.set_phase_rc(GEOLOCATION, TEST_PASSED)
87
+ locations_df = pd.DataFrame(locations_list)
88
+ num_unique_locs = locations_df[['lat', 'lng']].drop_duplicates().shape[0]
89
+ print(f'Number of unique locations received: {num_unique_locs}')
90
+
91
+ # Export all stage data
92
+ csv_path = os.path.join(ARTIFACTS_DIR, test.dir, f'uplink_{GEOLOCATION}.csv')
93
+ locations_df.to_csv(csv_path)
94
+ print(f'\nLocations data saved - {csv_path}')
95
+ field_functionality_pass_fail_print(test.get_phase_by_name(GEOLOCATION), GEOLOCATION)
96
+
97
+ return test
98
+
99
+
100
+ def run(test):
101
+ test = cert_common.test_prolog(test)
102
+ if test.rc == TEST_FAILED:
103
+ return cert_common.test_epilog(test)
104
+
105
+ dut_mqttc = test.get_mqttc_by_target(DUT)
106
+ all_data_messages_in_test = []
107
+ all_data_pkts = []
108
+ for param in test.params:
109
+ phase_run_print(f"Tested packet type = {param}")
110
+ dut_mqttc.flush_pkts()
111
+ # generate pkts and send them using data simulator
112
+ pkts = []
113
+ bridge_ids = []
114
+ if param.value == PIXELS_PKT:
115
+ pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
116
+ pkt_type=PIXELS_PKT, indicator=UPLINK_TEST_INDICATOR)
117
+ elif param.value == MGMT_PKT:
118
+ pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
119
+ pkt_type=MGMT_PKT, indicator=UPLINK_TEST_INDICATOR)
120
+ # Generate both sensor data and side info sensor packets
121
+ elif param.value == SENSOR_PKT:
122
+ sensor_pkts, bridge_ids = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
123
+ pkt_type=SENSOR_PKT, indicator=UPLINK_TEST_INDICATOR)
124
+ si_pkts, _ = cert_data_sim.brg_pkt_gen(num_of_pkts_per_brg=10, num_of_brgs=NUM_OF_BRGS,
125
+ brgs_list=bridge_ids, pkt_type=SIDE_INFO_SENSOR_PKT, indicator=UPLINK_TEST_INDICATOR)
126
+ pkts = sensor_pkts + si_pkts
127
+ else:
128
+ test.rc = TEST_FAILED
129
+ test.reason = "Invalid test parameter!"
130
+ break
131
+
132
+ pixel_sim_thread = cert_data_sim.GenericSimThread(test=test, pkts=pkts, send_single_cycle=True)
133
+ pixel_sim_thread.start()
134
+
135
+ mqtt_scan_wait(test, 10 + test.dut.upload_wait_time)
136
+ cert_mqtt.dump_pkts(test, log=param.name)
137
+ pixel_sim_thread.stop()
138
+ all_data_messages_in_test.extend(dut_mqttc._userdata[PKTS].data)
139
+ all_data_pkts.extend(cert_mqtt.get_all_data_pkts(dut_mqttc))
140
+ recieved_pkts = cert_mqtt.get_all_data_pkts(dut_mqttc, indicator=UPLINK_TEST_INDICATOR)
141
+ valid, reason = cert_common.validate_received_packets(recieved_pkts)
142
+ if valid is False:
143
+ test.set_phase_rc(param.name, TEST_FAILED)
144
+ test.add_phase_reason(param.name, reason)
145
+ utPrint(f"Phase {param.name} failed validation: {reason}", "RED")
146
+ continue
147
+
148
+ test = uplink_analysis(test, pkts, recieved_pkts, param.name)
149
+
150
+ cert_mqtt.generate_log_file(test, param.name)
151
+ field_functionality_pass_fail_print(test.get_phase_by_name(param.name), 'pkt_type', value=param.name)
152
+ if test.get_phase_by_name(param.name).rc == TEST_FAILED:
153
+ if test.exit_on_param_failure:
154
+ break # break the whole for loop and keep the test as failed
155
+ test.reset_result() # reset result and continue to next param
156
+
157
+ # Other Validations
158
+ # Api Validation
159
+ test = api_validation(test)
160
+ test = cert_common.wiliot_pkts_validation(test, all_data_messages_in_test, all_data_pkts)
161
+
162
+ # Geolocation phase
163
+ if len(all_data_messages_in_test) == 0:
164
+ test.set_phase_rc(param.name, TEST_FAILED)
165
+ test.add_phase_reason(param.name, "No messages were received!")
166
+ return cert_common.test_epilog(test)
167
+ test = geolocation(test, all_data_messages_in_test)
168
+
169
+ return cert_common.test_epilog(test)
@@ -13,7 +13,8 @@
13
13
  "mandatory": 1,
14
14
  "multiBridgeTest": 0,
15
15
  "gwOnlyTest": 0,
16
- "internalBridge": 1,
16
+ "dataSimOnlyTest": 1,
17
+ "SupportedFromApiVersion": 12,
17
18
  "allSupportedValues": ["low_pacer", "high_pacer"]
18
19
 
19
20
  }
@@ -0,0 +1,142 @@
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+ import certificate.cert_data_sim as cert_data_sim
8
+
9
+ DEFAULT_NUM_OF_PIXELS = 300
10
+ DEFAULT_DUPLICATES = 4
11
+ DEFAULT_DELAY = 0
12
+ HIGH_PACER_VALUE = 300
13
+ LOW_PACER_VALUE = 15
14
+ TAGS_CTR_UNDER_THRESHOLD = 0.9
15
+ TAGS_CTR_OVER_THRESHOLD = 1.1
16
+ TIME_OFFSET = 15
17
+
18
+
19
+ def get_hb_pkt(test):
20
+ test.get_mqttc_by_target(DUT).flush_pkts()
21
+ cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
22
+ test, hb_pkts = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
23
+ tags_ctr = hb_pkts[-1][MGMT_PKT].pkt.tags_ctr if hb_pkts else 0
24
+ return test, tags_ctr
25
+
26
+
27
+ def wait_in_reference_to_start_time(start_time, wait_time):
28
+ print(f"\nWaiting for {(wait_time - (time.time() - start_time)):.1f} seconds...")
29
+ while (time.time() - start_time) < wait_time:
30
+ print_update_wait()
31
+
32
+
33
+ def wait_for_zero_pixels(test, wait_time=60):
34
+ for i in range(int(wait_time / 10)):
35
+ print(f"\nWaiting {wait_time - (i * 10)} more seconds for pixels table to clear")
36
+ wait_in_reference_to_start_time(time.time(), 10)
37
+ test, tags_ctr = get_hb_pkt(test)
38
+ # tags_ctr will be 0 if the tags table cleared OR if no hb was received - return in both cases
39
+ if tags_ctr > 0:
40
+ print(f"\nPixels count: {tags_ctr}")
41
+ continue
42
+ return test, tags_ctr
43
+ test.rc = TEST_FAILED
44
+ test.add_reason("Floor pixel count value is not zero, make sure there are no pixels (or other energizing devices) around!")
45
+ return test, tags_ctr
46
+
47
+
48
+ def aging_analysis(test, datapath_module, pacer_interval, num_of_sim_tags):
49
+ # Get tags counter floor
50
+ test, first_floor_tags_ctr = get_hb_pkt(test)
51
+ if test.sterile_run and first_floor_tags_ctr > 0:
52
+ test, first_floor_tags_ctr = wait_for_zero_pixels(test)
53
+ if test.rc == TEST_FAILED:
54
+ return test
55
+ utPrint(f"\nPhase start pixels count: {first_floor_tags_ctr}\n", "BLUE")
56
+ # Configure bridge pacer interval
57
+ test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
58
+ if test.rc == TEST_FAILED:
59
+ return test
60
+ # Simualtor pixel packets generation
61
+ cycle_time = DEFAULT_DUPLICATES * (cert_data_sim.PIXEL_SIM_MIN_CYCLE / 1000) * num_of_sim_tags
62
+ pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_sim_tags, duplicates=DEFAULT_DUPLICATES,
63
+ delay=DEFAULT_DELAY, pkt_types=[0], pixels_type=GEN2)
64
+ sending_time = cycle_time # Send one cycle of pixel pkts
65
+ print(f"Simulator starts sending pixel packets for {sending_time} sec")
66
+ pixel_sim_thread.start()
67
+ start_time = time.time()
68
+ wait_in_reference_to_start_time(start_time, wait_time=sending_time)
69
+ pixel_sim_thread.stop()
70
+ print("\nSimulator stopped sending pixel packets\n")
71
+ print(f"\nWaiting for a {TIME_OFFSET} seconds time offset\n")
72
+ time.sleep(TIME_OFFSET)
73
+ # Get tags counter peak
74
+ test, first_peak_tags_ctr = get_hb_pkt(test)
75
+ if test.rc == TEST_FAILED:
76
+ return test
77
+ utPrint(f"\nEnd of pixel simulation pixels count: {first_peak_tags_ctr}\n", "BLUE")
78
+ if first_peak_tags_ctr - first_floor_tags_ctr < TAGS_CTR_UNDER_THRESHOLD * DEFAULT_NUM_OF_PIXELS:
79
+ test.rc = TEST_FAILED
80
+ test.add_reason("Didn't count sufficient amount of pixels.\n"
81
+ f"tags_ctr value: {first_peak_tags_ctr}\nNumber of simulated pixels: {DEFAULT_NUM_OF_PIXELS}")
82
+ return test
83
+
84
+ # Waiting the aging time
85
+ # Throuout the aging time until deletion starts we expect to get the tags_ctr equal to the number of pixels
86
+ aging_time = max(60, pacer_interval)
87
+ print(f"Waiting the aging time of {aging_time} seconds")
88
+
89
+ # (sending_time - cycle_time + aging_time) is the expected deletion time of the first simulated pixel
90
+ wait_in_reference_to_start_time(start_time, wait_time=(sending_time - cycle_time + aging_time) - TIME_OFFSET)
91
+ test, second_peak_tags_ctr = get_hb_pkt(test)
92
+ if test.rc == TEST_FAILED:
93
+ return test
94
+ utPrint(f"\nBefore deletion start pixels count: {second_peak_tags_ctr}\n", "BLUE")
95
+ if second_peak_tags_ctr < TAGS_CTR_UNDER_THRESHOLD * first_peak_tags_ctr:
96
+ test.rc = TEST_FAILED
97
+ test.add_reason("Pixel count is lower than expected. Looks like aging time is too short.\n"
98
+ f"Found {second_peak_tags_ctr} tags in hb ctr, Previously got {first_peak_tags_ctr},\n"
99
+ f"only {(100 * second_peak_tags_ctr / first_peak_tags_ctr):.1f}% of expected\n")
100
+ return test
101
+
102
+ # (sending_time + aging_time) is the expected deletion time of all simulated pixels
103
+ wait_in_reference_to_start_time(start_time, wait_time=(sending_time + aging_time) + TIME_OFFSET)
104
+ test, second_floor_tags_ctr = get_hb_pkt(test)
105
+ if test.rc == TEST_FAILED:
106
+ return test
107
+ utPrint(f"\nEnd of aging time pixels count: {second_floor_tags_ctr}\n", "BLUE")
108
+ if test.sterile_run and second_floor_tags_ctr != 0:
109
+ test.rc = TEST_FAILED
110
+ test.add_reason("Pixel count is higher than expected. Looks like aging time is too long.\n"
111
+ f"Number of pixels after aging time: {second_floor_tags_ctr}")
112
+ elif not test.sterile_run and (second_floor_tags_ctr > TAGS_CTR_OVER_THRESHOLD * first_floor_tags_ctr):
113
+ test.rc = TEST_FAILED
114
+ test.add_reason("Pixel count is higher than expected. Looks like aging time is too long.\n"
115
+ f"Number of pixels after aging time: {second_floor_tags_ctr},"
116
+ f" before tags simulation was: {second_peak_tags_ctr}\n")
117
+ return test
118
+
119
+
120
+ def run(test):
121
+ # Test prolog
122
+ datapath_module = test.active_brg.datapath
123
+ test = cert_common.test_prolog(test)
124
+ if test.rc == TEST_FAILED:
125
+ return cert_common.test_epilog(test)
126
+
127
+ AGING_TEST_MAP = {"low_pacer": LOW_PACER_VALUE, "high_pacer": HIGH_PACER_VALUE}
128
+
129
+ for param in test.params:
130
+ phase_run_print(param.name)
131
+ test = aging_analysis(test, datapath_module, pacer_interval=AGING_TEST_MAP[param.value],
132
+ num_of_sim_tags=DEFAULT_NUM_OF_PIXELS)
133
+ cert_mqtt.generate_log_file(test, param.name)
134
+ field_functionality_pass_fail_print(test, param.name)
135
+ test.set_phase_rc(param.name, test.rc)
136
+ test.add_phase_reason(param.name, test.reason)
137
+ if test.rc == TEST_FAILED:
138
+ if test.exit_on_param_failure:
139
+ break # break the whole for loop and keep the test as failed
140
+ test.reset_result() # reset result and continue to next param
141
+
142
+ return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Event Test BLE 5",
3
+ "module": "Datapath",
4
+ "purpose": "Test dynamic pacing for tags that had location events on BLE5 packets",
5
+ "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
6
+ "initialCondition": "Bridge & data simulator configured to defaults",
7
+ "procedure": ["Test prolog",
8
+ "for each supported value - Event Window configuration, Generate pixels packets & scan for packets in the bridge & Compare pacer interval mean per pixel to the simulated tag's pacing.",
9
+ "Test epilog and revert to defaults"],
10
+ "expectedOutcome": "All values configured successfully and actual pacing found matching to the simulated tag's pacing.",
11
+ "mandatory": 0,
12
+ "multiBridgeTest": 0,
13
+ "gwOnlyTest": 0,
14
+ "dataSimOnlyTest": 1,
15
+ "SupportedFromApiVersion": 13,
16
+ "allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "temp_event", "tx_rate_event"]
17
+ }
@@ -0,0 +1,89 @@
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+
8
+ NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
9
+ TAG_EVENT_SCAN_TIME = 60 # in seconds
10
+ RSSI_MOVEMENT_THRESHOLD = 15
11
+
12
+
13
+ def test_new_tag_event_minutes(test, phase, datapath_module):
14
+ values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG, 0]
15
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME,
16
+ ag.EVENT_TIME_UNIT_MINUTES, ble5_test=True,
17
+ pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
18
+
19
+
20
+ # In seconds phase we also test the dynamic pacer interval
21
+ def test_new_tag_event_seconds(test, phase, datapath_module):
22
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_EVENT_WINDOW_SEC_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_NEW_TAG,
23
+ DATA_SIM_EVENT_PACER_INTERVAL_TESTING]
24
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME,
25
+ ag.EVENT_TIME_UNIT_SECONDS, ble5_test=True,
26
+ pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
27
+
28
+
29
+ def test_temp_event(test, phase, datapath_module):
30
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_TEMP_CHANGE, 0]
31
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
32
+ ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
33
+
34
+
35
+ def test_tx_rate_event(test, phase, datapath_module):
36
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_500K, ag.EVENT_TRIGGER_TX_RATE_CHANGE, 0]
37
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
38
+ ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
39
+
40
+
41
+ def test_rssi_event(test, phase, datapath_module):
42
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_10_250K, ag.EVENT_TRIGGER_RSSI_CHANGE, 0,
43
+ RSSI_MOVEMENT_THRESHOLD]
44
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS,
45
+ ble5_test=True, pkt_filter_cfg=ag.PKT_FILTER_TEMP_AND_ADVANCED_PKTS)
46
+
47
+
48
+ EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
49
+ "new_tag_event_minutes": test_new_tag_event_minutes,
50
+ "temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
51
+
52
+
53
+ def run(test):
54
+ # Test prolog
55
+ test = cert_common.test_prolog(test)
56
+ if test.rc == TEST_FAILED:
57
+ return cert_common.test_epilog(test)
58
+ dut = cert_config.get_brg_by_target(test, DUT)
59
+
60
+ for param in test.params:
61
+ phase_run_print(param.name)
62
+ test = EVENT_TEST_MAP[param.value](test, param.name, dut.datapath)
63
+ cert_mqtt.generate_log_file(test, param.name)
64
+ field_functionality_pass_fail_print(test, param.name)
65
+ test.set_phase_rc(param.name, test.rc)
66
+ test.add_phase_reason(param.name, test.reason)
67
+ if test.rc == TEST_FAILED:
68
+ if test.exit_on_param_failure:
69
+ break # break the whole for loop and keep the test as failed
70
+ else:
71
+ test.reset_result() # reset result and continue to next param
72
+ continue
73
+
74
+ # Reset to defaults after every phase (don't fail the phase on that)
75
+ test = cert_config.config_brg_defaults(test, modules=[dut.datapath], ble5=test.dut_is_bridge())[0]
76
+ if test.rc == TEST_FAILED:
77
+ test.add_reason("Failed to restore brg to defaults")
78
+ if test.dut_is_bridge():
79
+ wait_time_n_print(BLE5_MAX_DURATION_SEC)
80
+
81
+ if test.rc == TEST_FAILED:
82
+ test.set_phase_rc(param.name, test.rc)
83
+ test.add_phase_reason(param.name, test.reason)
84
+ if test.exit_on_param_failure:
85
+ break
86
+ else:
87
+ test.reset_result()
88
+
89
+ return cert_common.test_epilog(test, revert_brgs=True, modules=[dut.datapath], ble5=test.dut_is_bridge())
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Event Test",
3
+ "module": "Datapath",
4
+ "purpose": "Test dynamic pacing for tags that had location events",
5
+ "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
6
+ "initialCondition": "Bridge & data simulator configured to defaults",
7
+ "procedure": ["Test prolog",
8
+ "for each supported value - Event Window configuration, Generate pixels packets & scan for packets in the bridge & Compare pacer interval mean per pixel to the simulated tag's pacing.",
9
+ "Test epilog and revert to defaults"],
10
+ "expectedOutcome": "All values configured successfully and actual pacing found matching to the simulated tag's pacing.",
11
+ "mandatory": 0,
12
+ "multiBridgeTest": 0,
13
+ "gwOnlyTest": 0,
14
+ "dataSimOnlyTest": 1,
15
+ "SupportedFromApiVersion": 13,
16
+ "allSupportedValues": ["rssi_event", "new_tag_event_seconds", "new_tag_event_minutes", "temp_event", "tx_rate_event"]
17
+ }
@@ -0,0 +1,80 @@
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+
8
+ NEW_TAG_EVENT_SCAN_TIME = 100 # in seconds
9
+ TAG_EVENT_SCAN_TIME = 60 # in seconds
10
+ RSSI_MOVEMENT_THRESHOLD = 15
11
+
12
+
13
+ def test_new_tag_event_minutes(test, phase, datapath_module):
14
+ values = [ag.EVENT_TIME_UNIT_MINUTES, TEST_EVENT_WINDOW_MIN_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG, 0]
15
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_MINUTES)
16
+
17
+
18
+ # In seconds phase we also test the dynamic pacer interval
19
+ def test_new_tag_event_seconds(test, phase, datapath_module):
20
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_EVENT_WINDOW_SEC_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_NEW_TAG,
21
+ DATA_SIM_EVENT_PACER_INTERVAL_TESTING]
22
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, NEW_TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
23
+
24
+
25
+ def test_temp_event(test, phase, datapath_module):
26
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_TEMP_CHANGE, 0]
27
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
28
+
29
+
30
+ def test_tx_rate_event(test, phase, datapath_module):
31
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_TX_RATE_CHANGE, 0]
32
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
33
+
34
+
35
+ def test_rssi_event(test, phase, datapath_module):
36
+ values = [ag.EVENT_TIME_UNIT_SECONDS, TEST_TAG_EVENT_WINDOW_CFG, ag.RX_CHANNEL_37, ag.EVENT_TRIGGER_RSSI_CHANGE, 0,
37
+ RSSI_MOVEMENT_THRESHOLD]
38
+ return cert_common.run_event_test_phase(test, phase, datapath_module, values, TAG_EVENT_SCAN_TIME, ag.EVENT_TIME_UNIT_SECONDS)
39
+
40
+
41
+ EVENT_TEST_MAP = {"rssi_event": test_rssi_event, "new_tag_event_seconds": test_new_tag_event_seconds,
42
+ "new_tag_event_minutes": test_new_tag_event_minutes,
43
+ "temp_event": test_temp_event, "tx_rate_event": test_tx_rate_event}
44
+
45
+
46
+ def run(test):
47
+ # Test prolog
48
+ test = cert_common.test_prolog(test)
49
+ if test.rc == TEST_FAILED:
50
+ return cert_common.test_epilog(test)
51
+ dut = cert_config.get_brg_by_target(test, DUT)
52
+
53
+ for param in test.params:
54
+ phase_run_print(param.name)
55
+ test = EVENT_TEST_MAP[param.value](test, param.name, dut.datapath)
56
+ cert_mqtt.generate_log_file(test, param.name)
57
+ field_functionality_pass_fail_print(test, param.name)
58
+ test.set_phase_rc(param.name, test.rc)
59
+ test.add_phase_reason(param.name, test.reason)
60
+ if test.rc == TEST_FAILED:
61
+ if test.exit_on_param_failure:
62
+ break # break the whole for loop and keep the test as failed
63
+ else:
64
+ test.reset_result() # reset result and continue to next param
65
+ continue
66
+
67
+ # Reset to defaults after every phase (don't fail the phase on that)
68
+ test = cert_config.config_brg_defaults(test, modules=[dut.datapath])[0]
69
+ if test.rc == TEST_FAILED:
70
+ test.add_reason("Failed to restore brg to defaults")
71
+
72
+ if test.rc == TEST_FAILED:
73
+ test.set_phase_rc(param.name, test.rc)
74
+ test.add_phase_reason(param.name, test.reason)
75
+ if test.exit_on_param_failure:
76
+ break
77
+ else:
78
+ test.reset_result()
79
+
80
+ return cert_common.test_epilog(test, revert_brgs=True, modules=[dut.datapath])
@@ -2,7 +2,7 @@
2
2
  "name": "Supported Pixels",
3
3
  "module": "Datapath",
4
4
  "purpose": "Test pixels handling in the bridge for different amount of pixels",
5
- "documentation": "<TEST_DOCUMENTATION_LINK>",
5
+ "documentation": "",
6
6
  "initialCondition": "Bridge & data simulator configured to defaults",
7
7
  "procedure": ["Test prolog",
8
8
  "Generate packets from the given amount of pixels & scan for packets in the bridge",
@@ -13,6 +13,7 @@
13
13
  "mandatory": 1,
14
14
  "multiBridgeTest": 0,
15
15
  "gwOnlyTest": 0,
16
- "internalBridge": 1,
17
- "allSupportedValues": [500, 1000, 2500, 5000]
16
+ "dataSimOnlyTest": 1,
17
+ "SupportedFromApiVersion": 12,
18
+ "allSupportedValues": ["dynamic_parameters", 1000]
18
19
  }