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
@@ -2,10 +2,12 @@
2
2
  import time
3
3
  import os
4
4
  import json
5
- from brg_certificate.cert_prints import *
6
- from brg_certificate.cert_defines import *
7
- from brg_certificate.wlt_types import *
8
- import brg_certificate.cert_protobuf as cert_protobuf
5
+ from certificate.cert_prints import *
6
+ from certificate.cert_defines import *
7
+ from certificate.wlt_types import *
8
+ import certificate.cert_protobuf as cert_protobuf
9
+ import certificate.cert_common as cert_common
10
+ import certificate.cert_utils as cert_utils
9
11
  import threading
10
12
 
11
13
  # gw_sim defines
@@ -13,18 +15,60 @@ TAG_ID_OFFSET = -16
13
15
  TAG_ID_FROM_ADVA_LENGTH = 8
14
16
  TAG_ID_FROM_ADVA_OFFSET = 2
15
17
  HDR_BLE5_DEFAULT_PKT_SIZE = 0x26
16
- PIXEL_SIM_INDICATOR = "ABCDEF"
17
18
  PIXEL_SIM_MIN_CYCLE = 20 # 20 is the CYCLE_PERIOD_MS_DEFAULT
19
+ DEFAULT_DUPLICATES = 5
20
+ DEFAULT_DELAY = 20
21
+
22
+ SECONDARY_CHANNEL_10 = 10
23
+ SECONDARY_CHANNEL_21 = 21
24
+
25
+ # Randomize pixel simulation indicator once per run (6 hex chars)
26
+ PIXEL_SIM_INDICATOR = get_random_hex_str(6)
18
27
 
19
28
  def init_adva(flow_version_major=0x4, flow_version_minor=0x34):
20
- return "{0:02X}".format(flow_version_major) + os.urandom(4).hex().upper() + "{0:02X}".format(flow_version_minor)
29
+ return "{0:02X}".format(flow_version_major) + get_random_hex_str(8) + "{0:02X}".format(flow_version_minor)
21
30
 
22
31
  random_bytes = lambda n: int.from_bytes(os.urandom(n), "big")
23
32
 
24
33
  def write_to_data_sim_log_file(txt):
25
- f = open(os.path.join(BASE_DIR, DATA_SIM_LOG_FILE), "a")
26
- f.write(txt)
27
- f.close()
34
+ write_to_log_file(DATA_SIM_LOG_FILE, txt, "a")
35
+
36
+ def brg_pkt_gen(num_of_pkts_per_brg, num_of_brgs, brgs_list=[], pkt_type=PIXELS_PKT, indicator='000000'):
37
+ bridge_ids = []
38
+ pkts = []
39
+ idx = 0
40
+ for i in range(num_of_brgs):
41
+ if brgs_list:
42
+ brg_mac = brgs_list[i]
43
+ else:
44
+ brg_mac = cert_common.hex2alias_id_get(get_random_hex_str(12))
45
+ bridge_ids.append(brg_mac)
46
+ adva = cert_common.change_endianness(brg_mac) # Change endianness to little endian
47
+
48
+ for j in range(num_of_pkts_per_brg):
49
+ serial_pkt_id = f"{i % 256:02X}{j % 256:02X}{idx:04X}" # 8 hex chars - 4 bytes
50
+
51
+ if pkt_type == PIXELS_PKT:
52
+ payload = (ag.Hdr(group_id=ag.GROUP_ID_UNIFIED_PKT_V2).dump() +
53
+ indicator + brg_mac + get_random_hex_str(22) + serial_pkt_id)
54
+
55
+ if pkt_type == MGMT_PKT:
56
+ mgmt_pkt = eval_pkt(f'GenericV{ag.API_VERSION_LATEST}')
57
+ body = mgmt_pkt(module_type=ag.MODULE_DATAPATH, msg_type=ag.BRG_MGMT_MSG_TYPE_CFG_INFO, brg_mac=hex_str2int(brg_mac))
58
+ payload = ag.Hdr(group_id=ag.GROUP_ID_BRG2GW).dump() + body.dump()[:-14] + indicator + serial_pkt_id
59
+
60
+ if pkt_type == SENSOR_PKT:
61
+ payload = (ag.Hdr(uuid_msb=ag.HDR_DEFAULT_BRG_SENSOR_UUID_MSB, uuid_lsb=ag.HDR_DEFAULT_BRG_SENSOR_UUID_LSB).dump() +
62
+ indicator + brg_mac + get_random_hex_str(22) + serial_pkt_id)
63
+
64
+ if pkt_type == SIDE_INFO_SENSOR_PKT:
65
+ payload = (ag.Hdr(group_id=ag.GROUP_ID_SIDE_INFO_SENSOR).dump() +
66
+ indicator + brg_mac + get_random_hex_str(22) + serial_pkt_id)
67
+
68
+ idx += 1
69
+ pkts += [GenericPkt(adva=adva, payload=payload)]
70
+ return pkts, bridge_ids
71
+
28
72
 
29
73
  class WiliotPixelGen2:
30
74
  """Represents 1 Wiliot Gen2 BLE4 Pixel"""
@@ -63,7 +107,7 @@ class WiliotPixelGen2:
63
107
  class WiliotPixelGen3:
64
108
  """Represents 1 Wiliot Gen3 BLE4 Pixel"""
65
109
  def __init__(self, pixel_sim_indicator=PIXEL_SIM_INDICATOR):
