wiliot-certificate 4.4.3__py3-none-any.whl → 4.5.0a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) 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. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  4. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb.json +109 -0
  5. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  6. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/calibration.json +96 -0
  7. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/custom.json +99 -0
  8. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/datapath.json +241 -13
  9. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energy2400.json +120 -0
  10. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  11. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/externalSensor.json +135 -6
  12. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/interface.json +157 -0
  13. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json → certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +27 -11
  15. certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +175 -0
  16. certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +65 -0
  17. certificate/cert_common.py +1459 -0
  18. certificate/cert_config.py +455 -0
  19. {brg_certificate → certificate}/cert_data_sim.py +131 -46
  20. {brg_certificate → certificate}/cert_defines.py +120 -128
  21. {brg_certificate → certificate}/cert_gw_sim.py +151 -49
  22. {brg_certificate → certificate}/cert_mqtt.py +164 -59
  23. {brg_certificate → certificate}/cert_prints.py +34 -33
  24. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  25. {brg_certificate → certificate}/cert_results.py +205 -48
  26. certificate/cert_utils.py +622 -0
  27. certificate/certificate.py +198 -0
  28. certificate/certificate_cli.py +79 -0
  29. certificate/certificate_eth_test_list.txt +74 -0
  30. certificate/certificate_sanity_test_list.txt +65 -0
  31. certificate/certificate_test_list.txt +75 -0
  32. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +2 -2
  33. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  34. certificate/tests/calibration/output_power_test/output_power_test.json +22 -0
  35. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  36. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +1 -1
  37. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  38. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +14 -0
  39. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  40. certificate/tests/cloud_connectivity/acl_test/acl_test.json +14 -0
  41. certificate/tests/cloud_connectivity/acl_test/acl_test.py +98 -0
  42. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +18 -0
  43. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +39 -0
  44. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +18 -0
  45. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  46. certificate/tests/cloud_connectivity/connection_test/connection_test.json +17 -0
  47. certificate/tests/cloud_connectivity/connection_test/connection_test.py +74 -0
  48. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +20 -0
  49. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +204 -0
  50. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +16 -0
  51. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +98 -0
  52. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +17 -0
  53. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +57 -0
  54. certificate/tests/cloud_connectivity/registration_test/registration_test.json +19 -0
  55. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  56. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  57. certificate/tests/cloud_connectivity/stress_test/stress_test.json +16 -0
  58. certificate/tests/cloud_connectivity/stress_test/stress_test.py +97 -0
  59. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +24 -0
  60. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +93 -0
  61. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +19 -0
  62. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +161 -0
  63. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +1 -1
  64. certificate/tests/datapath/aging_test/aging_test.py +138 -0
  65. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +16 -0
  66. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +95 -0
  67. certificate/tests/datapath/event_test/event_test.json +16 -0
  68. certificate/tests/datapath/event_test/event_test.py +85 -0
  69. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +1 -1
  70. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +10 -8
  71. certificate/tests/datapath/output_power_test/output_power_test.json +22 -0
  72. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  73. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  74. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -8
  75. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +1 -1
  76. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  77. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +2 -2
  78. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  79. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +19 -0
  80. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  81. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  82. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +11 -10
  83. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +18 -0
  84. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +83 -0
  85. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  86. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  87. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  88. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  89. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  90. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  91. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +5 -4
  92. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  93. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +2 -2
  94. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  95. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +7 -7
  96. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +112 -72
  97. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +7 -7
  98. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  99. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +3 -3
  100. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +12 -11
  101. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +3 -3
  102. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +12 -11
  103. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +2 -1
  104. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  105. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +14 -0
  106. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  107. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +14 -0
  108. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  109. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +14 -0
  110. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  111. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +14 -0
  112. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  113. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +15 -0
  114. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  115. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +14 -0
  116. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  117. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +14 -0
  118. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  119. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +14 -0
  120. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +41 -0
  121. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +2 -2
  122. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  123. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  124. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  125. certificate/tests/energy2400/output_power_test/output_power_test.json +22 -0
  126. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  127. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +1 -1
  128. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  129. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +25 -0
  130. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +378 -0
  131. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +3 -3
  132. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +97 -87
  133. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +23 -0
  134. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  135. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  136. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  137. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  138. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  139. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +1 -1
  140. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  141. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +4 -4
  142. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +455 -0
  143. certificate/wlt_types.py +122 -0
  144. {gw_certificate → common}/api_if/202/status.json +6 -0
  145. {gw_certificate → common}/api_if/203/status.json +6 -0
  146. {gw_certificate → common}/api_if/204/status.json +6 -0
  147. common/api_if/206/data.json +85 -0
  148. common/api_if/206/status.json +69 -0
  149. common/api_if/api_validation.py +85 -0
  150. common/web/templates/generator.html +148 -0
  151. common/web/templates/index.html +20 -0
  152. common/web/templates/menu.html +54 -0
  153. common/web/templates/parser.html +53 -0
  154. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  155. common/web/web_utils.py +377 -0
  156. {brg_certificate → common}/wltPb_pb2.py +14 -12
  157. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  158. gui_certificate/gui_certificate_cli.py +14 -0
  159. gui_certificate/server.py +1062 -0
  160. gui_certificate/templates/cert_run.html +1207 -0
  161. wiliot_certificate-4.5.0a1.dist-info/METADATA +110 -0
  162. wiliot_certificate-4.5.0a1.dist-info/RECORD +182 -0
  163. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.dist-info}/WHEEL +1 -1
  164. wiliot_certificate-4.5.0a1.dist-info/entry_points.txt +5 -0
  165. wiliot_certificate-4.5.0a1.dist-info/top_level.txt +3 -0
  166. brg_certificate/ag/energous_v0_defines.py +0 -925
  167. brg_certificate/ag/energous_v1_defines.py +0 -931
  168. brg_certificate/ag/energous_v2_defines.py +0 -925
  169. brg_certificate/ag/energous_v3_defines.py +0 -925
  170. brg_certificate/ag/energous_v4_defines.py +0 -925
  171. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  172. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  173. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  174. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  175. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  176. brg_certificate/brg_certificate.py +0 -225
  177. brg_certificate/brg_certificate_cli.py +0 -63
  178. brg_certificate/cert_common.py +0 -923
  179. brg_certificate/cert_config.py +0 -402
  180. brg_certificate/cert_utils.py +0 -362
  181. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  182. brg_certificate/certificate_bcc_test_list.txt +0 -48
  183. brg_certificate/certificate_sanity_test_list.txt +0 -43
  184. brg_certificate/certificate_test_list.txt +0 -53
  185. brg_certificate/config/eclipse.json +0 -10
  186. brg_certificate/config/hivemq.json +0 -10
  187. brg_certificate/config/mosquitto.json +0 -10
  188. brg_certificate/config/mosquitto.md +0 -95
  189. brg_certificate/config/wiliot-dev.json +0 -10
  190. brg_certificate/restore_brg.py +0 -61
  191. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  192. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  193. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  194. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  195. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  196. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  197. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  198. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  199. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  200. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  201. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  204. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  205. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  206. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  208. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  209. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  210. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  211. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  213. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  215. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  216. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  217. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  218. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  219. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  220. brg_certificate/wltPb_pb2.pyi +0 -234
  221. brg_certificate/wlt_types.py +0 -113
  222. gw_certificate/ag/ut_defines.py +0 -364
  223. gw_certificate/ag/wlt_types.py +0 -85
  224. gw_certificate/ag/wlt_types_ag.py +0 -5310
  225. gw_certificate/ag/wlt_types_data.py +0 -64
  226. gw_certificate/api/extended_api.py +0 -23
  227. gw_certificate/api_if/200/data.json +0 -106
  228. gw_certificate/api_if/200/status.json +0 -47
  229. gw_certificate/api_if/201/data.json +0 -98
  230. gw_certificate/api_if/201/status.json +0 -53
  231. gw_certificate/api_if/205/logs.json +0 -12
  232. gw_certificate/api_if/api_validation.py +0 -38
  233. gw_certificate/api_if/gw_capabilities.py +0 -54
  234. gw_certificate/cert_results.py +0 -145
  235. gw_certificate/common/analysis_data_bricks.py +0 -60
  236. gw_certificate/common/debug.py +0 -42
  237. gw_certificate/common/serialization_formatter.py +0 -93
  238. gw_certificate/common/utils.py +0 -8
  239. gw_certificate/common/utils_defines.py +0 -15
  240. gw_certificate/common/wltPb_pb2.py +0 -84
  241. gw_certificate/gw_certificate.py +0 -154
  242. gw_certificate/gw_certificate_cli.py +0 -87
  243. gw_certificate/interface/4.4.93_app.zip +0 -0
  244. gw_certificate/interface/4.4.93_sd_bl_app.zip +0 -0
  245. gw_certificate/interface/ble_simulator.py +0 -61
  246. gw_certificate/interface/ble_sniffer.py +0 -189
  247. gw_certificate/interface/flash_fw.py +0 -90
  248. gw_certificate/interface/if_defines.py +0 -36
  249. gw_certificate/interface/mqtt.py +0 -563
  250. gw_certificate/interface/nrfutil-linux +0 -0
  251. gw_certificate/interface/nrfutil-mac +0 -0
  252. gw_certificate/interface/nrfutil.exe +0 -0
  253. gw_certificate/interface/pkt_generator.py +0 -594
  254. gw_certificate/interface/uart_if.py +0 -236
  255. gw_certificate/interface/uart_ports.py +0 -20
  256. gw_certificate/templates/results.html +0 -241
  257. gw_certificate/templates/stage.html +0 -22
  258. gw_certificate/templates/table.html +0 -6
  259. gw_certificate/templates/test.html +0 -38
  260. gw_certificate/tests/__init__.py +0 -10
  261. gw_certificate/tests/actions.py +0 -289
  262. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  263. gw_certificate/tests/connection.py +0 -188
  264. gw_certificate/tests/downlink.py +0 -172
  265. gw_certificate/tests/generic.py +0 -238
  266. gw_certificate/tests/registration.py +0 -340
  267. gw_certificate/tests/static/__init__.py +0 -0
  268. gw_certificate/tests/static/connection_defines.py +0 -9
  269. gw_certificate/tests/static/downlink_defines.py +0 -9
  270. gw_certificate/tests/static/generated_packet_table.py +0 -195
  271. gw_certificate/tests/static/packet_table.csv +0 -10067
  272. gw_certificate/tests/static/references.py +0 -5
  273. gw_certificate/tests/static/uplink_defines.py +0 -14
  274. gw_certificate/tests/throughput.py +0 -240
  275. gw_certificate/tests/uplink.py +0 -853
  276. wiliot_certificate-4.4.3.dist-info/METADATA +0 -211
  277. wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
  278. wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
  279. wiliot_certificate-4.4.3.dist-info/top_level.txt +0 -3
  280. {brg_certificate → certificate}/__init__.py +0 -0
  281. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -0
  282. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -0
  283. {gw_certificate → common}/api_if/202/data.json +0 -0
  284. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  285. {gw_certificate → common}/api_if/203/data.json +0 -0
  286. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/204/data.json +0 -0
  288. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/205/data.json +0 -0
  290. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/status.json +0 -0
  292. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  293. {gw_certificate → common/api_if}/__init__.py +0 -0
  294. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  295. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.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,57 @@ 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 = cert_utils.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) + cert_utils.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(cert_utils.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}"
