wiliot-certificate 4.4.3__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.3.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.93_app.zip +0 -0
  248. gw_certificate/interface/4.4.93_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.3.dist-info/METADATA +0 -211
  281. wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
  282. wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
  283. wiliot_certificate-4.4.3.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.3.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,379 @@
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
+ # Test Description:
9
+ # This test is to verify the functionality of both signal indicator tx (tx_brg) and rx (rx_brg) at BRG level.
10
+ # We will configure several signal indicator params during the test, and check the functionality of the signal indicator logic
11
+ # for each of them.
12
+ # It is important to execute the test with several setups: 2 Fanstel BRG's, 2 Minew BRG's and 1 Fanstel and 1 Minew BRG.
13
+ # At first, we will configure several tx signal indicator params and check for ack's, to verify all indicated params were
14
+ # received at the cloud.
15
+ # Then, we will examine the signal indicator end-2-end logic with both transmitter and receiver:
16
+ # phase 1 - One BRG will be configured as signal indicator tx, and the other as signal indicator rx, and we expect to see
17
+ # signal indicator packets only from the tx BRG, and according to the tx params (to check the repetition and cycle params).
18
+ # phase 2 - Same as phase 1, but with different tx params configured.
19
+ # phase 3 - One rx BRG without any tx BRG. We don't expect to see any signal indicator packets. This phase is to verify the
20
+ # brg module logic is working properly, and no tag packet is accidentally being treated as signal indicator packet.
21
+ # phase 4 - Both BRG's will be configured to be transmitters and receivers, with different tx params for each one. we expect
22
+ # to see signal indicator packets from both BRG's, according to the tx params.
23
+ # phase 5 - One BRG will be configured as signal indicator tx, but no rx, so we don't expect to receive signal indicatopr packets.
24
+ # that way we can assure the logic within the receiver is not confused by the signal indicator uuid as external sensor.
25
+
26
+
27
+ # Test MACROS #
28
+ NUM_OF_SCANNING_CYCLE = 5
29
+ DEFAULT_SCAN_TIME = 30
30
+ SCAN_DELAY_TIME = 3
31
+
32
+
33
+ def test_rssi_threshold(test):
34
+ cycle, rep = 5, 4
35
+ dut = cert_config.get_brg_by_target(test, DUT)
36
+ tester = cert_config.get_brg_by_target(test, TESTER)
37
+ rssi_threshold = -25
38
+
39
+ # configuring receiver #
40
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Receiver with RSSI Threshold of {rssi_threshold}", "BOLD")
41
+ test = cert_config.brg_configure(test=test, module=dut.sensors,
42
+ fields=[BRG_SENSOR0, BRG_RSSI_THRESHOLD],
43
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR, rssi_threshold],
44
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
45
+ if test.rc == TEST_FAILED:
46
+ test.add_reason(f"BRG {dut.id_str}: didn't receive signal indicator receiver configuration!")
47
+ return test
48
+ if test.dut_is_bridge():
49
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
50
+ # configuring tester as a transmitter #
51
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Transmitter", "BOLD")
52
+ test = cert_config.brg_configure(test=test, module=tester.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
53
+ values=[cycle, rep], target=TESTER)[0]
54
+ if test.rc == TEST_FAILED:
55
+ test.add_reason(f"BRG {tester.id_str}: didn't receive signal indicator transmitter configuration!")
56
+ return test
57
+ utPrint(f"BRG {tester.id_str} configured to be transmitter - cycle = {cycle} repetition = {rep}", "BOLD")
58
+ # phase analysis #
59
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, "rssi_threshold")
60
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=dut, tx_brg=tester)
61
+ for p in rec_sig_ind_pkts:
62
+ print(f"rssi value: {p[UNIFIED_SENSOR_PKT].pkt.rssi}")
63
+ rssi_threshold_viloation_pkts = [p for p in rec_sig_ind_pkts if p[UNIFIED_SENSOR_PKT].pkt.rssi >= -1 * rssi_threshold]
64
+ if rssi_threshold_viloation_pkts:
65
+ test.rc = TEST_FAILED
66
+ test.add_reason(f"rssi_threshold phase failed - BRG {dut.id_str} echoed"
67
+ f" {len(rssi_threshold_viloation_pkts)} signal indicator packets\n with RSSI weaker than {rssi_threshold}")
68
+ return test
69
+
70
+
71
+ def test_rx(test):
72
+
73
+ dut = cert_config.get_brg_by_target(test, DUT)
74
+ tester = cert_config.get_brg_by_target(test, TESTER)
75
+ cycle, rep = 8, 4
76
+
77
+ utPrint(f"TESTER BRG with cycle = {cycle}, repetition = {rep}\n", "BLUE")
78
+ # configuring receiver #
79
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Receiver", "BOLD")
80
+ test = cert_config.brg_configure(test=test, module=dut.sensors, fields=[BRG_SENSOR0],
81
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR],
82
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo(),
83
+ target=DUT)[0]
84
+ if test.rc == TEST_FAILED:
85
+ test.add_reason(f"BRG {dut.id_str}: didn't receive signal indicator receiver configuration!")
86
+ return test
87
+ if test.dut_is_bridge():
88
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
89
+
90
+ # configuring transmitter #
91
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Transmitter", "BOLD")
92
+ test = cert_config.brg_configure(test=test, module=tester.energy2400,
93
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
94
+ values=[cycle, rep], target=TESTER)[0]
95
+ if test.rc == TEST_FAILED:
96
+ test.add_reason(f"BRG {tester.id_str}: didn't receive signal indicator transmitter configuration!")
97
+ return test
98
+ utPrint(f"TESTER {tester.id_str} configured to be transmitter - cycle={cycle}, repetition={rep}", "BOLD")
99
+
100
+ # phase analysis #
101
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, f"rx_{cycle}_{rep}")
102
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=dut, tx_brg=tester)
103
+
104
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=tester, rx_brg=dut, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
105
+ test.rc = TEST_FAILED
106
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tx_brg=tester, rx_brg=dut, cycles=NUM_OF_SCANNING_CYCLE)
107
+ test.add_reason(f"rx phase failed - BRG {dut.id_str} received wrong number of "
108
+ f"signal indicator packets\nreceived {len(rec_sig_ind_pkts)} packets, "
109
+ f"expected {expected_signal_ind_pkts} packets")
110
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
111
+ print([[p[TIMESTAMP], p[UNIFIED_SENSOR_PKT].pkt.signal_indicator_payload.rx_antenna] for p in rec_sig_ind_pkts])
112
+
113
+ test = cert_common.rx_tx_antenna_check(test, rec_sig_ind_pkts, tester, dut, NUM_OF_SCANNING_CYCLE)
114
+ test = cert_common.output_power_check(test, rec_sig_ind_pkts, tester)
115
+ test = cert_common.rssi_check(test, rec_sig_ind_pkts)
116
+
117
+ return test
118
+
119
+
120
+ def test_tx(test):
121
+
122
+ dut = cert_config.get_brg_by_target(test, DUT)
123
+ tester = cert_config.get_brg_by_target(test, TESTER)
124
+ cycle, rep = 8, 4
125
+
126
+ # configuring transmitter #
127
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Transmitter (cycle={cycle}, repetition={rep})", "BOLD")
128
+ test = cert_config.brg_configure(test=test, module=dut.energy2400,
129
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
130
+ values=[cycle, rep], ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
131
+ if test.rc == TEST_FAILED:
132
+ test.add_reason(f"DUT BRG {dut.id_str}: didn't receive signal indicator transmitter configuration!")
133
+ return test
134
+ if test.dut_is_bridge():
135
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
136
+
137
+ # configuring receiver #
138
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Receiver", "BOLD")
139
+ test = cert_config.brg_configure(test=test, module=tester.sensors, fields=[BRG_SENSOR0],
140
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], target=TESTER)[0]
141
+ if test.rc == TEST_FAILED:
142
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive signal indicator receiver configuration!")
143
+ return test
144
+
145
+ # phase analysis #
146
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME,
147
+ f"tx_{cycle}_{rep}")
148
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
149
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
150
+ test.rc = TEST_FAILED
151
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tester, dut, NUM_OF_SCANNING_CYCLE)
152
+ test.add_reason(f"tx phase failed - BRG {dut.id_str} received wrong number of "
153
+ f"signal indicator packets\nreceived {len(rec_sig_ind_pkts)} packets, "
154
+ f"expected {expected_signal_ind_pkts} packets")
155
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
156
+ print([[p[TIMESTAMP], p[UNIFIED_SENSOR_PKT].pkt.signal_indicator_payload.rx_antenna] for p in rec_sig_ind_pkts])
157
+
158
+ test = cert_common.rx_tx_antenna_check(test, rec_sig_ind_pkts, dut, tester, NUM_OF_SCANNING_CYCLE)
159
+ test = cert_common.output_power_check(test, rec_sig_ind_pkts, dut)
160
+ test = cert_common.rssi_check(test, rec_sig_ind_pkts)
161
+
162
+ return test
163
+
164
+
165
+ def test_disable_tx(test):
166
+ cycle, rep = ag.BRG_DEFAULT_SIGNAL_INDICATOR_CYCLE, ag.BRG_DEFAULT_SIGNAL_INDICATOR_REP
167
+ tester = cert_config.get_brg_by_target(test, TESTER)
168
+ dut = cert_config.get_brg_by_target(test, DUT)
169
+ utPrint(f"DUT BRG with TX disabled - cycle = {cycle}, repetition = {rep}\n", "BLUE")
170
+ # configuring tester as a receiver, the dut should be with defaults which means TX is disabled
171
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Receiver", "BOLD")
172
+ test = cert_config.brg_configure(test=test, module=tester.sensors,
173
+ fields=[BRG_SENSOR0],
174
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR],
175
+ target=TESTER)[0]
176
+ if test.rc == TEST_FAILED:
177
+ test.add_reason(f"BRG {tester.id_str}: didn't receive signal indicator receiver configuration!")
178
+ return test
179
+ utPrint(f"TESTER BRG {tester.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
180
+
181
+ # phase analysis #
182
+ cert_mqtt.mqtt_scan_n_create_log_file(test, DEFAULT_SCAN_TIME, "disable_tx")
183
+ expected_signal_ind_pkts = [0]
184
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
185
+ if len(rec_sig_ind_pkts) not in expected_signal_ind_pkts:
186
+ test.rc = TEST_FAILED
187
+ test.add_reason(f"disable_tx phase failed - DUT BRG {dut.id_str} sent signal indicator packets\n"
188
+ f"received {len(rec_sig_ind_pkts)} packets, "
189
+ f"expected {expected_signal_ind_pkts} packets")
190
+
191
+ return test
192
+
193
+
194
+ def test_disable_rx(test):
195
+ # DUT BRG without rx. just waiting for packets to be sent from the transmitter and verify
196
+ # The receiver does not receive any signal indicator packets.
197
+ cycle, rep = 4, 3
198
+ dut = cert_config.get_brg_by_target(test, DUT)
199
+ tester = cert_config.get_brg_by_target(test, TESTER)
200
+ utPrint("DUT BRG with RX disabled\n", "BLUE")
201
+ # configuring tester as transmitter, dut should be with defaults which means rx disabled
202
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Transmitter", "BOLD")
203
+ test = cert_config.brg_configure(test=test, module=tester.energy2400,
204
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
205
+ values=[cycle, rep], target=TESTER)[0]
206
+ if test.rc == TEST_FAILED:
207
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive signal indicator transmitter configuration!")
208
+ return test
209
+
210
+ # phase analysis #
211
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, "disable_rx")
212
+ expected_signal_ind_pkts = [0]
213
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=dut, tx_brg=tester)
214
+ if len(rec_sig_ind_pkts) not in expected_signal_ind_pkts:
215
+ test.rc = TEST_FAILED
216
+ test.add_reason(f"disable_rx phase failed - DUT {dut.id_str} received signal indicator packets\n"
217
+ f"received {len(rec_sig_ind_pkts)} packets, expected 0 packets")
218
+
219
+ return test
220
+
221
+
222
+ def test_rx_tx(test):
223
+ tx_cycle, tx_rep = 5, 4
224
+ rx_cycle, rx_rep = 5, 4
225
+ dut = cert_config.get_brg_by_target(test, DUT)
226
+ tester = cert_config.get_brg_by_target(test, TESTER)
227
+ utPrint("Both TESTER and DUT are transmitters and receivers\n", "BLUE")
228
+ # configuring dut brg as receiver
229
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Receiver", "BOLD")
230
+ test = cert_config.brg_configure(test=test, module=dut.sensors, fields=[BRG_SENSOR0],
231
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR],
232
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
233
+ if test.rc == TEST_FAILED and test.exit_on_param_failure:
234
+ test.add_reason(f"BRG {dut.id_str}: didn't receive signal indicator receiver configuration!")
235
+ return test
236
+ if test.dut_is_bridge():
237
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
238
+ utPrint(f"BRG {dut.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
239
+ # configuring dut brg as transmitter
240
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Transmitter", "BOLD")
241
+ test = cert_config.brg_configure(test=test, module=dut.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
242
+ values=[tx_cycle, tx_rep], ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
243
+ if test.rc == TEST_FAILED and test.exit_on_param_failure:
244
+ test.add_reason(f"BRG {dut.id_str}: didn't receive signal indicator transmitter configuration!")
245
+ return test
246
+ if test.dut_is_bridge():
247
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
248
+ utPrint(f"BRG {dut.id_str} configured to be transmitter - cycle={tx_cycle}, repetition={tx_rep}", "BOLD")
249
+
250
+ # configuring tester brg as receiver
251
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Receiver", "BOLD")
252
+ test = cert_config.brg_configure(test=test, module=tester.sensors,
253
+ fields=[BRG_SENSOR0],
254
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR],
255
+ target=TESTER)[0]
256
+ if test.rc == TEST_FAILED and test.exit_on_param_failure:
257
+ test.add_reason(f"BRG {tester.id_str}: didn't receive signal indicator receiver configuration!")
258
+ return test
259
+ utPrint(f"BRG {tester.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
260
+
261
+ # configuring tester brg as transmitter (already configured as rx)
262
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Transmitter", "BOLD")
263
+ test = cert_config.brg_configure(test=test, module=tester.energy2400,
264
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
265
+ values=[rx_cycle, rx_rep],
266
+ target=TESTER)[0]
267
+ if test.rc == TEST_FAILED and test.exit_on_param_failure:
268
+ test.add_reason(f"BRG {tester.id_str}: didn't receive signal indicator transmitter configuration!")
269
+ return test
270
+ utPrint(f"BRG {tester.id_str} configured to be transmitter - cycle={rx_cycle}, repetition={rx_rep}")
271
+
272
+ # phase analysis #
273
+ cert_mqtt.mqtt_scan_n_create_log_file(test, NUM_OF_SCANNING_CYCLE * max(tx_cycle, rx_cycle) + SCAN_DELAY_TIME, "rx_tx")
274
+
275
+ # Analyzing dut performance as receiver
276
+ utPrint(f"Analyzing DUT {dut.id_str} performance as a Receiver\n", "BOLD")
277
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=dut, tx_brg=tester)
278
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=tester, rx_brg=dut, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
279
+ test.rc = TEST_FAILED
280
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(dut, tester, NUM_OF_SCANNING_CYCLE)
281
+ test.add_reason(f"rx_tx phase failed - BRG {dut.id_str} received wrong number of "
282
+ f"signal indicator packets\nreceived {len(rec_sig_ind_pkts)} packets, "
283
+ f"expected {expected_signal_ind_pkts} packets")
284
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
285
+
286
+ # Analyzing tester performance as receiver
287
+ utPrint(f"Analyzing DUT {dut.id_str} performance as a Transmitter\n", "BOLD")
288
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
289
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
290
+ test.rc = TEST_FAILED
291
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(dut, tester, NUM_OF_SCANNING_CYCLE)
292
+ test.add_reason(f"rx_tx phase failed - BRG {tester.id_str} received wrong number of "
293
+ f"signal indicator packets\n received {len(rec_sig_ind_pkts)} packets, "
294
+ f"expected {expected_signal_ind_pkts} packets")
295
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
296
+ # NOTE: We skipped the antenna and output power checks for this phase
297
+ return test
298
+
299
+
300
+ SIGNAL_INDICATOR_TEST_MAP = {"rssi_threshold": test_rssi_threshold,
301
+ "rx": test_rx, "tx": test_tx, "rx_tx": test_rx_tx,
302
+ "disable_tx": test_disable_tx, "disable_rx": test_disable_rx}
303
+
304
+
305
+ def run(test):
306
+ # Test prolog
307
+ test = cert_common.test_prolog(test)
308
+
309
+ dut = cert_config.get_brg_by_target(test, DUT)
310
+ tester = cert_config.get_brg_by_target(test, TESTER)
311
+
312
+ # Configure DUT to scan ble5 channel during all the test, if dut is a bridge only,
313
+ # configure the pattern to extended advertising for beeing able to receive ble5 packets on the tester
314
+ if test.dut_is_bridge():
315
+ fields = [BRG_RX_CHANNEL, BRG_PATTERN]
316
+ values = [ag.RX_CHANNEL_10_500K, ag.DATAPATH_PATTERN_EXTENDED_ADV_CH_10]
317
+ else:
318
+ fields = [BRG_RX_CHANNEL]
319
+ values = [ag.RX_CHANNEL_10_500K]
320
+ test = cert_config.brg_configure(test, fields=fields, values=values,
321
+ module=dut.datapath, ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
322
+ if test.rc == TEST_FAILED:
323
+ return cert_common.test_epilog(test, revert_brgs=True,
324
+ modules=[dut.datapath],
325
+ ble5=test.dut_is_bridge())
326
+ if test.dut_is_bridge():
327
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
328
+ # Configure TESTER to scan ble5 channel during all the test
329
+ test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL],
330
+ values=[ag.RX_CHANNEL_10_500K],
331
+ module=tester.datapath, target=TESTER)[0]
332
+ if test.rc == TEST_FAILED:
333
+ return cert_common.test_epilog(test, revert_brgs=True, modules=[dut.datapath],
334
+ brg1_modules=[tester.datapath], ble5=test.dut_is_bridge())
335
+ for param in test.params:
336
+ phase_run_print(param.name)
337
+ test = SIGNAL_INDICATOR_TEST_MAP[param.value](test)
338
+ cert_mqtt.generate_log_file(test, param.name)
339
+ field_functionality_pass_fail_print(test, param.name)
340
+ test.set_phase_rc(param.name, test.rc)
341
+ test.add_phase_reason(param.name, test.reason)
342
+ if test.rc == TEST_FAILED and test.exit_on_param_failure:
343
+ break
344
+ else:
345
+ test.reset_result()
346
+ # Reset DUT to defaults after every phase (don't fail the phase on that)
347
+ test = cert_config.config_brg_defaults(test,
348
+ modules=[dut.energy2400, dut.sensors],
349
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
350
+ if test.dut_is_bridge():
351
+ # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC, we configured 2 modules here
352
+ wait_time_n_print(2 * BLE5_MAX_DURATION_SEC)
353
+ if test.rc == TEST_FAILED:
354
+ test.add_reason("Failed to restore DUT to defaults")
355
+ else:
356
+ # Reset TESTER to defaults after every phase (don't fail the phase on that)
357
+ test = cert_config.config_brg_defaults(test,
358
+ modules=[tester.energy2400, tester.sensors],
359
+ target=TESTER)[0]
360
+ if test.rc == TEST_FAILED:
361
+ test.add_reason("Failed to restore brg0 to defaults")
362
+ if test.rc == TEST_FAILED:
363
+ test.set_phase_rc(param.name, test.rc)
364
+ test.add_phase_reason(param.name, test.reason)
365
+ if test.exit_on_param_failure:
366
+ break
367
+ else:
368
+ test.reset_result()
369
+
370
+ # Revert DUT and TESTER to defaults here and not in epilog
371
+ test = cert_config.config_brg_defaults(test, modules=[dut.datapath], ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
372
+ if test.rc == TEST_FAILED:
373
+ test.add_reason("Failed to revert brg0 datapath to defaults")
374
+ else:
375
+ test = cert_config.config_brg_defaults(test, modules=[tester.datapath], target=TESTER)[0]
376
+ if test.rc == TEST_FAILED:
377
+ test.add_reason("Failed to revert brg1 datapath to defaults")
378
+
379
+ return cert_common.test_epilog(test, revert_brgs=False)
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "Signal Indicator Extended Advertising",
3
+ "module": "Energizer 2.4GHz",
4
+ "purpose": "Verify Signal Indicator functionality when using bridge with extended advertising pattern",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Bridge-to-Bridge-Signal-Indicator",
6
+ "initialCondition": "Bridge configured to defaults",
7
+ "procedure": [
8
+ "Test prolog - Initialize test environment and configure bridges to defaults",
9
+ "ext_adv_rx37 - Configure DUT as Transmitter with extended advertising pattern and RX channel 37, and TESTER as Receiver and Analyze received signal indicator packets count, RX/TX antenna, output power, and RSSI values",
10
+ "ext_adv_rx10 - Configure DUT as Transmitter with extended advertising pattern and RX channel 10, and TESTER as Receiver and Analyze received signal indicator packets count, RX/TX antenna, output power, and RSSI values",
11
+ "Test epilog - Finalize test results and log outcomes"
12
+ ],
13
+ "expectedOutcome": "All phases passed successfully!",
14
+ "mandatory": 0,
15
+ "multiBridgeTest": 1,
16
+ "gwOnlyTest": 0,
17
+ "dataSimOnlyTest": 0,
18
+ "SupportedFromApiVersion": 13,
19
+ "allSupportedValues": ["ext_adv_rx37", "ext_adv_rx10"]
20
+ }
@@ -0,0 +1,173 @@
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
+ # Test MACROS #
9
+ NUM_OF_SCANNING_CYCLE = 5
10
+ SCAN_DELAY_TIME = 3
11
+
12
+
13
+ def test_ext_adv_rx37(test):
14
+
15
+ dut = cert_config.get_brg_by_target(test, DUT)
16
+ tester = cert_config.get_brg_by_target(test, TESTER)
17
+ cycle, rep = 8, 4
18
+
19
+ # Configuring DUT #
20
+ # configuring transmitter #
21
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Transmitter (cycle={cycle}, repetition={rep})", "BLUE")
22
+ test = cert_config.brg_configure(test=test, module=dut.energy2400,
23
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
24
+ values=[cycle, rep])[0]
25
+ if test.rc == TEST_FAILED:
26
+ test.add_reason(f"DUT BRG {dut.id_str}: didn't receive signal indicator transmitter configuration!")
27
+ return test
28
+ # configuring extended advertising and rx channel #
29
+ utPrint(f"Configuring DUT BRG {dut.id_str} with extended advertising and rx channel 37", "BLUE")
30
+ test = cert_config.brg_configure(test=test, module=dut.datapath,
31
+ fields=[BRG_RX_CHANNEL, BRG_PATTERN],
32
+ values=[ag.RX_CHANNEL_37, ag.DATAPATH_PATTERN_EXTENDED_ADV])[0]
33
+ if test.rc == TEST_FAILED:
34
+ test.add_reason(f"DUT BRG {dut.id_str}: didn't receive extended advertising and rx channel configuration!")
35
+ return test
36
+
37
+ # configuring TESTER #
38
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Receiver", "BLUE")
39
+ test = cert_config.brg_configure(test=test, module=tester.sensors, fields=[BRG_SENSOR0],
40
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], target=TESTER)[0]
41
+ if test.rc == TEST_FAILED:
42
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive signal indicator receiver configuration!")
43
+ return test
44
+ utPrint(f"Configuring TESTER BRG {tester.id_str} with rx channel 37", "BLUE")
45
+ test = cert_config.brg_configure(test=test, module=tester.datapath, fields=[BRG_RX_CHANNEL],
46
+ values=[ag.RX_CHANNEL_37], target=TESTER)[0]
47
+ if test.rc == TEST_FAILED:
48
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive rx channel configuration!")
49
+ return test
50
+
51
+ # phase analysis #
52
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME,
53
+ f"tx_{cycle}_{rep}")
54
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
55
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
56
+ test.rc = TEST_FAILED
57
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tester, dut, NUM_OF_SCANNING_CYCLE)
58
+ test.add_reason(f"tx phase failed - BRG {dut.id_str} received wrong number of "
59
+ f"signal indicator packets\nreceived {len(rec_sig_ind_pkts)} packets, "
60
+ f"expected {expected_signal_ind_pkts} packets")
61
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
62
+ print([[p[TIMESTAMP], p[UNIFIED_SENSOR_PKT].pkt.signal_indicator_payload.rx_antenna] for p in rec_sig_ind_pkts])
63
+ return test
64
+
65
+ test = cert_common.rx_tx_antenna_check(test, rec_sig_ind_pkts, dut, tester, NUM_OF_SCANNING_CYCLE)
66
+ test = cert_common.output_power_check(test, rec_sig_ind_pkts, dut)
67
+ test = cert_common.rssi_check(test, rec_sig_ind_pkts)
68
+
69
+ return test
70
+
71
+
72
+ def test_ext_adv_rx10(test):
73
+
74
+ dut = cert_config.get_brg_by_target(test, DUT)
75
+ tester = cert_config.get_brg_by_target(test, TESTER)
76
+ cycle, rep = 8, 4
77
+
78
+ # Configuring DUT #
79
+ # configuring transmitter #
80
+ utPrint(f"Configuring DUT BRG {dut.id_str} as Signal Indicator Transmitter (cycle={cycle}, repetition={rep})", "BLUE")
81
+ test = cert_config.brg_configure(test=test, module=dut.energy2400,
82
+ fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
83
+ values=[cycle, rep])[0]
84
+ if test.rc == TEST_FAILED:
85
+ test.add_reason(f"DUT BRG {dut.id_str}: didn't receive signal indicator transmitter configuration!")
86
+ return test
87
+ # configuring extended advertising and rx channel #
88
+ utPrint(f"Configuring DUT BRG {dut.id_str} with extended advertising and rx channel 10", "BLUE")
89
+ test = cert_config.brg_configure(test=test, module=dut.datapath,
90
+ fields=[BRG_RX_CHANNEL, BRG_PATTERN],
91
+ values=[ag.RX_CHANNEL_10_500K, ag.DATAPATH_PATTERN_EXTENDED_ADV],
92
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
93
+ if test.rc == TEST_FAILED:
94
+ test.add_reason(f"DUT BRG {dut.id_str}: didn't receive extended advertising and rx channel configuration!")
95
+ return test
96
+ if test.dut_is_bridge():
97
+ wait_time_n_print(BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to BLE5_MAX_DURATION_SEC
98
+
99
+ # configuring TESTER #
100
+ utPrint(f"Configuring TESTER BRG {tester.id_str} as Signal Indicator Receiver", "BLUE")
101
+ test = cert_config.brg_configure(test=test, module=tester.sensors, fields=[BRG_SENSOR0],
102
+ values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], target=TESTER)[0]
103
+ if test.rc == TEST_FAILED:
104
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive signal indicator receiver configuration!")
105
+ return test
106
+ utPrint(f"Configuring TESTER BRG {tester.id_str} with rx channel 10", "BLUE")
107
+ test = cert_config.brg_configure(test=test, module=tester.datapath, fields=[BRG_RX_CHANNEL],
108
+ values=[ag.RX_CHANNEL_10_500K], target=TESTER)[0]
109
+ if test.rc == TEST_FAILED:
110
+ test.add_reason(f"TESTER BRG {tester.id_str}: didn't receive rx channel configuration!")
111
+ return test
112
+
113
+ # phase analysis #
114
+ cert_mqtt.mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME,
115
+ f"tx_{cycle}_{rep}")
116
+ rec_sig_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tester, tx_brg=dut)
117
+ if cert_common.sig_ind_pkts_fail_analysis(tx_brg=dut, rx_brg=tester, cycles=NUM_OF_SCANNING_CYCLE, received_pkts=rec_sig_ind_pkts):
118
+ test.rc = TEST_FAILED
119
+ expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tester, dut, NUM_OF_SCANNING_CYCLE)
120
+ test.add_reason(f"tx phase failed - BRG {dut.id_str} received wrong number of "
121
+ f"signal indicator packets\nreceived {len(rec_sig_ind_pkts)} packets, "
122
+ f"expected {expected_signal_ind_pkts} packets")
123
+ print(rec_sig_ind_pkts) # TODO: logging print(debug)
124
+ print([[p[TIMESTAMP], p[UNIFIED_SENSOR_PKT].pkt.signal_indicator_payload.rx_antenna] for p in rec_sig_ind_pkts])
125
+ return test
126
+
127
+ test = cert_common.rx_tx_antenna_check(test, rec_sig_ind_pkts, dut, tester, NUM_OF_SCANNING_CYCLE)
128
+ test = cert_common.output_power_check(test, rec_sig_ind_pkts, dut)
129
+ test = cert_common.rssi_check(test, rec_sig_ind_pkts)
130
+
131
+ return test
132
+
133
+
134
+ SIGNAL_INDICATOR_TEST_MAP = {"ext_adv_rx37": test_ext_adv_rx37, "ext_adv_rx10": test_ext_adv_rx10}
135
+
136
+
137
+ def run(test):
138
+ # Test prolog
139
+ test = cert_common.test_prolog(test)
140
+
141
+ # Configure to rx channel and extended advertising pattern
142
+ dut = cert_config.get_brg_by_target(test, DUT)
143
+ tester = cert_config.get_brg_by_target(test, TESTER)
144
+
145
+ for param in test.params:
146
+ phase_run_print(param.name)
147
+ test = SIGNAL_INDICATOR_TEST_MAP[param.value](test)
148
+ cert_mqtt.generate_log_file(test, param.name)
149
+ field_functionality_pass_fail_print(test, param.name)
150
+ test.set_phase_rc(param.name, test.rc)
151
+ test.add_phase_reason(param.name, test.reason)
152
+
153
+ if test.rc == TEST_FAILED:
154
+ test.set_phase_rc(param.name, test.rc)
155
+ test.add_phase_reason(param.name, test.reason)
156
+ if test.exit_on_param_failure:
157
+ break
158
+ else:
159
+ test.reset_result()
160
+
161
+ # Revert DUT and TESTER to defaults here and not in epilog
162
+ test = cert_config.config_brg_defaults(test, modules=[dut.datapath, dut.energy2400],
163
+ ble5=test.dut_is_bridge(), wait=test.dut_is_combo())[0]
164
+ if test.dut_is_bridge():
165
+ wait_time_n_print(2 * BLE5_MAX_DURATION_SEC) # BLE5 configuration can take up to 2 * BLE5_MAX_DURATION_SEC
166
+ if test.rc == TEST_FAILED:
167
+ test.add_reason("Failed to revert dut to defaults")
168
+ else:
169
+ test = cert_config.config_brg_defaults(test, modules=[tester.datapath, tester.sensors], target=TESTER)[0]
170
+ if test.rc == TEST_FAILED:
171
+ test.add_reason("Failed to revert tester to defaults")
172
+
173
+ return cert_common.test_epilog(test, revert_brgs=False)
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "Signal Indicator",
3
+ "module": "Energizer 2.4GHz",
4
+ "purpose": "Test functionality for supported Energizer 2.4GHz signal indicator cycle & repetitions sets of values",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Energizing-2-4Ghz",
6
+ "initialCondition": "Bridge configured to defaults",
7
+ "procedure": [
8
+ "Test prolog",
9
+ "rssi_threshold - Configure DUT as signal-indicator receiver with RSSI threshold (e.g., -25 dBm). Configure TESTER as transmitter. Scan and verify all received signal-indicator packets meet the RSSI threshold (no packets weaker than threshold).",
10
+ "rx - Configure DUT as receiver and TESTER as transmitter. Scan and validate expected count and timing of signal-indicator packets, including antenna, output power, and RSSI checks.",
11
+ "tx_eu_pattern - Set DUT datapath to EU pattern, configure DUT as transmitter. Configure TESTER as receiver on RX channel 37. Scan and validate expected packet count; then run antenna/output-power/RSSI checks.",
12
+ "disable_tx - Configure TESTER as receiver only; DUT not transmitting. TESTER scan and verify no signal-indicator packets are received.",
13
+ "disable_rx - Configure TESTER as transmitter; DUT not configured as receiver. Scan and verify DUT receives zero signal-indicator packets.",
14
+ "rx_tx - Configure both DUT and TESTER as receivers and transmitters. Scan and validate expected packet counts for each direction.",
15
+ "Test epilog"
16
+ ],
17
+ "expectedOutcome": "All phases passes successfully",
18
+ "mandatory": 0,
19
+ "multiBridgeTest": 1,
20
+ "gwOnlyTest": 0,
21
+ "dataSimOnlyTest": 0,
22
+ "SupportedFromApiVersion": 13,
23
+ "allSupportedValues": ["rssi_threshold", "rx", "tx_eu_pattern", "disable_tx", "disable_rx", "rx_tx"]
24
+ }