66
- self.adva = init_adva(flow_version_major=0x6, flow_version_minor=0x34) # 0x6 is the flow version for Gen3 (GEN3_FLOW_VER_MAJOR_MIN_VAL)
110
+ self.adva = init_adva(flow_version_major=0x08, flow_version_minor=0x10) # flow versions 0x080F and down do not support temp events from tag
67
111
  self.hdr = ag.DataHdr(uuid_msb=ag.HDR_DEFAULT_TAG_UUID_MSB, uuid_lsb=ag.HDR_DEFAULT_TAG_UUID_LSB, group_id_minor=0x0500)
68
112
  self.pixel_sim_indicator = pixel_sim_indicator
69
113
  self.payload0 = "010203040506070809"
@@ -94,12 +138,12 @@ class WiliotPixelGen3:
94
138
  adva-6 hdr-7 nonce/pkt_id-4 sim_indicator-3 payload0-9 tag_id-4 payload1-4 """
95
139
  return self.adva + self.hdr.dump() + self.get_pkt_id() + self.pixel_sim_indicator + self.payload0 + self.get_tag_id() + self.payload1
96
140
  class WiliotPixelGen3Extended:
97
- """Represents 1 Wiliot Gen3 BLE4 Pixel"""
98
- def __init__(self, pixel_sim_indicator=PIXEL_SIM_INDICATOR):
141
+ """Represents 1 Wiliot Gen3 BLE5 Pixel"""
142
+ def __init__(self, pixel_sim_indicator=PIXEL_SIM_INDICATOR, secondary_channel=SECONDARY_CHANNEL_10):
99
143
  self.adi = '0000'
100
- self.adva = init_adva(flow_version_major=0x6, flow_version_minor=0x34) # 0x6 is the flow version for Gen3 (GEN3_FLOW_VER_MAJOR_MIN_VAL)
144
+ self.adva = init_adva(flow_version_major=0x08, flow_version_minor=0x10) # flow versions 0x080F and down do not support temp events from tag
101
145
  self.hdr = ag.DataHdr(pkt_size=HDR_BLE5_DEFAULT_PKT_SIZE, uuid_msb=ag.HDR_DEFAULT_TAG_UUID_MSB, uuid_lsb=ag.HDR_DEFAULT_TAG_UUID_LSB, group_id_minor=0x0500)
102
- self.uid = "010203040506" # 6 bytes UID
146
+ self.uid = f"0102030405{secondary_channel:02X}" # 6 bytes UID
103
147
  self.mic = pixel_sim_indicator + pixel_sim_indicator # 6 bytes MIC (mico and mic1 are set to the sim indicator)
104
148
  self.payload0 = self.get_tag_id() + f"{random_bytes(4):08X}" # 8 bytes payload. We will use first 4 bytes for the tag_id to keep the same location as in Gen2 and Gen3 BLE4
105
149
  self.payload1 = self.get_tag_id() + f"{random_bytes(4):08X}" # 8 bytes payload. We will use first 4 bytes for the tag_id to keep the same location as in Gen2 and Gen3 BLE4
@@ -126,10 +170,11 @@ class WiliotPixelGen3Extended:
126
170
  adva-6 adi-2 hdr-7 nonce/pkt_id-4 uid-6 mic-6 payload0-8 payload1-8 """
127
171
  return self.adva + self.adi + self.hdr.dump() + self.get_pkt_id() + self.uid + self.mic + self.payload0 + self.payload1
128
172
 
129
- class RawData:
173
+ class GenericPkt:
130
174
  """Represents Explicit Data. Can be sensors, tags or anything else"""
131
- def __init__(self, raw):
132
- self.raw = raw
175
+ def __init__(self, adva, payload, duplicates=0, delay=0):
176
+ self.adva = adva
177
+ self.payload = payload
133
178
 
134
179
  def __repr__(self) -> str:
135
180
  return f'RawPkt: {self.get_pkt()}'
@@ -137,35 +182,86 @@ class RawData:
137
182
  def set_pkt_type(self, _):
138
183
  pass
139
184
  def get_pkt(self):
140
- return self.raw
185
+ return self.adva + self.payload
141
186
 
142
- class DataSimThread(threading.Thread):
143
- def __init__(self, test, num_of_pixels, duplicates, delay, pkt_types, pixels_type=GEN2, pkts=[]):
187
+ class GenericSimThread(threading.Thread):
188
+ def __init__(self, test, duplicates=DEFAULT_DUPLICATES, delay=DEFAULT_DELAY, send_single_cycle=False, pkts=[]):
144
189
  super().__init__()
145
190
  self.test = test