50
+
51
+ if pkt_type == PIXELS_PKT:
52
+ payload = ag.Hdr(group_id=ag.GROUP_ID_UNIFIED_PKT_V2).dump() + indicator + cert_utils.get_random_hex_str(34) + serial_pkt_id
53
+
54
+ if pkt_type == MGMT_PKT:
55
+ mgmt_pkt = eval_pkt(f'GenericV{ag.API_VERSION_LATEST}')
56
+ body = mgmt_pkt(module_type=ag.MODULE_DATAPATH, msg_type=ag.BRG_MGMT_MSG_TYPE_CFG_INFO, brg_mac=hex_str2int(brg_mac))
57
+ payload = ag.Hdr(group_id=ag.GROUP_ID_BRG2GW).dump() + body.dump()[:-14] + indicator + serial_pkt_id
58
+
59
+ if pkt_type == SENSOR_PKT:
60
+ payload = ag.Hdr(uuid_msb=ag.HDR_DEFAULT_BRG_SENSOR_UUID_MSB, uuid_lsb=ag.HDR_DEFAULT_BRG_SENSOR_UUID_LSB).dump() + indicator + cert_utils.get_random_hex_str(34) + serial_pkt_id
61
+
62
+ if pkt_type == SIDE_INFO_SENSOR_PKT:
63
+ payload = ag.Hdr(group_id=ag.GROUP_ID_SIDE_INFO_SENSOR).dump() + indicator + cert_utils.get_random_hex_str(34) + serial_pkt_id
64
+
65
+ idx += 1
66
+ pkts += [GenericPkt(adva=adva, payload=payload)]
67
+ return pkts, bridge_ids
68
+
28
69
 
