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
@@ -1,321 +0,0 @@
1
- from brg_certificate.cert_prints import *
2
- from brg_certificate.cert_defines import *
3
- from brg_certificate.wlt_types import *
4
- import brg_certificate.cert_common as cert_common
5
- import brg_certificate.cert_config as cert_config
6
-
7
- # Test Description:
8
- # This test is to verify the functionality of both signal indicator tx (tx_brg) and rx (rx_brg) at BRG level.
9
- # We will configure several signal indicator params during the test, and check the functionality of the signal indicator logic
10
- # for each of them.
11
- # 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.
12
- # At first, we will configure several tx signal indicator params and check for ack's, to verify all indicated params were
13
- # received at the cloud.
14
- # Then, we will examine the signal indicator end-2-end logic with both transmitter and receiver:
15
- # phase 1 - One BRG will be configured as signal indicator tx, and the other as signal indicator rx, and we expect to see
16
- # signal indicator packets only from the tx BRG, and according to the tx params (to check the repetition and cycle params).
17
- # phase 2 - Same as phase 1, but with different tx params configured.
18
- # 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
19
- # brg module logic is working properly, and no tag packet is accidentally being treated as signal indicator packet.
20
- # phase 4 - Both BRG's will be configured to be transmitters and receivers, with different tx params for each one. we expect
21
- # to see signal indicator packets from both BRG's, according to the tx params.
22
- # phase 5 - One BRG will be configured as signal indicator tx, but no rx, so we don't expect to receive signal indicatopr packets.
23
- # that way we can assure the logic within the receiver is not confused by the signal indicator uuid as external sensor.
24
-
25
-
26
- # Test MACROS #
27
- NUM_OF_SCANNING_CYCLE = 5
28
- DEFAULT_SCAN_TIME = 30
29
- SCAN_DELAY_TIME = 3
30
- BLE4_BROADCAST_DURATION = ag.BLE5_PARAM_PRIMARY_CHANNEL_SCAN_CYCLE // 1000 + 1
31
-
32
-
33
- def test_rssi_threshold(test):
34
- cycle, rep = 5, 4
35
- rx_brg_ = test.brg1 # when internal_brg test this is the internal_brg
36
- tx_brg_ = test.brg0
37
- rssi_threshold = -25
38
-
39
- utPrint(f"TX BRG with RX- cycle = {cycle}, repetition = {rep}\n", "BLUE")
40
- # configuring receiver #
41
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Receiver with RSSI Threshold of {rssi_threshold}", "BOLD")
42
- is_ble5 = not test.internal_brg
43
- test = cert_config.brg1_configure(test=test, module=rx_brg_.sensors, fields=[BRG_SENSOR0, BRG_RSSI_THRESHOLD],
44
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR, rssi_threshold], ble5=is_ble5, wait=True)[0]
45
- if test.rc == TEST_FAILED:
46
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
47
- return test
48
- # configuring transmitter #
49
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator Transmitter", "BOLD")
50
- wait = not test.internal_brg
51
- test = cert_config.brg_configure(test=test, module=tx_brg_.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
52
- values=[cycle, rep], ble5=True, wait=wait)[0]
53
- if test.rc == TEST_FAILED:
54
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator transmitter configuration!")
55
- return test
56
- utPrint(f"BRG {tx_brg_.id_str} configured to be transmitter - cycle = {cycle},"
57
- f"repetition = {rep}", "BOLD")
58
- # phase analysis #
59
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
60
- mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, "rssi_threshold")
61
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
62
- for p in received_signal_ind_pkts:
63
- print(f"rssi value: {p[RSSI]}")
64
- rssi_threshold_viloation_pkts = [p for p in received_signal_ind_pkts if p[RSSI] >= -1 * rssi_threshold]
65
- if rssi_threshold_viloation_pkts:
66
- test.rc = TEST_FAILED
67
- test.add_reason(f"rssi_threshold phase failed - BRG {rx_brg_.id_str} echoed"
68
- f" {len(rssi_threshold_viloation_pkts)} signal indicator packets\n with RSSI weaker than {rssi_threshold}")
69
- return test
70
-
71
-
72
- def test_brg0_tx_brg1_rx(test):
73
-
74
- tx_brg_ = test.brg0
75
- rx_brg_ = test.brg1 # when internal_brg test this is the internal_brg
76
- cycle, rep = 8, 4
77
-
78
- utPrint(f"TX BRG with RX- cycle = {cycle}, repetition = {rep}\n", "BLUE")
79
- # configuring receiver #
80
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Receiver", "BOLD")
81
- is_ble5 = not test.internal_brg
82
- test = cert_config.brg1_configure(test=test, module=rx_brg_.sensors, fields=[BRG_SENSOR0],
83
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], ble5=is_ble5, wait=True)[0]
84
- if test.rc == TEST_FAILED:
85
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
86
- return test
87
- # configuring transmitter #
88
- wait = not test.internal_brg
89
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator Transmitter", "BOLD")
90
- test = cert_config.brg_configure(test=test, module=tx_brg_.energy2400,
91
- fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
92
- values=[cycle, rep], ble5=True, wait=wait)[0]
93
- if test.rc == TEST_FAILED:
94
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator transmitter configuration!")
95
- return test
96
- utPrint(f"BRG {tx_brg_.id_str} configured to be transmitter - cycle = {cycle},"
97
- f"repetition = {rep}", "BOLD")
98
- # phase analysis #
99
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
100
- mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, f"brg0_rx_brg1_tx_{cycle}_{rep}")
101
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
102
-
103
- if cert_common.sig_ind_pkts_fail_analysis(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE, received_signal_ind_pkts):
104
- test.rc = TEST_FAILED
105
- expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE)
106
- test.add_reason(f"brg0_rx_brg1_tx phase failed - BRG {rx_brg_.id_str} received wrong number of "
107
- f"signal indicator packets\nreceived {len(received_signal_ind_pkts)} packets, "
108
- f"expected {expected_signal_ind_pkts} packets")
109
- print(received_signal_ind_pkts) # TODO: logging print(debug)
110
- print([[p[TIMESTAMP], p[SENSOR_PKT].pkt.rx_antenna] for p in received_signal_ind_pkts])
111
-
112
- test = cert_common.rx_tx_antenna_check(test, received_signal_ind_pkts, tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE)
113
- test = cert_common.output_power_check(test, received_signal_ind_pkts, tx_brg_)
114
- test = cert_common.rssi_check(test, received_signal_ind_pkts)
115
-
116
- return test
117
-
118
-
119
- def test_brg0_none_brg1_rx(test):
120
- cycle, rep = ag.BRG_DEFAULT_SIGNAL_INDICATOR_CYCLE, ag.BRG_DEFAULT_SIGNAL_INDICATOR_REP
121
- tx_brg_ = test.brg0
122
- rx_brg_ = test.brg1 # when internal_brg test this is the internal_brg
123
- utPrint(f"RX BRG without TX- cycle = {cycle}, repetition = {rep}\n", "BLUE")
124
- # configuring receiver #
125
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Receiver", "BOLD")
126
- is_ble5 = not test.internal_brg
127
- test = cert_config.brg1_configure(test=test, module=rx_brg_.sensors, fields=[BRG_SENSOR0],
128
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], ble5=is_ble5, wait=True)[0]
129
- if test.rc == TEST_FAILED:
130
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
131
- return test
132
- utPrint(f"BRG {rx_brg_.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
133
-
134
- # phase analysis #
135
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
136
- mqtt_scan_n_create_log_file(test, DEFAULT_SCAN_TIME, "brg0_none_brg1_rx")
137
- expected_signal_ind_pkts = [0]
138
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
139
- if len(received_signal_ind_pkts) not in expected_signal_ind_pkts:
140
- test.rc = TEST_FAILED
141
- test.add_reason(f"brg0_rx_brg1_tx phase failed - BRG {rx_brg_.id_str} received wrong number of "
142
- f"signal indicator packets\n received {len(received_signal_ind_pkts)} packets, "
143
- f"expected {expected_signal_ind_pkts} packets")
144
-
145
- return test
146
-
147
-
148
- def test_brg0_rxtx_brg1_rxtx(test):
149
-
150
- if test.internal_brg:
151
- # Can't scan on ble5 with internal brg because config won't be received
152
- test.add_reason("skip for internal BRG")
153
- test.rc = TEST_SKIPPED
154
- return test
155
-
156
- tx_cycle, tx_rep = 5, 4
157
- rx_cycle, rx_rep = 5, 4
158
- tx_brg_ = test.brg0
159
- rx_brg_ = test.brg1
160
- utPrint("Both BRG's are transmitter and receivers, with different values\n", "BLUE")
161
- # configuring first brg (tx_brg_) as receiver
162
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator Receiver", "BOLD")
163
- test = cert_config.brg_configure(test=test, module=tx_brg_.sensors, fields=[BRG_SENSOR0],
164
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], ble5=True)[0]
165
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
166
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
167
- return test
168
- utPrint(f"BRG {tx_brg_.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
169
- # configuring first brg (tx_brg_) as transmitter
170
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator Transmitter", "BOLD")
171
- test = cert_config.brg_configure(test=test, module=tx_brg_.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
172
- values=[tx_cycle, tx_rep], ble5=True)[0]
173
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
174
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator transmitter configuration!")
175
- return test
176
- utPrint(f"BRG {tx_brg_.id_str} configured to be transmitter - cycle={tx_cycle}, repetition={tx_rep}", "BOLD")
177
-
178
- # configuring second brg (rx_brg_) as receiver
179
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Receiver", "BOLD")
180
- test = cert_config.brg1_configure(test=test, module=rx_brg_.sensors, fields=[BRG_SENSOR0],
181
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR], ble5=True)[0]
182
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
183
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
184
- return test
185
- utPrint(f"BRG {rx_brg_.id_str} successfully configured as Signal Indicator Receiver\n", "BOLD")
186
-
187
- # configuring second brg (rx_brg_) as transmitter (already configured as rx)
188
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Transmitter", "BOLD")
189
- test = cert_config.brg1_configure(test=test, module=rx_brg_.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
190
- values=[rx_cycle, rx_rep], ble5=True)[0]
191
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
192
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator transmitter configuration!")
193
- return test
194
- utPrint(f"BRG {rx_brg_.id_str} configured to be transmitter - cycle={rx_cycle}, repetition={rx_rep}")
195
-
196
- # phase analysis #
197
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
198
- mqtt_scan_n_create_log_file(test, NUM_OF_SCANNING_CYCLE * max(tx_cycle, rx_cycle) + SCAN_DELAY_TIME, "brg0_rxtx_brg1_rxtx")
199
-
200
- # Analyzing tx_brg_ performance as receiver
201
- utPrint(f"Analyzing tx_brg {tx_brg_.id_str} performance as a Receiver\n", "BOLD")
202
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=tx_brg_, tx_brg=rx_brg_)
203
- if cert_common.sig_ind_pkts_fail_analysis(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE, received_signal_ind_pkts):
204
- test.rc = TEST_FAILED
205
- expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE)
206
- test.add_reason(f"brg0_rxtx_brg1_rxtx phase failed - BRG {tx_brg_.id_str} received wrong number of "
207
- f"signal indicator packets\nreceived {len(received_signal_ind_pkts)} packets, "
208
- f"expected {expected_signal_ind_pkts} packets")
209
- print(received_signal_ind_pkts) # TODO: logging print(debug)
210
-
211
- # Analyzing rx_brg_ performance as receiver
212
- utPrint(f"Analyzing rx_brg {rx_brg_.id_str} performance as a Receiver\n", "BOLD")
213
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
214
- if cert_common.sig_ind_pkts_fail_analysis(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE, received_signal_ind_pkts):
215
- test.rc = TEST_FAILED
216
- expected_signal_ind_pkts = cert_common.exp_sig_ind_pkts2(tx_brg_, rx_brg_, NUM_OF_SCANNING_CYCLE)
217
- test.add_reason(f"brg0_rxtx_brg1_rxtx phase failed - BRG {rx_brg_.id_str} received wrong number of "
218
- f"signal indicator packets\n received {len(received_signal_ind_pkts)} packets, "
219
- f"expected {expected_signal_ind_pkts} packets")
220
- print(received_signal_ind_pkts) # TODO: logging print(debug)
221
- # NOTE: We skipped the antenna and output power checks for this phase
222
- return test
223
-
224
-
225
- def test_brg0_tx_brg1_none(test):
226
- # Tx BRG without rx. just waiting for packets to be sent from the transmitter and verify
227
- # The receiver isn't receiving any signal indicator packets.
228
- cycle, rep = 4, 3
229
- tx_brg_ = test.brg0
230
- rx_brg_ = test.brg1 # when internal_brg test this is the internal_brg
231
- utPrint(f"TX BRG without RX - cycle = {cycle}, repetition = {rep}\n", "BLUE")
232
- # configuring transmitter #
233
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator Transmitter", "BOLD")
234
- wait = not test.internal_brg
235
- test = cert_config.brg_configure(test=test, module=tx_brg_.energy2400, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
236
- values=[cycle, rep], ble5=True, wait=wait)[0]
237
- if test.rc == TEST_FAILED:
238
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator transmitter configuration!")
239
- return test
240
-
241
- # phase analysis #
242
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
243
- mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * cycle) + SCAN_DELAY_TIME, "brg0_tx_brg1_none")
244
- expected_signal_ind_pkts = [0]
245
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
246
- if len(received_signal_ind_pkts) not in expected_signal_ind_pkts:
247
- test.rc = TEST_FAILED
248
- test.add_reason(f"brg0_tx_brg1_none phase failed - received signal indicator packet from BRG"
249
- f"{rx_brg_.id_str}")
250
- test = cert_common.output_power_check(test, received_signal_ind_pkts, tx_brg_)
251
-
252
- return test
253
-
254
-
255
- SIGNAL_INDICATOR_TEST_MAP = {"rssi_threshold": test_rssi_threshold, "brg0_tx_brg1_rx": test_brg0_tx_brg1_rx,
256
- "brg0_none_brg1_rx": test_brg0_none_brg1_rx, "brg0_rxtx_brg1_rxtx": test_brg0_rxtx_brg1_rxtx,
257
- "brg0_tx_brg1_none": test_brg0_tx_brg1_none}
258
-
259
-
260
- def run(test):
261
- # Test prolog
262
- test = cert_common.test_prolog(test)
263
-
264
- # Configure to scan ble5 channel during all the test
265
- test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_10_500K],
266
- module=test.brg0.datapath, ble5=True)[0]
267
- if test.rc == TEST_FAILED:
268
- return cert_common.test_epilog(test, revert_brgs=True, modules=[test.brg0.datapath], ble5=True)
269
- test = cert_config.brg1_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_10_500K], module=test.brg1.datapath)[0]
270
- if test.rc == TEST_FAILED:
271
- is_ble5 = not test.internal_brg
272
- return cert_common.test_epilog(test, revert_brgs=True, modules=[test.brg0.datapath],
273
- brg1_modules=[test.brg1.datapath], ble5=is_ble5)
274
-
275
- for param in test.params:
276
- phase_run_print(param.name)
277
- test = SIGNAL_INDICATOR_TEST_MAP[param.value](test)
278
- generate_log_file(test, param.name)
279
- field_functionality_pass_fail_print(test, param.name)
280
- test.set_phase_rc(param.name, test.rc)
281
- test.add_phase_reason(param.name, test.reason)
282
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
283
- break
284
- else:
285
- test.reset_result()
286
-
287
- # Reset to defaults after every phase (don't fail the phase on that)
288
- test = cert_config.config_brg_defaults(test, modules=[test.brg0.energy2400, test.brg0.sensors], ble5=True, wait=False)[0]
289
- # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec, we configured 2 modules here
290
- print_update_wait(2 * BLE4_BROADCAST_DURATION)
291
- if test.rc == TEST_FAILED:
292
- test.add_reason("Failed to restore brg0 to defaults")
293
- else:
294
- is_ble5 = not test.internal_brg
295
- wait = test.internal_brg
296
- test = cert_config.config_brg1_defaults(test, modules=[test.brg1.energy2400, test.brg1.sensors], ble5=is_ble5, wait=wait)[0]
297
- # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec, we configured 2 modules here
298
- print_update_wait(2 * BLE4_BROADCAST_DURATION)
299
- if test.rc == TEST_FAILED:
300
- test.add_reason("Failed to restore brg0 to defaults")
301
- if test.rc == TEST_FAILED:
302
- test.set_phase_rc(param.name, test.rc)
303
- test.add_phase_reason(param.name, test.reason)
304
- if test.exit_on_param_failure:
305
- break
306
- else:
307
- test.reset_result()
308
-
309
- # Revert to defaults here and not in epilog
310
- test = cert_config.config_brg_defaults(test, modules=[test.brg0.datapath], ble5=True, wait=False)[0]
311
- if test.rc == TEST_FAILED:
312
- test.add_reason("Failed to revert brg0 datapath to defaults")
313
- else:
314
- is_ble5 = not test.internal_brg
315
- wait = test.internal_brg
316
- test = cert_config.config_brg1_defaults(test, modules=[test.brg1.datapath], ble5=is_ble5, wait=wait)[0]
317
- if test.rc == TEST_FAILED:
318
- test.add_reason("Failed to revert brg1 datapath to defaults")
319
- print_update_wait(BLE4_BROADCAST_DURATION) # BLE5 configuration can take up to BLE4_BROADCAST_DURATION sec
320
-
321
- return cert_common.test_epilog(test, revert_brgs=False)
@@ -1,20 +0,0 @@
1
- {
2
- "name": "Signal Indicator 2.4 & Sub1g Sync",
3
- "module": "Energizer 2.4GHz",
4
- "purpose": "Verify the signal indicator tx sync mechanism when transmitting in both sub1g & 2.4 GHz bands.",
5
- "documentation": "<TEST_DOCUMENTATION_LINK>",
6
- "initialCondition": "1 GW and at least 1 BRG (tx brg) connected to the GW.",
7
- "procedure": ["Test prolog",
8
- "Configure rx BRG to receive signal indicator packets (can be BRG or internal BRG)",
9
- "Configure tx BRG to transmit signal indicator 2.4 GHz packets",
10
- "Configure tx BRG to transmit signal indicator sub1g packets with same repetitions & cycle time as 2.4 GHz",
11
- "Scan packets for 3 cycles",
12
- "Verify same number of packets received in both sub1g & 2.4 GHz bands",
13
- "Test epilog"],
14
- "expectedOutcome": "Sync mechanism should work correctly, with the same number of packets received in both sub1g & 2.4 GHz bands.",
15
- "mandatory": 0,
16
- "multiBridgeTest": 1,
17
- "gwOnlyTest": 0,
18
- "internalBridge": 1,
19
- "allSupportedValues": []
20
- }
@@ -1,141 +0,0 @@
1
- from brg_certificate.cert_prints import *
2
- from brg_certificate.cert_defines import *
3
- import brg_certificate.cert_common as cert_common
4
- import brg_certificate.cert_config as cert_config
5
- from brg_certificate.wlt_types import *
6
-
7
-
8
- # Test MACROS #
9
- NUM_OF_SCANNING_CYCLE = 3
10
- DEFAULT_SCAN_TIME = 60
11
- SCAN_DELAY_TIME = 5
12
- ANTENNA_TYPE_2_4 = 0
13
- ANTENNA_TYPE_SUB1G = 1
14
-
15
-
16
- # Test functions #
17
- def expected_signal_ind_pkts_calc(tx_brg, rx_brg, antenna_type):
18
- if (antenna_type == ANTENNA_TYPE_2_4 and tx_brg.board_type in cert_common.dual_polarization_ant_boards_get()):
19
- tx_brg_ant_polarization_num = 2
20
- else:
21
- tx_brg_ant_polarization_num = 1
22
- if (antenna_type == ANTENNA_TYPE_2_4 and rx_brg.board_type in cert_common.dual_polarization_ant_boards_get()):
23
- rx_brg_ant_polarization_num = 2
24
- else:
25
- rx_brg_ant_polarization_num = 1
26
- return NUM_OF_SCANNING_CYCLE * tx_brg_ant_polarization_num * rx_brg_ant_polarization_num
27
-
28
-
29
- def terminate_test(test, revert_rx_brg=False, revert_tx_brg=False, rx_modules=[], tx_modules=[]):
30
- # Temp solution for internal_brg test because test_epilog doesn't support both internal brg and test.brgs
31
- utPrint("Terminating test!!!!!!!!\n", "BLUE")
32
- if revert_rx_brg:
33
- restore_modules = rx_modules
34
- utPrint(f"reverting rx_brg {test.brg1.id_str} to defaults\n", "BOLD")
35
- test, response = cert_config.config_brg1_defaults(test, modules=restore_modules)
36
- if response == NO_RESPONSE and test.exit_on_param_failure:
37
- test.rc = TEST_FAILED
38
- test.add_reason(f"BRG {test.brg1.id_str} didn't revert modules "
39
- f"{restore_modules} to default configuration!")
40
-
41
- if revert_tx_brg:
42
- restore_modules = tx_modules
43
- utPrint(f"reverting tx_brg {test.brg0.id_str} to defaults\n", "BOLD")
44
- test, response = cert_config.config_brg_defaults(test, modules=restore_modules)
45
- if response == NO_RESPONSE and test.exit_on_param_failure:
46
- test.rc = TEST_FAILED
47
- test.add_reason(f"BRG {test.brg0.id_str} didn't revert modules"
48
- f"{restore_modules} to default configuration!")
49
- return cert_common.test_epilog(test)
50
-
51
-
52
- # Test execution #
53
- def run(test):
54
-
55
- # Test modules evaluation #
56
- energy2400_module = test.active_brg.energy2400
57
- ext_sensors_module = test.active_brg.sensors
58
- energy_sub1g_module = test.active_brg.energy_sub1g
59
-
60
- # Transmitter related defines #
61
- tx_brg_ = test.brg0
62
-
63
- # Receiver related defines #
64
- rx_brg_ = test.brg1
65
-
66
- # Test prolog
67
- test = cert_common.test_prolog(test)
68
- if test.rc == TEST_FAILED:
69
- return terminate_test(test)
70
-
71
- tx_signal_ind_cycle, tx_signal_ind_rep = 15, 4
72
- utPrint(f"TX BRG in both sub1g & 2.4 - cycle = {tx_signal_ind_cycle}, repetition = {tx_signal_ind_rep}\n", "HEADER")
73
-
74
- # configuring receiver #
75
- utPrint(f"Configuring BRG {rx_brg_.id_str} as Signal Indicator Receiver", "BOLD")
76
- test = cert_config.brg1_configure(test=test, module=ext_sensors_module, fields=[BRG_SENSOR0],
77
- values=[ag.EXTERNAL_SENSORS_SIGNAL_INDICATOR])[0]
78
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
79
- test.add_reason(f"BRG {rx_brg_.id_str}: didn't receive signal indicator receiver configuration!")
80
- return terminate_test(test, revert_rx_brg=True, rx_modules=[ext_sensors_module])
81
- utPrint(f"BRG {rx_brg_.id_str} successfully configured to be receiver", "GREEN")
82
-
83
- # configuring transmitter 2_4 #
84
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator 2_4 Transmitter", "BOLD")
85
- test = cert_config.brg_configure(test, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP],
86
- values=[tx_signal_ind_cycle, tx_signal_ind_rep], module=energy2400_module)[0]
87
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
88
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator 2_4 transmitter configuration!")
89
- return terminate_test(test, revert_rx_brg=True, revert_tx_brg=True)
90
- utPrint(f"BRG {tx_brg_.id_str} successfully configured to be 2_4 transmitter - cycle = {tx_signal_ind_cycle},"
91
- f"repetition = {tx_signal_ind_rep}", "GREEN")
92
-
93
- # configuring transmitter sub1g #
94
- utPrint(f"Configuring BRG {tx_brg_.id_str} as Signal Indicator sub1g Transmitter", "BOLD")
95
- test = cert_config.brg_configure(test, fields=[BRG_SIGNAL_INDICATOR_CYCLE, BRG_SIGNAL_INDICATOR_REP, BRG_DUTY_CYCLE],
96
- values=[tx_signal_ind_cycle, tx_signal_ind_rep, 0],
97
- module=energy_sub1g_module)[0]
98
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
99
- test.add_reason(f"BRG {tx_brg_.id_str}: didn't receive signal indicator sub1g transmitter configuration!")
100
- return terminate_test(test, revert_rx_brg=True, revert_tx_brg=True, rx_modules=[ext_sensors_module],
101
- tx_modules=[energy2400_module, energy_sub1g_module])
102
- utPrint(f"BRG {tx_brg_.id_str} successfully configured to be Sub1g transmitter - cycle = {tx_signal_ind_cycle},"
103
- f"repetition = {tx_signal_ind_rep}, EP = {ag.SUB1G_ENERGY_PATTERN_ISRAEL}", "GREEN")
104
-
105
- # analysis #
106
- mqtt_scan_n_create_log_file(test, (NUM_OF_SCANNING_CYCLE * tx_signal_ind_cycle) + SCAN_DELAY_TIME)
107
- received_signal_ind_pkts = cert_common.get_all_sig_ind_pkts(test=test, rx_brg=rx_brg_, tx_brg=tx_brg_)
108
- expected_signal_ind_2_4_pkts = expected_signal_ind_pkts_calc(tx_brg_, rx_brg_, ANTENNA_TYPE_2_4)
109
- expected_signal_ind_sub1g_pkts = expected_signal_ind_pkts_calc(tx_brg_, rx_brg_, ANTENNA_TYPE_SUB1G)
110
- signal_indicator_2_4_packets = 0
111
- signal_indicator_sub1g_packets = 0
112
- for p in received_signal_ind_pkts:
113
- if p[SENSOR_PKT].pkt.antenna_type == ANTENNA_TYPE_SUB1G and p[SENSOR_ID] == tx_brg_.id_str:
114
- signal_indicator_sub1g_packets += 1
115
- elif p[SENSOR_PKT].pkt.antenna_type == ANTENNA_TYPE_2_4 and p[SENSOR_ID] == tx_brg_.id_alias:
116
- signal_indicator_2_4_packets += 1
117
- utPrint(f"Received {signal_indicator_2_4_packets} 2_4 signal indicator packets"
118
- f" and {signal_indicator_sub1g_packets} sub1g signal indicator packets", "BLUE")
119
-
120
- # Test evaluation #
121
- if len(received_signal_ind_pkts) != expected_signal_ind_2_4_pkts + expected_signal_ind_sub1g_pkts:
122
- test.rc = TEST_FAILED
123
- test.add_reason(f"Test failed - BRG {rx_brg_.id_str} received wrong number of "
124
- f"total signal indicator packets\n received {len(received_signal_ind_pkts)} packets, "
125
- f"expected {expected_signal_ind_2_4_pkts + expected_signal_ind_sub1g_pkts} packets")
126
- elif signal_indicator_2_4_packets != expected_signal_ind_2_4_pkts:
127
- test.rc = TEST_FAILED
128
- test.add_reason(f"Test failed - BRG {rx_brg_.id_str} received wrong number of "
129
- f"signal indicator 2.4 packets\n received {signal_indicator_2_4_packets} packets, "
130
- f"expected {expected_signal_ind_2_4_pkts} packets")
131
- elif signal_indicator_sub1g_packets != expected_signal_ind_sub1g_pkts:
132
- test.rc = TEST_FAILED
133
- test.add_reason(f"Test failed - BRG {rx_brg_.id_str} received wrong number of "
134
- f"signal indicator sub1g packets\n received {signal_indicator_sub1g_packets} packets, "
135
- f"expected {expected_signal_ind_sub1g_pkts} packets")
136
-
137
- field_functionality_pass_fail_print(test, 'Signal Indicator Functionality 2_4 & Sub1g')
138
-
139
- # Test epilog
140
- return terminate_test(test, revert_rx_brg=False, revert_tx_brg=True,
141
- rx_modules=[ext_sensors_module], tx_modules=[energy2400_module, energy_sub1g_module])
@@ -1,20 +0,0 @@
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": ["Test prolog",
8
- "rssi_threshold - check the if rssi value is between 0 to -25.",
9
- "brg0_rx_brg1_tx - one brg is transmitter and the second is receiver, we expect to get the same values from the receiver, according to the tx params",
10
- "brg0_none_brg1_rx - One rx BRG without any tx BRG. We don't expect to see any signal indicator packets.",
11
- "brg0_rxtx_brg1_rxtx - Both BRG's will be configured to be transmitters and receivers, with different tx params for each one. we expect to see signal indicator packets from both BRG's, according to the tx params.",
12
- "brg0_tx_brg1_none - One BRG will be configured as signal indicator tx, but no rx, so we don't expect to receive signal indicator packets.",
13
- "Test epilog"],
14
- "expectedOutcome": "All phases passes successfully",
15
- "mandatory": 0,
16
- "multiBridgeTest": 1,
17
- "gwOnlyTest": 0,
18
- "internalBridge": 1,
19
- "allSupportedValues": ["rssi_threshold", "brg0_rx_brg1_tx", "brg0_none_brg1_rx", "brg0_rxtx_brg1_rxtx", "brg0_tx_brg1_none"]
20
- }