191
+ self.duplicates = duplicates
192
+ self.delay = delay
193
+ self._stop_event = threading.Event()
194
+ self._pause_event = threading.Event()
195
+ self._pause_event.set()
196
+ self.daemon = True
197
+ self.send_single_cycle = send_single_cycle
198
+ self.pkts = pkts
199
+
200
+ def run(self):
201
+ write_to_data_sim_log_file(f"num_of_raw_pkts={len(self.pkts)} duplicates={self.duplicates} delay={self.delay}\n")
202
+ # Run pixel_sim loop
203
+ while not self._stop_event.is_set():
204
+ self._pause_event.wait()
205
+ for pkt in self.pkts:
206
+ if self._stop_event.is_set():
207
+ return
208
+ if not self._pause_event.is_set():
209
+ break
210
+ self.publish_pkt_to_mqtt(pkt)
211
+ if self.send_single_cycle:
212
+ self.stop()
213
+
214
+ def stop(self):
215
+ """Stops the thread completely"""
216
+ self._stop_event.set()
217
+ write_to_data_sim_log_file(f"DataSimThread stopped\n")
218
+
219
+ def pause(self):
220
+ """Pauses the thread execution"""
221
+ self._pause_event.clear()
222
+ write_to_data_sim_log_file(f"DataSimThread paused\n")
223
+
224
+ def resume(self):
225
+ """Resumes the thread execution"""
226
+ self._pause_event.set()
227
+ write_to_data_sim_log_file(f"DataSimThread resumed\n")
228
+
229
+ def publish_pkt_to_mqtt(self, pkt):
230
+ msg = {TX_PKT: pkt.get_pkt(),
231
+ TX_MAX_RETRIES: self.duplicates,
232
+ TX_MAX_DURATION_MS: 100,
233
+ ACTION: 0}
234
+ # Use protobuf if protubuf flag is set to True
235
+ if self.test.tester.protobuf:
236
+ payload = cert_protobuf.downlink_to_pb(msg)
237
+ else:
238
+ payload = json.dumps(msg)
239
+ self.test.tester.mqttc.publish(self.test.tester.mqttc.update_topic, payload=payload)
240
+ write_to_data_sim_log_file(f"{pkt}" + " {}\n".format(datetime.datetime.now().strftime("%d/%m,%H:%M:%S.%f")[:-4]))
241
+ actual_delay = max(self.delay, self.duplicates * (PIXEL_SIM_MIN_CYCLE))
242
+ time.sleep(actual_delay/1000)
243
+
244
+ class DataSimThread(GenericSimThread):
245
+ def __init__(self, test, num_of_pixels, pkt_types, pixels_type=GEN2, channel=SECONDARY_CHANNEL_10, **kwargs):
246
+ self.test = test
247
+ self.__dict__.update(kwargs)
248
+ super().__init__(**self.__dict__)
146
249
  self.num_of_pixels = num_of_pixels
147
250
  # Create data list
148
- if pixels_type == RAW_DATA:
149
- self.pixels = [RawData(p) for p in pkts]
150
- elif pixels_type == GEN2:
251
+ if pixels_type == GEN2:
151
252
  self.pixels = [WiliotPixelGen2() for _ in range(self.num_of_pixels)]
152
253
  elif pixels_type == GEN3:
153
254
  self.pixels = [WiliotPixelGen3() for _ in range(self.num_of_pixels)]
154
255
  elif pixels_type == GEN3_EXTENDED:
155
- self.pixels = [WiliotPixelGen3Extended() for _ in range(self.num_of_pixels)]
256
+ self.pixels = [WiliotPixelGen3Extended(secondary_channel=channel) for _ in range(self.num_of_pixels)]
156
257
  else:
157
258
  print(f"Didn't define pixels type")
158
- self.duplicates = duplicates
159
- self.delay = delay
160
259
  self.pkt_types = pkt_types
161
- self._stop_event = threading.Event()
162
- self._pause_event = threading.Event()
163
- self._pause_event.set()
164
- self.daemon = True
165
260
 
166
261
  def run(self):
167
262
  write_to_data_sim_log_file(f"num_of_pixels={self.num_of_pixels} duplicates={self.duplicates} delay={self.delay} pkt_types={self.pkt_types}\n")
168
263
  # Run pixel_sim loop
264
+ sent_pkt_ctr = 0
169
265
  while not self._stop_event.is_set():
170
266
  self._pause_event.wait()
171
267
  for i in range(self.num_of_pixels):
@@ -179,10 +275,14 @@ class DataSimThread(threading.Thread):
179
275
  pkt = self.pixels[i]
180
276
  pkt.set_pkt_type(pkt_type)
181
277
 
278
+ # Adding 1 to tx rate & temp counters for event tests (0b001001)
279
+ if "event" in self.test.name:
280
+ sent_pkt_ctr += 1
281
+ if sent_pkt_ctr == 20:
282
+ pkt.hdr.group_id_major += 0x09
283
+
182
284
  # Set pkt_id, in Gen3 pkt_type_1 has pkt_id_0+1
183
- if type(pkt) == RawData:
184
- pass
185
- elif type(pkt) == WiliotPixelGen3:
285
+ if type(pkt) == WiliotPixelGen3:
186
286
  if pkt_type == 1:
187
287
  if self.pkt_types == [0,1]:
188
288
  pkt.pkt_id += 1
@@ -198,19 +298,7 @@ class DataSimThread(threading.Thread):
198
298
  if type(pkt) == WiliotPixelGen2:
199
299
  pkt.randomize_payload1() # In the FW we assume data is random at the 4 last bytes
200
300
  # Publish pkt to MQTT
201
- msg = {TX_PKT: pkt.get_pkt(),
202
- TX_MAX_RETRIES: self.duplicates,
203
- TX_MAX_DURATION_MS: 100,
204
- ACTION: 0}
205
- # Use protobuf if protubuf flag is set to True AND data sim does not use a gw simulator board
206
- if self.test.protobuf == True and not self.test.gw_sim:
207
- payload = cert_protobuf.downlink_to_pb(msg)
208
- else:
209
- payload = json.dumps(msg)
210
- self.test.sim_mqttc.publish(self.test.sim_mqttc.update_topic, payload=payload)
211
- write_to_data_sim_log_file(f"{pkt}" + " {}\n".format(datetime.datetime.now().strftime("%d/%m,%H:%M:%S.%f")[:-4]))
212
- actual_delay = max(self.delay, self.duplicates*(PIXEL_SIM_MIN_CYCLE))
213
- time.sleep(actual_delay/1000)
301
+ self.publish_pkt_to_mqtt(pkt)
214
302
 