29
70
  class WiliotPixelGen2:
30
71
  """Represents 1 Wiliot Gen2 BLE4 Pixel"""
@@ -63,7 +104,7 @@ class WiliotPixelGen2:
63
104
  class WiliotPixelGen3:
64
105
  """Represents 1 Wiliot Gen3 BLE4 Pixel"""
65
106
  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)
107
+ 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
108
  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
109
  self.pixel_sim_indicator = pixel_sim_indicator
69
110
  self.payload0 = "010203040506070809"
@@ -94,12 +135,12 @@ class WiliotPixelGen3:
94
135
  adva-6 hdr-7 nonce/pkt_id-4 sim_indicator-3 payload0-9 tag_id-4 payload1-4 """
95
136
  return self.adva + self.hdr.dump() + self.get_pkt_id() + self.pixel_sim_indicator + self.payload0 + self.get_tag_id() + self.payload1
96
137
  class WiliotPixelGen3Extended:
97
- """Represents 1 Wiliot Gen3 BLE4 Pixel"""
98
- def __init__(self, pixel_sim_indicator=PIXEL_SIM_INDICATOR):
138
+ """Represents 1 Wiliot Gen3 BLE5 Pixel"""
139
+ def __init__(self, pixel_sim_indicator=PIXEL_SIM_INDICATOR, secondary_channel=SECONDARY_CHANNEL_10):
99
140
  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)
141
+ 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
142
  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
143
+ self.uid = f"0102030405{secondary_channel:02X}" # 6 bytes UID
103
144
  self.mic = pixel_sim_indicator + pixel_sim_indicator # 6 bytes MIC (mico and mic1 are set to the sim indicator)
104
145
  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
146
  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 +167,11 @@ class WiliotPixelGen3Extended:
126
167
  adva-6 adi-2 hdr-7 nonce/pkt_id-4 uid-6 mic-6 payload0-8 payload1-8 """
127
168
  return self.adva + self.adi + self.hdr.dump() + self.get_pkt_id() + self.uid + self.mic + self.payload0 + self.payload1
128
169
 
129
- class RawData:
170
+ class GenericPkt:
130
171
  """Represents Explicit Data. Can be sensors, tags or anything else"""
131
- def __init__(self, raw):
132
- self.raw = raw
172
+ def __init__(self, adva, payload, duplicates=0, delay=0):
173
+ self.adva = adva
174
+ self.payload = payload
133
175
 
134
176
  def __repr__(self) -> str:
135
177
  return f'RawPkt: {self.get_pkt()}'
@@ -137,35 +179,86 @@ class RawData:
137
179
  def set_pkt_type(self, _):
138
180
  pass
139
181
  def get_pkt(self):
140
- return self.raw
182
+ return self.adva + self.payload
141
183
 
142
- class DataSimThread(threading.Thread):
143
- def __init__(self, test, num_of_pixels, duplicates, delay, pkt_types, pixels_type=GEN2, pkts=[]):
184
+ class GenericSimThread(threading.Thread):
185
+ def __init__(self, test, duplicates=DEFAULT_DUPLICATES, delay=DEFAULT_DELAY, send_single_cycle=False, pkts=[]):
144
186
  super().__init__()
145
187
  self.test = test
188
+ self.duplicates = duplicates
189
+ self.delay = delay
190
+ self._stop_event = threading.Event()
191
+ self._pause_event = threading.Event()
192
+ self._pause_event.set()
193
+ self.daemon = True
194
+ self.send_single_cycle = send_single_cycle
195
+ self.pkts = pkts
196
+
197
+ def run(self):
198
+ write_to_data_sim_log_file(f"num_of_raw_pkts={len(self.pkts)} duplicates={self.duplicates} delay={self.delay}\n")
199
+ # Run pixel_sim loop
200
+ while not self._stop_event.is_set():
201
+ self._pause_event.wait()
202
+ for pkt in self.pkts:
203
+ if self._stop_event.is_set():
204
+ return
205
+ if not self._pause_event.is_set():
206
+ break
207
+ self.publish_pkt_to_mqtt(pkt)
208
+ if self.send_single_cycle:
209
+ self.stop()
210
+
211
+ def stop(self):
212
+ """Stops the thread completely"""
213
+ self._stop_event.set()
214
+ write_to_data_sim_log_file(f"DataSimThread stopped\n")
215
+
216
+ def pause(self):
217
+ """Pauses the thread execution"""
218
+ self._pause_event.clear()
219
+ write_to_data_sim_log_file(f"DataSimThread paused\n")
220
+
221
+ def resume(self):
222
+ """Resumes the thread execution"""
223
+ self._pause_event.set()
224
+ write_to_data_sim_log_file(f"DataSimThread resumed\n")
225
+
226
+ def publish_pkt_to_mqtt(self, pkt):
227
+ msg = {TX_PKT: pkt.get_pkt(),
228
+ TX_MAX_RETRIES: self.duplicates,
229
+ TX_MAX_DURATION_MS: 100,
230
+ ACTION: 0}
231
+ # Use protobuf if protubuf flag is set to True
232
+ if self.test.tester.protobuf:
233
+ payload = cert_protobuf.downlink_to_pb(msg)
234
+ else:
235
+ payload = json.dumps(msg)
236
+ self.test.tester.mqttc.publish(self.test.tester.mqttc.update_topic, payload=payload)
237
+ write_to_data_sim_log_file(f"{pkt}" + " {}\n".format(datetime.datetime.now().strftime("%d/%m,%H:%M:%S.%f")[:-4]))
238
+ actual_delay = max(self.delay, self.duplicates * (PIXEL_SIM_MIN_CYCLE))
239
+ time.sleep(actual_delay/1000)
240
+
241
+ class DataSimThread(GenericSimThread):
242
+ def __init__(self, test, num_of_pixels, pkt_types, pixels_type=GEN2, channel=SECONDARY_CHANNEL_10, **kwargs):
243
+ self.test = test
244
+ self.__dict__.update(kwargs)
245
+ super().__init__(**self.__dict__)
146
246
  self.num_of_pixels = num_of_pixels
147
247
  # Create data list
148
- if pixels_type == RAW_DATA:
149
- self.pixels = [RawData(p) for p in pkts]
150
- elif pixels_type == GEN2:
248
+ if pixels_type == GEN2:
151
249
  self.pixels = [WiliotPixelGen2() for _ in range(self.num_of_pixels)]