215
303
  def stop(self):
216
304
  """Stops the thread completely"""
@@ -1,23 +1,30 @@
1
1
  # Files
2
2
  import os
3
+ import random
4
+ import datetime
3
5
  import importlib.metadata
4
- # BASE_DIR should be initiated in the same dir as brg_certificate.py
6
+ import certificate.ag.wlt_types_ag as ag
7
+
8
+ get_random_hex_str = lambda n: ''.join([random.choice('0123456789ABCDEF') for _ in range(n)])
9
+
10
+ # BASE_DIR should be initiated in the same dir as certificate.py
5
11
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
12
+ ARTIFACTS_DIR = os.path.join(os.getcwd(), f"cert_artifacts_{datetime.datetime.now().strftime("%d_%m_%Y__%H_%M_%S")}")
13
+
6
14
  # CERT_VERSION handling - local/PyPi
7
15
  LOCAL_DEV = "local-dev"
8
- if hasattr(importlib.metadata,'packages_distributions') and "wiliot-certificate" in importlib.metadata.packages_distributions():
9
- CERT_VERSION = importlib.metadata.version("wiliot-certificate")
10
- else:
16
+ try:
17
+ CERT_VERSION = importlib.metadata.version("wiliot_certificate")
18
+ except importlib.metadata.PackageNotFoundError:
11
19
  CERT_VERSION = LOCAL_DEV
12
20
  CERT_MQTT_LOG_FILE = "cert_mqtt_log.json"
13
21
  DATA_SIM_LOG_FILE = "data_sim_log.txt"
22
+ RESULT_NOTES_FILE = "results_notes.txt"
14
23
  UT_RESULT_FILE_HTML = "results.html"
15
24
  UT_RESULT_FILE_PDF = "results.pdf"
16
- UT_RESULT_FILE = "results.html"
17
25
  UTILS_BASE_REL_PATH = "../../../utils"
18
26
 
19
27
  # GW defines
20
- GW_ID = "gatewayId"
21
28
  ADDITIONAL = "additional"
22
29
  REPORTED_CONF = "reportedConf"
23
30
  GW_CONF = "gatewayConf"
@@ -25,14 +32,10 @@ GW_NAME = "gatewayName"
25
32
  GW_API_VERSION = "apiVersion"
26
33
  LAT = "lat"
27
34
  LNG = "lng"
28
- WLT_SERVER = "wiliotServer"
29
- PACER_INTERVAL = "pacerInterval"
30
- PKT_TYPES_MASK = "packetTypesMask"
31
- RX_TX_PERIOD = "rxTxPeriodMs"
32
- TX_PERIOD = "txPeriodMs"
33
- OUTPUT_POWER_2_4 = "2.4GhzOutputPower"
34
35
  NFPKT = "nfpkt"
35
36
  TBC = "tbc"
37
+ EVENT_FLAG = "event_flag"
38
+ EVENT_CTR = "event_ctr"
36
39
  RSSI = "rssi"
37
40
  SRC_ID = "src_id"
38
41
 
@@ -40,30 +43,17 @@ INTERNAL_BRG_RSSI = 1
40
43
  BRIDGE_ID = "bridgeId"
41
44
  ALIAS_BRIDGE_ID = "aliasBridgeId"
42
45
  GROUP_ID = "group_id"
43
- BRG_ACTION = "bridgeAction"
44
-
45
- GW_DATA_MODE = "gwDataMode"
46
- TAGS_AND_BRGS = "Tags & Bridges"
47
- TAGS_ONLY = "Tags only"
48
- BRGS_ONLY_37 = "Bridges only (ch37)"
49
- BRGS_ONLY_38 = "Bridges only (ch38)"
50
- BRGS_ONLY_39 = "Bridges only (ch39)"
51
- HIBERNATE = "Hibernate"
52
-
53
- BLE_WIFI = "ble_wifi"
54
- BLE_LAN = "ble_lan"
46
+ AGGREGATED_PAYLOAD = "aggregated_payload"
55
47
 
56
48
  WLT_SERVER = "wiliotServer"
57
49
  PACER_INTERVAL = "pacerInterval"
58
50
  OUTPUT_POWER_2_4 = "2.4GhzOutputPower"
59
51
  USE_STAT_LOC = "useStaticLocation"
60
52
  LOCATION = "location"
61
- GW_ENERGY_PATTERN = "energizingPattern"
62
53
  VERSION = "version"
63
54
  WIFI_VERSION = "interfaceChipSwVersion"
64
55
  BLE_VERSION = "bleChipSwVersion"
65
56
  BLE_MAC_ADDR = "bleChipMacAddress"
66
- GW_MODE = "gwMode"
67
57
  PROD = "prod"
68
58
  SERIALIZATION_FORMAT = "serializationFormat"
69
59
  PROTOBUF = "Protobuf"
@@ -87,16 +77,17 @@ GW_LOGS = "gatewayLogs"
87
77
  LOGS = "logs"
88
78
  GW_LATITUDE = "Latitude"