152
250
  elif pixels_type == GEN3:
153
251
  self.pixels = [WiliotPixelGen3() for _ in range(self.num_of_pixels)]
154
252
  elif pixels_type == GEN3_EXTENDED:
155
- self.pixels = [WiliotPixelGen3Extended() for _ in range(self.num_of_pixels)]
253
+ self.pixels = [WiliotPixelGen3Extended(secondary_channel=channel) for _ in range(self.num_of_pixels)]
156
254
  else:
157
255
  print(f"Didn't define pixels type")
158
- self.duplicates = duplicates
159
- self.delay = delay
160
256
  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
257
 
166
258
  def run(self):
167
259
  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
260
  # Run pixel_sim loop
261
+ sent_pkt_ctr = 0
169
262
  while not self._stop_event.is_set():
170
263
  self._pause_event.wait()
171
264
  for i in range(self.num_of_pixels):
@@ -179,10 +272,14 @@ class DataSimThread(threading.Thread):
179
272
  pkt = self.pixels[i]
180
273
  pkt.set_pkt_type(pkt_type)
181
274
 
275
+ # Adding 1 to tx rate & temp counters for event tests (0b001001)
276
+ if "event" in self.test.name:
277
+ sent_pkt_ctr += 1
278
+ if sent_pkt_ctr == 20:
279
+ pkt.hdr.group_id_major += 0x09
280
+
182
281
  # 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:
282
+ if type(pkt) == WiliotPixelGen3:
186
283
  if pkt_type == 1:
187
284
  if self.pkt_types == [0,1]:
188
285
  pkt.pkt_id += 1
@@ -198,19 +295,7 @@ class DataSimThread(threading.Thread):
198
295
  if type(pkt) == WiliotPixelGen2:
199
296
  pkt.randomize_payload1() # In the FW we assume data is random at the 4 last bytes
200
297
  # 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)
298
+ self.publish_pkt_to_mqtt(pkt)
214
299
 
215
300
  def stop(self):
216
301
  """Stops the thread completely"""
@@ -1,23 +1,24 @@
1
1
  # Files
2
2
  import os
3
+ import datetime
3
4
  import importlib.metadata
4
- # BASE_DIR should be initiated in the same dir as brg_certificate.py
5
+ import certificate.ag.wlt_types_ag as ag
6
+ # BASE_DIR should be initiated in the same dir as certificate.py
5
7
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
8
+ ARTIFACTS_DIR = os.path.join(os.getcwd(), f"cert_artifacts_{datetime.datetime.now().strftime("%d_%m_%Y__%H_%M_%S")}")
6
9
  # CERT_VERSION handling - local/PyPi
7
10
  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:
11
+ try:
12
+ CERT_VERSION = importlib.metadata.version("wiliot_certificate")
13
+ except importlib.metadata.PackageNotFoundError:
11
14
  CERT_VERSION = LOCAL_DEV
12
15
  CERT_MQTT_LOG_FILE = "cert_mqtt_log.json"
13
16
  DATA_SIM_LOG_FILE = "data_sim_log.txt"
14
17
  UT_RESULT_FILE_HTML = "results.html"
15
18
  UT_RESULT_FILE_PDF = "results.pdf"
16
- UT_RESULT_FILE = "results.html"
17
19
  UTILS_BASE_REL_PATH = "../../../utils"
18
20
 
19
21
  # GW defines
20
- GW_ID = "gatewayId"
21
22
  ADDITIONAL = "additional"
22
23
  REPORTED_CONF = "reportedConf"
23
24
  GW_CONF = "gatewayConf"
@@ -25,14 +26,10 @@ GW_NAME = "gatewayName"
25
26
  GW_API_VERSION = "apiVersion"
26
27
  LAT = "lat"
27
28
  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
29
  NFPKT = "nfpkt"
35
30
  TBC = "tbc"
31
+ EVENT_FLAG = "event_flag"
32
+ EVENT_CTR = "event_ctr"
36
33
  RSSI = "rssi"
37
34
  SRC_ID = "src_id"
38
35
 
@@ -40,30 +37,17 @@ INTERNAL_BRG_RSSI = 1
40
37
  BRIDGE_ID = "bridgeId"
41
38
  ALIAS_BRIDGE_ID = "aliasBridgeId"
42
39
  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"
40
+ AGGREGATED_PAYLOAD = "aggregated_payload"
55
41
 
56
42
  WLT_SERVER = "wiliotServer"
57
43
  PACER_INTERVAL = "pacerInterval"
58
44
  OUTPUT_POWER_2_4 = "2.4GhzOutputPower"
59
45
  USE_STAT_LOC = "useStaticLocation"
60
46
  LOCATION = "location"
61
- GW_ENERGY_PATTERN = "energizingPattern"
62
47
  VERSION = "version"
63
48
  WIFI_VERSION = "interfaceChipSwVersion"
64
49
  BLE_VERSION = "bleChipSwVersion"
65
50
  BLE_MAC_ADDR = "bleChipMacAddress"
66
- GW_MODE = "gwMode"
67
51
  PROD = "prod"
68
52
  SERIALIZATION_FORMAT = "serializationFormat"
69
53
  PROTOBUF = "Protobuf"
@@ -87,16 +71,17 @@ GW_LOGS = "gatewayLogs"
87
71
  LOGS = "logs"
88
72
  GW_LATITUDE = "Latitude"
89
73
  GW_LONGITUDE = "Longitude"
74
+ ACL_COUNTERS = "aclCounters"
90
75
  GW_LOG_PERIOD = 30
91
76
 
92
77
  # Thin gw defines
93
- THIN_GW_PROTOCOL_VERSION = "protocolVersion"
94
78
  TX_PKT = "txPacket"
95
79
  TX_MAX_DURATION_MS = "txMaxDurationMs"
96
80
  TX_MAX_RETRIES = "txMaxRetries"
97
81
  TRANPARENT_PKT_LEN = 31 * 2
98
82
  ACTION_ADVERTISING = 0
99
83
  ACTION_BRG_OTA = 1
84
+ ACTION_GW_OTA = 2
100
85
 
101
86
  # Simulator defines
102
87
  GW_SIM_BLE_MAC_ADDRESS = 'GW_SIM_BLE_MAC_ADDRESS'
@@ -108,6 +93,9 @@ GEN2 = 2
108
93
  GEN3 = 3
109
94
  GEN3_EXTENDED = 4
110
95
  RAW_DATA = 5
96
+ DUT = "DUT"
97
+ TESTER = "TESTER"
98
+ BRG1 = "BRG1"
111
99
 
112
100
  # Configurable brg fields' names by modules
113
101
  # common #
@@ -120,11 +108,16 @@ BRG_SIGNAL_INDICATOR_REP = "signal_indicator_rep"
120
108
  BRG_UNIFIED_ECHO_PKT = "unified_echo_pkt"
121
109
  BRG_ADAPTIVE_PACER = "adaptive_pacer"
122
110
  BRG_PACER_INTERVAL = "pacer_interval"
111
+ BRG_EVENT_WINDOW = "event_window"
112
+ BRG_EVENT_TIME_UNIT = "event_time_unit"
123
113
  BRG_RSSI_THRESHOLD = "rssi_threshold"
124
114
  BRG_SUB1G_RSSI_THRESHOLD = "sub1g_rssi_threshold"
125
115
  BRG_TX_REPETITION = "tx_repetition"
126
116
  BRG_PKT_FILTER = "pkt_filter"
127
117
  BRG_RX_CHANNEL = "rx_channel"
118
+ BRG_EVENT_TRIGGER = "event_trigger"
119
+ BRG_EVENT_PACER_INTERVAL = "event_pacer_interval"
120
+ BRG_RSSI_MOVEMENT_THRESHOLD = "rssi_movement_threshold"
128
121
  # Calibration #
129
122
  BRG_CALIB_INTERVAL = "interval"
130
123
  # Energy Sub1g #
@@ -132,6 +125,7 @@ BRG_CYCLE = "cycle"
132
125
  # 3rd party sensors #
133
126
  BRG_SENSOR0 = "sensor0"
134
127
  BRG_SENSOR1 = "sensor1"
128
+ BRG_SENSOR2 = "sensor2"
135
129
 
136
130
  # Common defines
137
131
  PACKETS = "packets"
@@ -186,6 +180,45 @@ VER_UUID_STR = "versionUUID"
186
180
  STEP = "step"
187
181
  PROGRESS = "progress"
188
182
  VER_MAX_LEN = 31