89
79
  GW_LONGITUDE = "Longitude"
80
+ ACL_COUNTERS = "aclCounters"
90
81
  GW_LOG_PERIOD = 30
91
82
 
92
83
  # Thin gw defines
93
- THIN_GW_PROTOCOL_VERSION = "protocolVersion"
94
84
  TX_PKT = "txPacket"
95
85
  TX_MAX_DURATION_MS = "txMaxDurationMs"
96
86
  TX_MAX_RETRIES = "txMaxRetries"
97
87
  TRANPARENT_PKT_LEN = 31 * 2
98
88
  ACTION_ADVERTISING = 0
99
89
  ACTION_BRG_OTA = 1
90
+ ACTION_GW_OTA = 2
100
91
 
101
92
  # Simulator defines
102
93
  GW_SIM_BLE_MAC_ADDRESS = 'GW_SIM_BLE_MAC_ADDRESS'
@@ -108,6 +99,9 @@ GEN2 = 2
108
99
  GEN3 = 3
109
100
  GEN3_EXTENDED = 4
110
101
  RAW_DATA = 5
102
+ DUT = "DUT"
103
+ TESTER = "TESTER"
104
+ BRG1 = "BRG1"
111
105
 
112
106
  # Configurable brg fields' names by modules
113
107
  # common #
@@ -120,11 +114,16 @@ BRG_SIGNAL_INDICATOR_REP = "signal_indicator_rep"
120
114
  BRG_UNIFIED_ECHO_PKT = "unified_echo_pkt"
121
115
  BRG_ADAPTIVE_PACER = "adaptive_pacer"
122
116
  BRG_PACER_INTERVAL = "pacer_interval"
117
+ BRG_EVENT_WINDOW = "event_window"
118
+ BRG_EVENT_TIME_UNIT = "event_time_unit"
123
119
  BRG_RSSI_THRESHOLD = "rssi_threshold"
124
120
  BRG_SUB1G_RSSI_THRESHOLD = "sub1g_rssi_threshold"
125
121
  BRG_TX_REPETITION = "tx_repetition"
126
122
  BRG_PKT_FILTER = "pkt_filter"
127
123
  BRG_RX_CHANNEL = "rx_channel"
124
+ BRG_EVENT_TRIGGER = "event_trigger"
125
+ BRG_EVENT_PACER_INTERVAL = "event_pacer_interval"
126
+ BRG_RSSI_MOVEMENT_THRESHOLD = "rssi_movement_threshold"
128
127
  # Calibration #
129
128
  BRG_CALIB_INTERVAL = "interval"
130
129
  # Energy Sub1g #
@@ -132,6 +131,7 @@ BRG_CYCLE = "cycle"
132
131
  # 3rd party sensors #
133
132
  BRG_SENSOR0 = "sensor0"
134
133
  BRG_SENSOR1 = "sensor1"
134
+ BRG_SENSOR2 = "sensor2"
135
135
 
136
136
  # Common defines
137
137
  PACKETS = "packets"
@@ -186,6 +186,45 @@ VER_UUID_STR = "versionUUID"
186
186
  STEP = "step"
187
187
  PROGRESS = "progress"
188
188
  VER_MAX_LEN = 31
189
+ EXPECTED_REPORTS = {
190
+ 4: {0, 25, 50, 75, 100},
191
+ 5: {0, 100},
192
+ 6: {10, 20, 30, 40, 50, 60, 70, 80, 90, 100},
193
+ 7: {100}
194
+ }
195
+ FINAL_OTA_STEP = max(EXPECTED_REPORTS.keys())
196
+
197
+
198
+ # Actions tests related
199
+ BATTERY_SENSOR_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_MINEW_DUAL_BAND_V0, ag.BOARD_TYPE_ERM_V0,
200
+ ag.BOARD_TYPE_ERM_V1, ag.BOARD_TYPE_KOAMTAC_V0]
201
+ POF_NOT_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_FANSTEL_WIFI_V0, ag.BOARD_TYPE_FANSTEL_LAN_V0]
202
+
203
+ BRG_NON_DEFAULT_DUTY_CYCLE = 15
204
+ BRG_NON_DEFAULT_OP_OFFSET_2_4 = 6
205
+ BRG_NON_DEFAULT_EP_2_4 = 1
206
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_2_4 = 100
207
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_2_4 = 3
208
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_SUB1G = 100
209
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_SUB1G = 3
210
+ BRG_NON_DEFAULT_OUTPUT_POWER_SUB1G = 26
211
+ BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN = 0
212
+ BRG_NON_DEFAULT_TX_REPETITION = 2
213
+ BRG_NON_DEFAULT_PACER_INTERVAL = 20
214
+ BRG_NON_DEFAULT_RSSI_THRESHOLD = -80
215
+ BRG_NON_DEFAULT_EVENT_TIME_UNIT = 1
216
+ BRG_NON_DEFAULT_EVENT_WINDOW = 20
217
+ BRG_NON_DEFAULT_EVENT_TRIGGER = 8
218
+ BRG_NON_DEFAULT_RSSI_MOVEMENT_THRESHOLD = 15
219
+ BRG_NON_DEFAULT_EVENT_PACER_INTERVAL = 10
220
+ BRG_NON_DEFAULT_CALIB_OUTPUT_POWER_OFFSET = 2
221
+ BRG_NON_DEFAULT_PKT_FILTER = 17
222
+ BRG_NON_DEFAULT_CALIB_PATTERN = 2
223
+ BRG_NON_DEFAULT_CALIB_INTERVAL = 15
224
+
225
+ LIS2DW12_NON_DEFAULT_STATE_THRESHOLD = 620
226
+ LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION = 120
227
+ LIS2DW12_NON_DEFAULT_SLEEP_DURATION = 35
189
228
 