183
+ EXPECTED_REPORTS = {
184
+ 4: {0, 25, 50, 75, 100},
185
+ 5: {0, 100},
186
+ 6: {10, 20, 30, 40, 50, 60, 70, 80, 90, 100},
187
+ 7: {100}
188
+ }
189
+ FINAL_OTA_STEP = max(EXPECTED_REPORTS.keys())
190
+
191
+
192
+ # Actions tests related
193
+ BATTERY_SENSOR_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_MINEW_DUAL_BAND_V0, ag.BOARD_TYPE_ERM_V0,
194
+ ag.BOARD_TYPE_ERM_V1, ag.BOARD_TYPE_KOAMTAC_V0]
195
+ POF_NOT_SUPPORTING_BOARD_TYPES = [ag.BOARD_TYPE_FANSTEL_WIFI_V0, ag.BOARD_TYPE_FANSTEL_LAN_V0]
196
+
197
+ BRG_NON_DEFAULT_DUTY_CYCLE = 15
198
+ BRG_NON_DEFAULT_OP_OFFSET_2_4 = 6
199
+ BRG_NON_DEFAULT_EP_2_4 = 1
200
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_2_4 = 100
201
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_2_4 = 3
202
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_CYCLE_SUB1G = 100
203
+ BRG_NON_DEFAULT_SIGNAL_INDICATOR_REP_SUB1G = 3
204
+ BRG_NON_DEFAULT_OUTPUT_POWER_SUB1G = 26
205
+ BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN = 0
206
+ BRG_NON_DEFAULT_TX_REPETITION = 2
207
+ BRG_NON_DEFAULT_PACER_INTERVAL = 20
208
+ BRG_NON_DEFAULT_RSSI_THRESHOLD = -80
209
+ BRG_NON_DEFAULT_EVENT_TIME_UNIT = 1
210
+ BRG_NON_DEFAULT_EVENT_WINDOW = 20
211
+ BRG_NON_DEFAULT_EVENT_TRIGGER = 8
212
+ BRG_NON_DEFAULT_RSSI_MOVEMENT_THRESHOLD = 15
213
+ BRG_NON_DEFAULT_EVENT_PACER_INTERVAL = 10
214
+ BRG_NON_DEFAULT_CALIB_OUTPUT_POWER_OFFSET = 2
215
+ BRG_NON_DEFAULT_PKT_FILTER = 17
216
+ BRG_NON_DEFAULT_CALIB_PATTERN = 2
217
+ BRG_NON_DEFAULT_CALIB_INTERVAL = 15
218
+
219
+ LIS2DW12_NON_DEFAULT_STATE_THRESHOLD = 620
220
+ LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION = 120
221
+ LIS2DW12_NON_DEFAULT_SLEEP_DURATION = 35
189
222
 
190
223
  # Versions
191
224
  VERSIONS = {
@@ -210,23 +243,43 @@ VERSIONS = {
210
243
  "4.3.0" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.96"},
211
244
  "4.3.1" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.98"},
212
245
  "4.3.2" : {WIFI_VERSION: "4.3.24", BLE_VERSION: "4.3.100"},
246
+ "4.4.8" : {WIFI_VERSION: "4.4.44", BLE_VERSION: "4.4.95"},
247
+ "4.4.10" : {WIFI_VERSION: "4.4.45", BLE_VERSION: "4.4.96"},
248
+ "4.5.6" : {WIFI_VERSION: "4.5.36", BLE_VERSION: "4.5.69"},
213
249
  }
214
250
 
251
+ # Energous boards specific values for output power
252
+ ENERGOUS_BOARD_TYPES_GROUP = [ag.BOARD_TYPE_ENERGOUS_V0, ag.BOARD_TYPE_ENERGOUS_V2, ag.BOARD_TYPE_ENERGOUS_V3, ag.BOARD_TYPE_ENERGOUS_V4]
253
+ 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,
254
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_11, ag.OUTPUT_POWER_2_4_MAX_MINUS_15,
255
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_19, ag.OUTPUT_POWER_2_4_MAX_MINUS_23]
256
+
257
+ # Energous_V1 board group #
258
+ 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,
259
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_6, ag.OUTPUT_POWER_2_4_MAX_MINUS_10,
260
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_14, ag.OUTPUT_POWER_2_4_MAX_MINUS_18,
261
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_22, ag.OUTPUT_POWER_2_4_MAX_MINUS_26]
262
+
263
+ # Fanstel board group #
264
+ 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,
265
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_6, ag.OUTPUT_POWER_2_4_MAX_MINUS_8,
266
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_12, ag.OUTPUT_POWER_2_4_MAX_MINUS_16,
267
+ ag.OUTPUT_POWER_2_4_MAX_MINUS_20]
268
+
215
269
  # 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
270
+ DEFAULT_GW_FIELD_UPDATE_TIMEOUT = 10
271
+ DEFAULT_BRG_FIELD_UPDATE_TIMEOUT = 10
272
+ HB_PERIOD = 30
273
+ VER_UPDATE_TIMEOUT = 400
274
+ GW_LATITUDE_DEFAULT = 33.0222
275
+ GW_LONGITUDE_DEFAULT = -117.0839
222
276
  # Set to work with default when versions tests only pass through new api ver
223
277
  GW_API_VER_DEFAULT = "201"
224
278
  GW_API_VER_OLD = "200"
225
- GW_API_VER_LATEST = "205"
279
+ GW_API_VER_LATEST = "206"
226
280
  BRG_CFG_HAS_LEN = 2
227
281
  CLEAR_DATA_PATH_TIMEOUT = 10
228
282
  ACTION_LONG_TIMEOUT = 120
229
- ACTION_SI_PKT_TIMEOUT = 10
230
283
  ACTION_SHORT_TIMEOUT = 5
231
284
 
232
285
  # Internal python ut defines - used only in ut
@@ -234,19 +287,34 @@ PACER_INTERVAL_MIN_TAGS_COUNT = 20
234
287
  PACER_INTERVAL_MAX_FAILED_TAGS = 2
235
288
  PACER_INTERVAL_THRESHOLD_HIGH = 0.90
236
289
  PACER_INTERVAL_CEIL_THRESHOLD = 1.2
237
- PACER_INTERVAL_THRESHOLD = 0.80
290
+ PACER_INTERVAL_THRESHOLD = 0.8
291
+ TEST_EVENT_WINDOW_SEC_CFG = 60
292
+ TEST_TAG_EVENT_WINDOW_CFG = 20
293
+ TEST_EVENT_WINDOW_MIN_CFG = 1
294
+ TEST_EVENT_WINDOW_HR_CFG = 1
295
+ SLEEP_TIME_AGING = 60
296
+ DATA_SIM_EVENT_TESTING_DELAY_MS = 1000
297
+ DATA_SIM_RSSI_EVENT_TESTING_DELAY_MS = 300
298
+ BLE5_MAX_DURATION_MS = ag.BLE5_PARAM_PRIMARY_CHANNEL_SCAN_CYCLE + 1000 # In MS
299
+ BLE5_MAX_DURATION_SEC = BLE5_MAX_DURATION_MS // 1000
300
+ DATA_SIM_EVENT_TESTING_DELAY_SEC = DATA_SIM_EVENT_TESTING_DELAY_MS / 1000
301
+ DATA_SIM_RSSI_EVENT_TESTING_DELAY_SEC = DATA_SIM_RSSI_EVENT_TESTING_DELAY_MS / 1000
302
+ DATA_SIM_EVENT_PACER_INTERVAL_TESTING = 10
238
303
  PACKETS_ECHO_OFF = 16
239
304
  TEST_PASSED = 0
240
305
  TEST_FAILED = -1
241
306
  TEST_SKIPPED = 1
242
- TEST_INIT = 2
307
+ TEST_ABORTED = 2
308
+ MODULE_UNSUPPORTED = 3
243
309
  NO_RESPONSE = "NO_RESPONSE"
244
310
  NOT_FOUND = "NOT_FOUND"
245
311
  DONE = "DONE"
246
312
  MGMT_PKT = "mgmt_pkt"
313
+ PIXELS_PKT = "pixels_pkt"
247
314
  UNIFIED_PKT = "unified_pkt"
248
315
  SIDE_INFO_SENSOR_PKT = "side_info_sensor_pkt"
249
316
  SENSOR_PKT = "sensor_pkt"
317
+ UNIFIED_SENSOR_PKT = "unified_sensor_pkt"
250
318
  DECODED_DATA = "decoded_data"
251
319
  TAG_ID = "tag_id"
252
320
  BRG_LATENCY = "brg_latency"
@@ -256,7 +324,8 @@ PACKET_DATA = "packet_data"
256
324
  PKTS = "pkts"
257
325
  MQTT_LOG_PRE_STR = "mqtt_log_"
258
326
  GW_DATA = "gw_data"
259
- GW_ID = "gw_id"
327
+ GW_ID = "gatewayId"
328
+ GW_TYPE = "gatewayType"
260
329
  CER = "cer"
261
330
  PKT_CNTR_DIFF = "packet_cntr_diff"
262
331
  AVG = "avg_"
@@ -265,7 +334,8 @@ AWS = "aws"
265
334
  TEST = "test"
266
335
  MULTI_BRG_TEST = "multiBridgeTest" # used for multi brg tests
267
336
  GW_ONLY_TEST = "gwOnlyTest" # used for gw only tests
268
- INTERNAL_BRG = "internalBridge"
337
+ BRIDGE_ONLY_TEST = "bridgeOnlyTest" # used for bridge only tests
338
+ DATA_SIMULATION_ONLY_TEST = "dataSimOnlyTest" # used for tests runable only with data simulation
269
339
  PURPOSE = "purpose"
270
340
  MANDATORY = "mandatory"
271
341
  MODULE = "module"
@@ -275,95 +345,17 @@ ALL_SUPPORTED_VALUES = "allSupportedValues"
275
345
  PRE_CONFIG = "Pre Configuration"
276
346
  TEST_BODY = "Test Body"
277
347
  RESTORE_CONFIG = "Restore Configuration"
348
+ GEOLOCATION = "geolocation"
278
349
 
279
350
  # 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}
296
-
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' }
351
+ NO_PARAMS_GIVEN = "No parameters given!"
352
+ BRG_VER_SUCCESS = "SUCCESS - BRG version matches expected version!"
353
+ BRG_BL_VER_SUCCESS = "SUCCESS - BRG Bootloader version matches expected version!"
354
+ WANTED_VER_SAME = "Wanted version is same as original one!"
355
+ WANTED_VER_SAME_MUL = "Wanted versions are same as original ones!"
356
+ VER_UPDATE_PASSED = "Version Update Ran Successfully!"
357
+ VER_UPDATE_FAILED = "The Update Process Has Been Interrupted!"
300
358
 
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
- }
359
+ # BLE simulator
360
+ BLE_SIM_ADV_37_38_39 = 0
361
+ BLE_SIM_RADIO_1MBPS = 1