190
229
  # Versions
191
230
  VERSIONS = {
@@ -210,23 +249,44 @@ VERSIONS = {
210
249
  "4.3.0" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.96"},
211
250
  "4.3.1" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.98"},
212
251
  "4.3.2" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.100"},
252
+ "4.4.8" : {WIFI_VERSION: "4.4.44", BLE_VERSION: "4.4.95"},
253
+ "4.4.10" : {WIFI_VERSION: "4.4.45", BLE_VERSION: "4.4.96"},
254
+ "4.5.6" : {WIFI_VERSION: "4.5.36", BLE_VERSION: "4.5.69"},
213
255
  }
214
256
 
257
+ # Energous boards specific values for output power
258
+ ENERGOUS_BOARD_TYPES_GROUP = [ag.BOARD_TYPE_ENERGOUS_V0, ag.BOARD_TYPE_ENERGOUS_V2, ag.BOARD_TYPE_ENERGOUS_V3, ag.BOARD_TYPE_ENERGOUS_V4]
259
+ ENERGOUS_GROUP_SUPPORTED_VALUES = [ag.OUTPUT_POWER_2_4_MAX, ag.OUTPUT_POWER_2_4_MAX_MINUS_3, ag.OUTPUT_POWER_2_4_MAX_MINUS_7,
260
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_11, ag.OUTPUT_POWER_2_4_MAX_MINUS_15,
261
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_19, ag.OUTPUT_POWER_2_4_MAX_MINUS_23]
262
+
263
+ # Energous_V1 board group #
264
+ ENERGOUS_V1_SUPPORTED_VALUES = [ag.OUTPUT_POWER_2_4_MAX, ag.OUTPUT_POWER_2_4_MAX_MINUS_2, ag.OUTPUT_POWER_2_4_MAX_MINUS_4,
265
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_6, ag.OUTPUT_POWER_2_4_MAX_MINUS_10,
266
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_14, ag.OUTPUT_POWER_2_4_MAX_MINUS_18,
267
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_22, ag.OUTPUT_POWER_2_4_MAX_MINUS_26]
268
+
269
+ # Fanstel board group #
270
+ FANSTEL_GW_SUPPORTED_VALUES = [ag.OUTPUT_POWER_2_4_MAX, ag.OUTPUT_POWER_2_4_MAX_MINUS_2, ag.OUTPUT_POWER_2_4_MAX_MINUS_4,
271
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_6, ag.OUTPUT_POWER_2_4_MAX_MINUS_8,
272
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_12, ag.OUTPUT_POWER_2_4_MAX_MINUS_16,
273
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_20]
274
+
215
275
  # Tests defines
216
- DEFAULT_GW_FIELD_UPDATE_TIMEOUT = 10
217
- DEFAULT_BRG_FIELD_UPDATE_TIMEOUT = 10
218
- HB_PERIOD = 30
219
- VER_UPDATE_TIMEOUT = 400
220
- GW_LATITUDE_DEFAULT = 33.0222
221
- GW_LONGITUDE_DEFAULT = -117.0839
276
+ DEFAULT_GW_FIELD_UPDATE_TIMEOUT = 10
277
+ DEFAULT_BRG_FIELD_UPDATE_TIMEOUT = 10
278
+ HB_PERIOD = 30
279
+ VER_UPDATE_TIMEOUT = 400
280
+ GW_LATITUDE_DEFAULT = 33.0222
281
+ GW_LONGITUDE_DEFAULT = -117.0839
222
282
  # Set to work with default when versions tests only pass through new api ver
223
283
  GW_API_VER_DEFAULT = "201"
224
284
  GW_API_VER_OLD = "200"
225
- GW_API_VER_LATEST = "205"
285
+ GW_API_VER_LATEST = "206"
286
+ API_OLDEST_SUPPORTED_VERSION = ag.API_VERSION_V12
226
287
  BRG_CFG_HAS_LEN = 2
227
288
  CLEAR_DATA_PATH_TIMEOUT = 10
228
289
  ACTION_LONG_TIMEOUT = 120
229
- ACTION_SI_PKT_TIMEOUT = 10
230
290
  ACTION_SHORT_TIMEOUT = 5
231
291
 
232
292
  # Internal python ut defines - used only in ut
@@ -234,19 +294,35 @@ PACER_INTERVAL_MIN_TAGS_COUNT = 20
234
294
  PACER_INTERVAL_MAX_FAILED_TAGS = 2
235
295
  PACER_INTERVAL_THRESHOLD_HIGH = 0.90
236
296
  PACER_INTERVAL_CEIL_THRESHOLD = 1.2
237
- PACER_INTERVAL_THRESHOLD = 0.80
297
+ PACER_INTERVAL_THRESHOLD = 0.8
298
+ TEST_EVENT_WINDOW_SEC_CFG = 60
299
+ TEST_TAG_EVENT_WINDOW_CFG = 20
300
+ TEST_EVENT_WINDOW_MIN_CFG = 1
301
+ TEST_EVENT_WINDOW_HR_CFG = 1
302
+ SLEEP_TIME_AGING = 60
303
+ DATA_SIM_EVENT_TESTING_DELAY_MS = 1000
304
+ DATA_SIM_RSSI_EVENT_TESTING_DELAY_MS = 300
305
+ BLE5_MAX_DURATION_MS = ag.BLE5_PARAM_PRIMARY_CHANNEL_SCAN_CYCLE + 1000 # In MS
306
+ BLE5_MAX_DURATION_SEC = BLE5_MAX_DURATION_MS // 1000
307
+ DATA_SIM_EVENT_TESTING_DELAY_SEC = DATA_SIM_EVENT_TESTING_DELAY_MS / 1000
308
+ DATA_SIM_RSSI_EVENT_TESTING_DELAY_SEC = DATA_SIM_RSSI_EVENT_TESTING_DELAY_MS / 1000
309
+ DATA_SIM_EVENT_PACER_INTERVAL_TESTING = 10
310
+ RSSI_EVENT_PKTS_TO_STABILIZE = 13 # The alpha filter takes about 13 packets to stabilize
238
311
  PACKETS_ECHO_OFF = 16
239
312
  TEST_PASSED = 0
240
313
  TEST_FAILED = -1
241
314
  TEST_SKIPPED = 1
242
- TEST_INIT = 2
315
+ TEST_ABORTED = 2
316
+ MODULE_UNSUPPORTED = 3
243
317
  NO_RESPONSE = "NO_RESPONSE"
244
318
  NOT_FOUND = "NOT_FOUND"
245
319
  DONE = "DONE"
246
320
  MGMT_PKT = "mgmt_pkt"
321
+ PIXELS_PKT = "pixels_pkt"
247
322
  UNIFIED_PKT = "unified_pkt"
248
323
  SIDE_INFO_SENSOR_PKT = "side_info_sensor_pkt"
249
324
  SENSOR_PKT = "sensor_pkt"
325
+ UNIFIED_SENSOR_PKT = "unified_sensor_pkt"
250
326
  DECODED_DATA = "decoded_data"
251
327
  TAG_ID = "tag_id"
252
328
  BRG_LATENCY = "brg_latency"
@@ -256,7 +332,8 @@ PACKET_DATA = "packet_data"
256
332
  PKTS = "pkts"
257
333
  MQTT_LOG_PRE_STR = "mqtt_log_"
258
334
  GW_DATA = "gw_data"
259
- GW_ID = "gw_id"
335
+ GW_ID = "gatewayId"
336
+ GW_TYPE = "gatewayType"
260
337
  CER = "cer"
261
338
  PKT_CNTR_DIFF = "packet_cntr_diff"
262
339
  AVG = "avg_"
@@ -265,105 +342,29 @@ AWS = "aws"
265
342
  TEST = "test"
266
343
  MULTI_BRG_TEST = "multiBridgeTest" # used for multi brg tests
267
344
  GW_ONLY_TEST = "gwOnlyTest" # used for gw only tests
268
- INTERNAL_BRG = "internalBridge"
345
+ BRIDGE_ONLY_TEST = "bridgeOnlyTest" # used for bridge only tests
346
+ DATA_SIMULATION_ONLY_TEST = "dataSimOnlyTest" # used for tests runable only with data simulation
269
347
  PURPOSE = "purpose"
270
348
  MANDATORY = "mandatory"
271
349
  MODULE = "module"
272
350
  NAME = "name"
273
351
  DOCUMENTATION = "documentation"
274
352
  ALL_SUPPORTED_VALUES = "allSupportedValues"
353
+ SUPPORTED_FROM_API_VERSION = "SupportedFromApiVersion"
275
354
  PRE_CONFIG = "Pre Configuration"
276
355
  TEST_BODY = "Test Body"
277
356
  RESTORE_CONFIG = "Restore Configuration"
357
+ GEOLOCATION = "geolocation"
278
358
 
279
359
  # test reasons
280
- NO_PARAMS_GIVEN = "No parameters given!"
281
- BRG_VER_SUCCESS = "SUCCESS - BRG version matches expected version!"
282
- BRG_BL_VER_SUCCESS = "SUCCESS - BRG Bootloader version matches expected version!"
283
- WANTED_VER_SAME = "Wanted version is same as original one!"
284
- WANTED_VER_SAME_MUL = "Wanted versions are same as original ones!"
285
- VER_UPDATE_PASSED = "Version Update Ran Successfully!"
286
- VER_UPDATE_FAILED = "The Update Process Has Been Interrupted!"
287
-
288
- # ---------------------------------------------------RTSA defines---------------------------------------------------
289
- # common defines
290
- TRACE_LOG_FILE_NAME = "TRACELOG"
291
- TRACE_LOG_FILE_PATH = "C:/SignalVu-PC Files/" + TRACE_LOG_FILE_NAME + ".TOV"
292
-
293
- # freq defines
294
- FREQ_2_4_GHZ = {'37':2.402, '38':2.426, '39':2.480}
295
- FREQ_SUB1G_MHZ = {'865_7':865.700, '915':915.000, '916_3':916.300, '917_5':917.500, '918':918.000, '919_1':919.100}
360
+ NO_PARAMS_GIVEN = "No parameters given!"
361
+ BRG_VER_SUCCESS = "SUCCESS - BRG version matches expected version!"
362
+ BRG_BL_VER_SUCCESS = "SUCCESS - BRG Bootloader version matches expected version!"
363
+ WANTED_VER_SAME = "Wanted version is same as original one!"
364
+ WANTED_VER_SAME_MUL = "Wanted versions are same as original ones!"
365
+ VER_UPDATE_PASSED = "Version Update Ran Successfully!"
366
+ VER_UPDATE_FAILED = "The Update Process Has Been Interrupted!"
296
367
 
297
- # SignalVu API commands defines
298
- TRACE_DETECTION = {'average':'AVERage', 'positive':'POSitive', 'negative':'NEGative', 'positive-negative':'POSNegative', 'sample':'SAMPle'}
299
- MAX_TRACE_POINTS = {'1K':'ONEK', '10K':'TENK', '100K':'HUNDredk', 'never_decimate':'NEVerdecimate' }
300
-
301
- # default values
302
- DEFAULT_LENGTH_MS = 30
303
- DEFAULT_TIME_PER_DIVISION_SEC = 5
304
- DEFAULT_RX_TX_PERIOD_SEC = 0.015
305
- BEACON_MIN_LENGTH_SEC = 375e-6
306
- BEACON_MAX_LENGTH_SEC = 500e-6
307
- ENERGIZING_TIME_THRESHOLD = 0.3
308
- BEACON_POWER_THRESHOLD = 0.9
309
- BEACON_POWER_CURVE_38 = 0.7
310
- BEACON_POWER_CURVE_39 = 0.625
311
- DEFAULT_SPAN_MHZ = 5
312
- RXTX_MAX_CFG = 255
313
- RXTX_CFG_DEFAULT = 100
314
-
315
- # test times
316
- FREQ_BEACONS_ANALYSIS_TIME_DELTA = 10
317
-
318
- # structured energizing patterns information
319
- class energizingPattern:
320
- def __init__(self, ble_calibration_beacons = [], ble_energy = {}, ble_post_energy_beacons = [], sub1G_energy = False, info = ""):
321
- self.ble_calibration_beacons = ble_calibration_beacons
322
- self.ble_energy = ble_energy
323
- self.ble_post_energy_beacons = ble_post_energy_beacons
324
- self.sub1G_energy = sub1G_energy
325
- self.info = info
326
-
327
- EP_INFO = {
328
- '17' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']]),
329
- '18' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['39'] : 1.0}),
330
- '20' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 0.2, FREQ_2_4_GHZ['39'] : 0.8}),
331
- '24' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 1.0}),
332
- '25' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 1.0}),
333
- '26' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={2.454 : 1.0}),
334
- '27' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39'], FREQ_2_4_GHZ['39']]),
335
- '29' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 0.3333, 2.454 : 0.3333, FREQ_2_4_GHZ['39'] : 0.3333}),
336
- '36' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'],FREQ_2_4_GHZ['38'],FREQ_2_4_GHZ['39']], info="idle"),
337
- '37' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], ble_energy={2.450 : 1.0}, info="euro"),
338
- '50' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], sub1G_energy=True),
339
- '51' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['39'] : 1.0}, sub1G_energy=True),
340
- '52' : energizingPattern(sub1G_energy=True),
341
- '55' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 1.0}, sub1G_energy=True),
342
- '56' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 1.0}, sub1G_energy=True),
343
- '57' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={2.454 : 1.0}, sub1G_energy=True),
344
- '61' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], sub1G_energy=True, info="euro"),
345
- '62' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], ble_energy={2.475 : 1.0}, sub1G_energy=True, info="euro"),
346
- '99' : energizingPattern(ble_calibration_beacons=[i/1000.0 for i in range(2402, 2481, 2)])
347
- }
348
-
349
- EP_FREQ_BREAKDOWN_COUNTER_SETUP = {
350
- 2.402 : {'beacons':0, 'energy_in_ms': 0.0},
351
- 2.426 : {'beacons':0, 'energy_in_ms': 0.0},
352
- 2.480 : {'beacons':0, 'energy_in_ms': 0.0},
353
- 2.403 : {'beacons':0, 'energy_in_ms': 0.0},
354
- 2.427 : {'beacons':0, 'energy_in_ms': 0.0},
355
- 2.483 : {'beacons':0, 'energy_in_ms': 0.0},
356
- 2.454 : {'beacons':0, 'energy_in_ms': 0.0},
357
- 2.481 : {'beacons':0, 'energy_in_ms': 0.0},
358
- 2.415 : {'beacons':0, 'energy_in_ms': 0.0},
359
- 2.441 : {'beacons':0, 'energy_in_ms': 0.0},
360
- 2.428 : {'beacons':0, 'energy_in_ms': 0.0},
361
- 2.467 : {'beacons':0, 'energy_in_ms': 0.0},
362
- 2.475 : {'beacons':0, 'energy_in_ms': 0.0},
363
- 0.8657 : {'beacons':0, 'energy_in_ms': 0.0},
364
- 0.915 : {'beacons':0, 'energy_in_ms': 0.0},
365
- 0.9163 : {'beacons':0, 'energy_in_ms': 0.0},
366
- 0.9175 : {'beacons':0, 'energy_in_ms': 0.0},
367
- 0.918 : {'beacons':0, 'energy_in_ms': 0.0},
368
- 0.9191 : {'beacons':0, 'energy_in_ms': 0.0}
369
- }
368
+ # BLE simulator
369
+ BLE_SIM_ADV_37_38_39 = 0
370
+ BLE_SIM_RADIO_1MBPS = 1