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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
  2. {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
  3. certificate/cert_common.py +1488 -0
  4. certificate/cert_config.py +480 -0
  5. {brg_certificate → certificate}/cert_data_sim.py +134 -46
  6. {brg_certificate → certificate}/cert_defines.py +129 -128
  7. {brg_certificate → certificate}/cert_gw_sim.py +183 -53
  8. {brg_certificate → certificate}/cert_mqtt.py +179 -64
  9. {brg_certificate → certificate}/cert_prints.py +35 -33
  10. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  11. {brg_certificate → certificate}/cert_results.py +240 -64
  12. certificate/cert_utils.py +634 -0
  13. certificate/certificate.py +205 -0
  14. certificate/certificate_cli.py +76 -0
  15. certificate/certificate_eth_test_list.txt +76 -0
  16. certificate/certificate_sanity_test_list.txt +66 -0
  17. certificate/certificate_test_list.txt +76 -0
  18. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +3 -2
  19. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  20. certificate/tests/calibration/output_power_test/output_power_test.json +23 -0
  21. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  22. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +2 -1
  23. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  24. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +15 -0
  25. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  26. certificate/tests/cloud_connectivity/acl_test/acl_test.json +15 -0
  27. certificate/tests/cloud_connectivity/acl_test/acl_test.py +96 -0
  28. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +19 -0
  29. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +41 -0
  30. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +19 -0
  31. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  32. certificate/tests/cloud_connectivity/connection_test/connection_test.json +18 -0
  33. certificate/tests/cloud_connectivity/connection_test/connection_test.py +67 -0
  34. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +15 -0
  35. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +80 -0
  36. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +21 -0
  37. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +201 -0
  38. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +17 -0
  39. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +104 -0
  40. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +18 -0
  41. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +59 -0
  42. certificate/tests/cloud_connectivity/registration_test/registration_test.json +20 -0
  43. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  44. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  45. certificate/tests/cloud_connectivity/stress_test/stress_test.json +17 -0
  46. certificate/tests/cloud_connectivity/stress_test/stress_test.py +101 -0
  47. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +25 -0
  48. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +92 -0
  49. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +20 -0
  50. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +169 -0
  51. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +2 -1
  52. certificate/tests/datapath/aging_test/aging_test.py +142 -0
  53. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +17 -0
  54. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +89 -0
  55. certificate/tests/datapath/event_test/event_test.json +17 -0
  56. certificate/tests/datapath/event_test/event_test.py +80 -0
  57. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +4 -3
  58. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +19 -13
  59. certificate/tests/datapath/output_power_test/output_power_test.json +23 -0
  60. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  61. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +2 -1
  62. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -11
  63. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -1
  64. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  65. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +3 -2
  66. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  67. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +20 -0
  68. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  69. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +2 -1
  70. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +15 -14
  71. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +19 -0
  72. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +85 -0
  73. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -1
  74. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  75. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -1
  76. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  77. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -2
  78. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  79. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +6 -4
  80. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  81. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +3 -2
  82. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  83. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +8 -7
  84. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +113 -73
  85. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +8 -7
  86. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  87. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +4 -3
  88. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +15 -11
  89. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +4 -3
  90. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +15 -11
  91. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +3 -1
  92. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  93. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +15 -0
  94. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  95. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +15 -0
  96. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  97. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +15 -0
  98. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  99. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +15 -0
  100. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  101. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +16 -0
  102. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  103. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +15 -0
  104. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  105. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +15 -0
  106. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  107. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +15 -0
  108. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +45 -0
  109. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +3 -2
  110. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  111. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +2 -1
  112. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  113. certificate/tests/energy2400/output_power_test/output_power_test.json +23 -0
  114. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  115. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +2 -1
  116. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  117. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +26 -0
  118. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +379 -0
  119. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +20 -0
  120. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +173 -0
  121. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +24 -0
  122. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  123. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -1
  124. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  125. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +2 -1
  126. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  127. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +2 -1
  128. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  129. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +5 -4
  130. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +450 -0
  131. certificate/wlt_types.py +122 -0
  132. {gw_certificate → common}/api_if/202/status.json +6 -0
  133. {gw_certificate → common}/api_if/203/status.json +6 -0
  134. {gw_certificate → common}/api_if/204/status.json +6 -0
  135. common/api_if/206/data.json +85 -0
  136. common/api_if/206/status.json +69 -0
  137. common/api_if/api_validation.py +91 -0
  138. common/web/templates/generator.html +210 -0
  139. common/web/templates/index.html +20 -0
  140. common/web/templates/menu.html +54 -0
  141. common/web/templates/parser.html +53 -0
  142. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  143. common/web/web_utils.py +399 -0
  144. {brg_certificate → common}/wltPb_pb2.py +14 -12
  145. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  146. gui_certificate/gui_certificate_cli.py +14 -0
  147. gui_certificate/server.py +1267 -0
  148. gui_certificate/templates/cert_run.html +1273 -0
  149. wiliot_certificate-4.5.0.dist-info/METADATA +99 -0
  150. wiliot_certificate-4.5.0.dist-info/RECORD +168 -0
  151. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0.dist-info}/WHEEL +1 -1
  152. wiliot_certificate-4.5.0.dist-info/entry_points.txt +5 -0
  153. wiliot_certificate-4.5.0.dist-info/top_level.txt +3 -0
  154. brg_certificate/ag/energous_v0_defines.py +0 -925
  155. brg_certificate/ag/energous_v1_defines.py +0 -931
  156. brg_certificate/ag/energous_v2_defines.py +0 -925
  157. brg_certificate/ag/energous_v3_defines.py +0 -925
  158. brg_certificate/ag/energous_v4_defines.py +0 -925
  159. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  160. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  161. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  162. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  163. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -142
  164. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -785
  165. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -139
  166. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -394
  167. brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -515
  168. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +0 -672
  169. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -550
  170. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -595
  171. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -598
  172. brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -938
  173. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1234
  174. brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
  175. brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
  176. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  177. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -110
  178. brg_certificate/brg_certificate.py +0 -225
  179. brg_certificate/brg_certificate_cli.py +0 -63
  180. brg_certificate/cert_common.py +0 -923
  181. brg_certificate/cert_config.py +0 -402
  182. brg_certificate/cert_utils.py +0 -362
  183. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  184. brg_certificate/certificate_bcc_test_list.txt +0 -48
  185. brg_certificate/certificate_sanity_test_list.txt +0 -43
  186. brg_certificate/certificate_test_list.txt +0 -53
  187. brg_certificate/config/eclipse.json +0 -10
  188. brg_certificate/config/hivemq.json +0 -10
  189. brg_certificate/config/mosquitto.json +0 -10
  190. brg_certificate/config/mosquitto.md +0 -95
  191. brg_certificate/config/wiliot-dev.json +0 -10
  192. brg_certificate/restore_brg.py +0 -61
  193. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  194. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  195. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  196. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  197. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  198. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  199. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  200. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  201. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  204. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  205. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  206. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  208. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  209. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  210. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  211. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  213. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +0 -321
  215. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  216. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  217. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  218. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  219. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  220. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  221. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  222. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  223. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  224. brg_certificate/wltPb_pb2.pyi +0 -234
  225. brg_certificate/wlt_types.py +0 -113
  226. gw_certificate/ag/ut_defines.py +0 -364
  227. gw_certificate/ag/wlt_types.py +0 -85
  228. gw_certificate/ag/wlt_types_ag.py +0 -5310
  229. gw_certificate/ag/wlt_types_data.py +0 -64
  230. gw_certificate/api/extended_api.py +0 -23
  231. gw_certificate/api_if/200/data.json +0 -106
  232. gw_certificate/api_if/200/status.json +0 -47
  233. gw_certificate/api_if/201/data.json +0 -98
  234. gw_certificate/api_if/201/status.json +0 -53
  235. gw_certificate/api_if/205/logs.json +0 -12
  236. gw_certificate/api_if/api_validation.py +0 -38
  237. gw_certificate/api_if/gw_capabilities.py +0 -54
  238. gw_certificate/cert_results.py +0 -145
  239. gw_certificate/common/analysis_data_bricks.py +0 -60
  240. gw_certificate/common/debug.py +0 -42
  241. gw_certificate/common/serialization_formatter.py +0 -93
  242. gw_certificate/common/utils.py +0 -8
  243. gw_certificate/common/utils_defines.py +0 -15
  244. gw_certificate/common/wltPb_pb2.py +0 -84
  245. gw_certificate/gw_certificate.py +0 -154
  246. gw_certificate/gw_certificate_cli.py +0 -87
  247. gw_certificate/interface/4.4.93_app.zip +0 -0
  248. gw_certificate/interface/4.4.93_sd_bl_app.zip +0 -0
  249. gw_certificate/interface/ble_simulator.py +0 -61
  250. gw_certificate/interface/ble_sniffer.py +0 -189
  251. gw_certificate/interface/flash_fw.py +0 -90
  252. gw_certificate/interface/if_defines.py +0 -36
  253. gw_certificate/interface/mqtt.py +0 -563
  254. gw_certificate/interface/nrfutil-linux +0 -0
  255. gw_certificate/interface/nrfutil-mac +0 -0
  256. gw_certificate/interface/nrfutil.exe +0 -0
  257. gw_certificate/interface/pkt_generator.py +0 -594
  258. gw_certificate/interface/uart_if.py +0 -236
  259. gw_certificate/interface/uart_ports.py +0 -20
  260. gw_certificate/templates/results.html +0 -241
  261. gw_certificate/templates/stage.html +0 -22
  262. gw_certificate/templates/table.html +0 -6
  263. gw_certificate/templates/test.html +0 -38
  264. gw_certificate/tests/__init__.py +0 -10
  265. gw_certificate/tests/actions.py +0 -289
  266. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  267. gw_certificate/tests/connection.py +0 -188
  268. gw_certificate/tests/downlink.py +0 -172
  269. gw_certificate/tests/generic.py +0 -238
  270. gw_certificate/tests/registration.py +0 -340
  271. gw_certificate/tests/static/__init__.py +0 -0
  272. gw_certificate/tests/static/connection_defines.py +0 -9
  273. gw_certificate/tests/static/downlink_defines.py +0 -9
  274. gw_certificate/tests/static/generated_packet_table.py +0 -195
  275. gw_certificate/tests/static/packet_table.csv +0 -10067
  276. gw_certificate/tests/static/references.py +0 -5
  277. gw_certificate/tests/static/uplink_defines.py +0 -14
  278. gw_certificate/tests/throughput.py +0 -240
  279. gw_certificate/tests/uplink.py +0 -853
  280. wiliot_certificate-4.4.3.dist-info/METADATA +0 -211
  281. wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
  282. wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
  283. wiliot_certificate-4.4.3.dist-info/top_level.txt +0 -3
  284. {brg_certificate → certificate}/__init__.py +0 -0
  285. {gw_certificate → common}/api_if/202/data.json +0 -0
  286. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/203/data.json +0 -0
  288. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/204/data.json +0 -0
  290. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/data.json +0 -0
  292. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  293. {gw_certificate → common}/api_if/205/status.json +0 -0
  294. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  295. {gw_certificate → common/api_if}/__init__.py +0 -0
  296. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  297. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,399 @@
1
+ from __future__ import annotations
2
+ from flask import render_template, request
3
+ import argparse
4
+ import json
5
+ import re
6
+ from pathlib import Path
7
+ from typing import Any, Dict, List
8
+ import os, platform, shutil, subprocess, shlex
9
+ from certificate.cert_defines import *
10
+ from certificate.cert_prints import *
11
+ from certificate.wlt_types import *
12
+
13
+ ##### Defines #####
14
+
15
+ CREATE_NEW_CONSOLE = getattr(subprocess, "CREATE_NEW_CONSOLE", 0x00000010)
16
+ CFG_STRS = [
17
+ WLT_SERVER,
18
+ LAT,
19
+ LNG,
20
+ WIFI_VERSION,
21
+ BLE_VERSION,
22
+ GW_API_VERSION,
23
+ SERIALIZATION_FORMAT
24
+ ]
25
+ # App names
26
+ FDM = "FDM"
27
+ CERT_WEB = "CERTIFICATE WEB"
28
+
29
+ # Defines to update jinja_env globals
30
+ GLOBAL_DEFINES_TO_UPDATE = {k:v for k,v in ag.__dict__.items() if 'GROUP_ID' in k or 'API_VERSION_LATEST' in k}
31
+
32
+ TestSchema = Dict[str, Any]
33
+ ModuleSchema = Dict[str, Any]
34
+ hex_str2int = lambda x: int(x,16)
35
+ txt2html = lambda txt : str(txt).replace(" ", "&nbsp").replace("\n", "<br>").replace("\\r\\n", "<br>").replace("//", "<br>//").lstrip("b").strip('"')
36
+ def num_to_str(id):
37
+ return str(id).zfill(2)
38
+
39
+ ##### Template Handling Functions #####
40
+
41
+ def utils_data_structs(app):
42
+ title="Enums & Packet Sructures"
43
+ wlt_types_html = "wlt_types.html"
44
+ return render_template('index.html',
45
+ app=app, title=title, wlt_types_html=wlt_types_html)
46
+
47
+ def utils_parser(app):
48
+ title = "Packet Parser"
49
+ output = ""
50
+ received_payload = request.args.get('payload')
51
+ received_payload = received_payload.upper() if received_payload else received_payload
52
+ if received_payload:
53
+ wlt_pkt = WltPkt(received_payload)
54
+ if wlt_pkt.pkt != None:
55
+ output += f"<br>Raw Packet:<br>{received_payload}<br><br>Parsed Packet:<br>{wlt_pkt}"
56
+ else:
57
+ output += "<br>Unable to parse received payload!"
58
+ print(f"output: {output}")
59
+ return render_template('parser.html',
60
+ app=app, title=title, output=txt2html(output))
61
+
62
+ def utils_generator(app):
63
+ title = "Packet Generator"
64
+ output = ""
65
+ def parse_int_input(x, default=0):
66
+ x = str(x).strip()
67
+ if x.startswith('0x') or x.startswith('0X'):
68
+ return int(x, 16)
69
+ try:
70
+ return int(x)
71
+ except ValueError:
72
+ return default
73
+
74
+ def build_and_dump_pkt(pkt_type):
75
+ pkt_template = getattr(ag, pkt_type)()
76
+ pkt_params = {
77
+ k: parse_int_input(request.args.get(f"{pkt_type}_{k}"), pkt_template.__dict__.get(k, 0))
78
+ for k in pkt_template.__dict__.keys()
79
+ }
80
+ pkt = getattr(ag, pkt_type)(**pkt_params)
81
+ try:
82
+ return pkt.dump()
83
+ except Exception as e:
84
+ return f"<br>Error encoding {pkt_type} (bit structure error): {str(e)}<br>"
85
+
86
+ # Build packet types dictionary
87
+ dont_generate_strs = ["Cfg", "SideInfo"]
88
+ wlt_pkt_types = {
89
+ 'Hdr': ag.Hdr(),
90
+ 'DataHdr': ag.DataHdr(),
91
+ **{cls.__name__: cls() for cls in ag.WLT_PKT_TYPES if not any([dg in cls.__name__ for dg in dont_generate_strs])}
92
+ }
93
+
94
+ # Categorize packets and extract API versions
95
+ import re
96
+ pkt_metadata = {}
97
+ for pkt_name in list(wlt_pkt_types.keys())[2:]: # Skip Hdr and DataHdr
98
+ # Determine category
99
+ if pkt_name.startswith('Unified'):
100
+ category = 'Unified'
101
+ elif pkt_name.startswith('Module'):
102
+ category = 'Module'
103
+ elif pkt_name.startswith('Action'):
104
+ category = 'Action'
105
+ elif pkt_name.startswith('Brg2Brg'):
106
+ category = 'Brg2Brg'
107
+ elif pkt_name.startswith('Brg2Gw'):
108
+ category = 'Brg2Gw'
109
+ elif pkt_name.startswith('Sensor'):
110
+ category = 'Sensor'
111
+ else:
112
+ category = 'Other'
113
+
114
+ # Extract API version
115
+ version_match = re.search(r'V(\d+)$', pkt_name)
116
+ api_version = version_match.group(1) if version_match else None
117
+
118
+ pkt_metadata[pkt_name] = {
119
+ 'category': category,
120
+ 'api_version': api_version
121
+ }
122
+
123
+ # Get unique categories and API versions for filters
124
+ categories = sorted(set(m['category'] for m in pkt_metadata.values()))
125
+ api_versions = sorted(set(m['api_version'] for m in pkt_metadata.values() if m['api_version']),
126
+ key=lambda x: int(x) if x else 0, reverse=True)
127
+
128
+ wanted_pkt_type = request.args.get('radios')
129
+ if wanted_pkt_type:
130
+ # Determine header type and build header
131
+ hdr_type = 'DataHdr' if 'Unified' in wanted_pkt_type else 'Hdr'
132
+ output += build_and_dump_pkt(hdr_type)
133
+ output += build_and_dump_pkt(wanted_pkt_type)
134
+
135
+ # Get filter values to preserve them
136
+ filter_category = request.args.get('filter_category', '')
137
+ filter_version = request.args.get('filter_version', '')
138
+
139
+ # Get all form values to preserve them (convert MultiDict to regular dict, taking first value)
140
+ form_values = {k: v for k, v in request.args.items()}
141
+
142
+ print(output)
143
+ return render_template('generator.html',
144
+ app=app, title=title, output=txt2html(output),
145
+ pkt_types=wlt_pkt_types, pkt_types_list=list(wlt_pkt_types.keys())[2:],
146
+ pkt_metadata=pkt_metadata, categories=categories, api_versions=api_versions,
147
+ wanted_pkt_type=wanted_pkt_type, form_values=form_values,
148
+ filter_category=filter_category, filter_version=filter_version)
149
+
150
+ def utils_tag2brg(app):
151
+ title = "Tag to Bridge Packet Converter"
152
+ output = ""
153
+ # Get the inputs
154
+ payload = request.args.get('payload')
155
+ payload = payload.upper() if payload else payload
156
+
157
+ brg_id = request.args.get('brg_id')
158
+ brg_id = brg_id.upper() if brg_id else brg_id
159
+ rssi = request.args.get('rssi')
160
+ tbc = request.args.get('tbc')
161
+ nfpkt = request.args.get('nfpkt')
162
+ brg_latency = request.args.get('brg_latency')
163
+
164
+ if payload and brg_id and rssi and tbc and nfpkt and brg_latency:
165
+ try:
166
+ if len(payload) < 37 * 2:
167
+ raise Exception("The payload should be of size 37 bytes!")
168
+
169
+ hdr = ag.DataHdr(group_id_minor=hex_str2int(payload[20:24]), group_id_major=ag.GROUP_ID_UNIFIED_PKT_V1, pkt_type=hex_str2int(payload[24:26]))
170
+
171
+ # Convert inputs to appropriate types
172
+ rssi = int(rssi)
173
+ tbc = int(tbc)
174
+ nfpkt = int(nfpkt)
175
+ brg_latency = int(brg_latency)
176
+
177
+ # Create the bridge packet
178
+ brg_pkt = ag.UnifiedEchoPktV1(
179
+ nonce_n_unique_id=hex_str2int(payload[26:46]),
180
+ tbc=tbc,
181
+ rssi=rssi,
182
+ brg_latency=brg_latency,
183
+ nfpkt=nfpkt,
184
+ mic=hex_str2int(payload[52:58]),
185
+ data=hex_str2int(payload[58:74])
186
+ )
187
+
188
+ output += "Bridge Packet:<br>"
189
+ output += brg_id
190
+ output += hdr.dump()
191
+ output += brg_pkt.dump()
192
+ except Exception as e:
193
+ output = f"Error processing packet: {str(e)}"
194
+ else:
195
+ output = "Please fill in all required fields"
196
+
197
+ return render_template('tag2brg.html',
198
+ app=app, title=title,
199
+ output=txt2html(output))
200
+
201
+ ##### Utility Functions #####
202
+
203
+ def action_to_field(a: argparse.Action) -> Dict[str, Any]:
204
+ # field name = dest
205
+ name = a.dest
206
+
207
+ # Basic widget inference
208
+ choices = list(a.choices) if getattr(a, "choices", None) else None
209
+ is_multi = a.nargs in ("+", "*") # '+' = at least one, '*' = zero or more
210
+ is_flag = isinstance(a, (argparse._StoreTrueAction, argparse._StoreFalseAction))
211
+
212
+ html_type = "checkbox" if is_flag else "text"
213
+ widget = "input"
214
+ if choices and is_multi:
215
+ widget, html_type = "checkbox_group", "checkbox"
216
+ elif choices:
217
+ widget, html_type = "select", "text"
218
+
219
+ default = None if a.default is argparse.SUPPRESS else a.default
220
+
221
+ # Extract URL from help text if present
222
+ help_text = (a.help or "").strip()
223
+ help_link = None
224
+ if help_text:
225
+ # Match URLs (http:// or https:// followed by non-whitespace characters)
226
+ url_pattern = r'https?://[^\s]+'
227
+ url_match = re.search(url_pattern, help_text)
228
+ if url_match:
229
+ help_link = url_match.group(0)
230
+ # Remove URL from help text to avoid duplication
231
+ help_text = re.sub(url_pattern, '', help_text).strip()
232
+ return {
233
+ "name": name,
234
+ "label": (a.help or name).split('.')[0].strip().title(),
235
+ "help": help_text,
236
+ "help_link": help_link,
237
+ "required": bool(getattr(a, "required", False)) or (not a.option_strings),
238
+ "default": default,
239
+ "choices": choices,
240
+ "nargs": a.nargs,
241
+ "type": html_type,
242
+ "widget": widget,
243
+ "is_flag": is_flag,
244
+ "option_strings": a.option_strings,
245
+ }
246
+
247
+ def parser_to_schema(parser: argparse.ArgumentParser) -> Dict[str, Any]:
248
+ fields: List[Dict[str, Any]] = []
249
+ for a in parser._actions:
250
+ if argparse.SUPPRESS in a.help: continue
251
+ if isinstance(a, (argparse._HelpAction, argparse._VersionAction)):
252
+ continue
253
+ fields.append(action_to_field(a))
254
+ return {
255
+ "title": parser.prog or "CLI",
256
+ "description": parser.description or "",
257
+ "fields": fields,
258
+ }
259
+
260
+ def open_in_terminal(base_cmd: list[str], preferred: str = "auto"):
261
+ """
262
+ base_cmd: e.g. ["wlt-cert-cli", "--gw", "SIM", "--brg", "XYZ", ...]
263
+ preferred: terminal choice ("auto", "terminal", "iterm", "cmd", "powershell", "gnome-terminal", etc.)
264
+ Returns Popen handle (may be None-like if osascript exits immediately).
265
+ """
266
+ system = platform.system()
267
+ _as_quote_for_applescript = lambda s: s.replace("\\", "\\\\").replace('"', '\\"')
268
+
269
+ if system == "Windows":
270
+ term = preferred.lower()
271
+ # On Windows, use subprocess.list2cmdline for proper Windows command line formatting
272
+ import subprocess as sp
273
+ cmd_line = sp.list2cmdline(base_cmd)
274
+ if term in ("auto", "cmd"):
275
+ return subprocess.Popen(["cmd.exe", "/k", cmd_line], creationflags=CREATE_NEW_CONSOLE)
276
+ if term == "powershell":
277
+ return subprocess.Popen(["powershell.exe", "-NoExit", "-Command", cmd_line], creationflags=CREATE_NEW_CONSOLE)
278
+ # Default to cmd
279
+ return subprocess.Popen(["cmd.exe", "/k", cmd_line], creationflags=CREATE_NEW_CONSOLE)
280
+
281
+ # For non-Windows systems, use shlex.join (POSIX-safe)
282
+ cmd_str = shlex.join(base_cmd)
283
+
284
+ if system == "Darwin": # macOS
285
+ term = preferred.lower()
286
+ shell = os.environ.get("SHELL", "/bin/zsh")
287
+ # Run in login shell (loads PATH/env) and keep window open
288
+ inner = f'{shell} -lc {shlex.quote(cmd_str + f"; exec {shell}")}'
289
+
290
+ if term in ("auto", "terminal"):
291
+ scpt_activate = 'tell application "Terminal" to activate'
292
+ scpt_run = 'tell application "Terminal" to do script "{}"'.format(
293
+ _as_quote_for_applescript(inner)
294
+ )
295
+ return subprocess.Popen(["osascript", "-e", scpt_activate, "-e", scpt_run])
296
+
297
+ if term in ("iterm", "iterm2"):
298
+ scpt = (
299
+ 'tell application "iTerm"\n'
300
+ ' if (count of windows) = 0 then create window with default profile\n'
301
+ ' tell current session of current window to write text "{}"\n'
302
+ ' activate\n'
303
+ 'end tell'.format(_as_quote_for_applescript(inner))
304
+ )
305
+ return subprocess.Popen(["osascript", "-e", scpt])
306
+
307
+ # fallback to Terminal
308
+ scpt_activate = 'tell application "Terminal" to activate'
309
+ scpt_run = 'tell application "Terminal" to do script "{}"'.format(
310
+ _as_quote_for_applescript(inner)
311
+ )
312
+ return subprocess.Popen(["osascript", "-e", scpt_activate, "-e", scpt_run])
313
+
314
+ # Linux / Unix
315
+ term = preferred
316
+ def have(x): return shutil.which(x) is not None
317
+ if term == "auto":
318
+ for t in ("gnome-terminal", "konsole", "xfce4-terminal", "xterm"):
319
+ if have(t):
320
+ term = t
321
+ break
322
+ if term == "gnome-terminal":
323
+ return subprocess.Popen(["gnome-terminal", "--", "bash", "-lc", cmd_str + "; exec bash"])
324
+ if term == "konsole":
325
+ return subprocess.Popen(["konsole", "-e", "bash", "-lc", cmd_str + "; exec bash"])
326
+ if term == "xfce4-terminal":
327
+ return subprocess.Popen(["xfce4-terminal", "--command", f"bash -lc {shlex.quote(cmd_str)}; exec bash"])
328
+ if term == "xterm":
329
+ return subprocess.Popen(["xterm", "-e", f"bash -lc {shlex.quote(cmd_str)}; exec bash"])
330
+
331
+ # last resort: run without opening a new terminal
332
+ return subprocess.Popen(base_cmd)
333
+
334
+ def _read_json_safe(p: Path) -> Dict[str, Any]:
335
+ try:
336
+ with p.open("r", encoding="utf-8") as f:
337
+ return json.load(f)
338
+ except Exception:
339
+ return {}
340
+
341
+ def scan_tests_dir(root: str | Path) -> Dict[str, Any]:
342
+ """
343
+ Expect: <root>/<module>/<test>/{<test>.py, <test>.json}
344
+ Returns:
345
+ {
346
+ "root": "<abs>",
347
+ "modules": [
348
+ {"name": "datapath", "path": ".../datapath", "tests": [
349
+ {"id": "datapath/interval_test", "module": "datapath", "name": "interval_test",
350
+ "label": "interval test", "dir": "...", "py": ".../interval_test.py",
351
+ "json_path": ".../interval_test.json", "meta": {...}, "tooltip": "..." }
352
+ ]},
353
+ ...
354
+ ],
355
+ "id_to_py": {"datapath/interval_test": ".../interval_test.py", ...}
356
+ }
357
+ """
358
+ root = Path(root).resolve()
359
+ modules: List[ModuleSchema] = []
360
+ id_to_py: Dict[str, str] = {}
361
+
362
+ if not root.exists():
363
+ return {"root": str(root), "modules": [], "id_to_py": {}}
364
+
365
+ for mod_dir in sorted([p for p in root.iterdir() if p.is_dir()]):
366
+ if mod_dir.name == 'ut': continue
367
+ tests: List[TestSchema] = []
368
+ for test_dir in sorted([p for p in mod_dir.iterdir() if p.is_dir()]):
369
+ if test_dir.name == 'ut' or test_dir.name == 'registration_test': continue
370
+ # prefer <dir>/<dir>.py then first *.py
371
+ py = test_dir / (test_dir.name + ".py")
372
+ if not py.exists():
373
+ py = next(test_dir.glob("*.py"), None)
374
+ # prefer <dir>/<dir>.json then first *.json
375
+ j = test_dir / (test_dir.name + ".json")
376
+ if not j.exists():
377
+ j = next(test_dir.glob("*.json"), None)
378
+
379
+ meta = _read_json_safe(j) if j else {}
380
+ tid = f"{mod_dir.name}/{test_dir.name}"
381
+ item = {
382
+ "id": tid,
383
+ "module": mod_dir.name,
384
+ "name": test_dir.name,
385
+ "label": meta.get('name', test_dir.name.replace("_", " ")),
386
+ "dir": str(test_dir),
387
+ "py": str(py) if py else "",
388
+ "json_path": str(j) if j else "",
389
+ "meta": meta,
390
+ "tooltip": meta.get('purpose', ""),
391
+ }
392
+ tests.append(item)
393
+ if py:
394
+ id_to_py[tid] = str(py)
395
+
396
+ if tests:
397
+ modules.append({"name": mod_dir.name, "path": str(mod_dir), "tests": tests})
398
+
399
+ return {"root": str(root), "modules": modules, "id_to_py": id_to_py}
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bwltPb.proto\x12\x05wltPb\"$\n\x08Location\x12\x0b\n\x03lat\x18\x01 \x01(\x01\x12\x0b\n\x03lng\x18\x02 \x01(\x01\"j\n\x05Value\x12\x16\n\x0cintegerValue\x18\x01 \x01(\x03H\x00\x12\x15\n\x0bnumberValue\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x03 \x01(\tH\x00\x12\x13\n\tboolValue\x18\x04 \x01(\x08H\x00\x42\x06\n\x04type\"\x89\x02\n\x0bGatewayData\x12\x11\n\tgatewayId\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12*\n\x07packets\x18\x03 \x03(\x0b\x32\x19.wltPb.GatewayData.Packet\x12&\n\x08location\x18\x04 \x01(\x0b\x32\x0f.wltPb.LocationH\x00\x88\x01\x01\x1as\n\x06Packet\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12\x12\n\nsequenceId\x18\x03 \x01(\r\x12\x11\n\x04rssi\x18\x04 \x01(\rH\x00\x88\x01\x01\x12\x15\n\raliasBridgeId\x18\x05 \x01(\tB\x07\n\x05_rssiB\x0b\n\t_location\"\xc9\x01\n\rUplinkMessage\x12-\n\rgatewayStatus\x18\x01 \x01(\x0b\x32\x14.wltPb.GatewayStatusH\x00\x12)\n\x0bgatewayInfo\x18\x02 \x01(\x0b\x32\x12.wltPb.GatewayInfoH\x00\x12)\n\x0bgatewayLogs\x18\x03 \x01(\x0b\x32\x12.wltPb.GatewayLogsH\x00\x12+\n\x0c\x61\x63tionStatus\x18\x04 \x01(\x0b\x32\x13.wltPb.ActionStatusH\x00\x42\x06\n\x04type\"&\n\x03\x41\x43L\x12\x12\n\nmode_allow\x18\x01 \x01(\x08\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\"\x97\x01\n\x12GatewayConfigValue\x12\x16\n\x0cintegerValue\x18\x01 \x01(\x03H\x00\x12\x15\n\x0bnumberValue\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x03 \x01(\tH\x00\x12\x13\n\tboolValue\x18\x04 \x01(\x08H\x00\x12\x1e\n\x08\x61\x63lValue\x18\x05 \x01(\x0b\x32\n.wltPb.ACLH\x00\x42\x06\n\x04type\"\xe8\x03\n\rGatewayStatus\x12\x11\n\tgatewayId\x18\x01 \x01(\t\x12\x13\n\x0bgatewayType\x18\x02 \x01(\t\x12\x19\n\x11\x64ownlinkSupported\x18\x03 \x01(\x08\x12!\n\x19\x62ridgeOtaUpgradeSupported\x18\x04 \x01(\x08\x12\x12\n\napiVersion\x18\x05 \x01(\r\x12\x14\n\x07version\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62leSwVersion\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12interfaceSwVersion\x18\x08 \x01(\tH\x02\x88\x01\x01\x12&\n\x08location\x18\t \x01(\x0b\x32\x0f.wltPb.LocationH\x03\x88\x01\x01\x12\x30\n\x06\x63onfig\x18\n \x03(\x0b\x32 .wltPb.GatewayStatus.ConfigEntry\x12\x17\n\nbleAddress\x18\x0b \x01(\tH\x04\x88\x01\x01\x1aH\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.wltPb.GatewayConfigValue:\x02\x38\x01\x42\n\n\x08_versionB\x0f\n\r_bleSwVersionB\x15\n\x13_interfaceSwVersionB\x0b\n\t_locationB\r\n\x0b_bleAddress\"}\n\x0bGatewayInfo\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.wltPb.GatewayInfo.EntriesEntry\x1a<\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\x02\x38\x01\"\x1b\n\x0bGatewayLogs\x12\x0c\n\x04logs\x18\x01 \x03(\t\"\x92\x01\n\x0c\x41\x63tionStatus\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\r\x12\x0e\n\x06status\x18\x02 \x01(\r\x12\x11\n\x04step\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08progress\x18\x04 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x62ridgeId\x18\x05 \x01(\x0cH\x02\x88\x01\x01\x42\x07\n\x05_stepB\x0b\n\t_progressB\x0b\n\t_bridgeId\"\x8e\x02\n\x0f\x44ownlinkMessage\x12#\n\x08txPacket\x18\x01 \x01(\x0b\x32\x0f.wltPb.TxPacketH\x00\x12-\n\rgatewayAction\x18\x02 \x01(\x0b\x32\x14.wltPb.GatewayActionH\x00\x12-\n\rbridgeUpgrade\x18\x03 \x01(\x0b\x32\x14.wltPb.BridgeUpgradeH\x00\x12-\n\rgatewayConfig\x18\x04 \x01(\x0b\x32\x14.wltPb.GatewayConfigH\x00\x12-\n\rcustomMessage\x18\x06 \x01(\x0b\x32\x14.wltPb.CustomMessageH\x00\x42\x06\n\x04typeJ\x04\x08\x05\x10\x06R\x0c\x63ustomBroker\"F\n\x08TxPacket\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x12\n\nmaxRetries\x18\x02 \x01(\r\x12\x15\n\rmaxDurationMs\x18\x03 \x01(\r\"\x1f\n\rGatewayAction\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\"\xa5\x01\n\rBridgeUpgrade\x12\x14\n\x0crebootPacket\x18\x01 \x01(\x0c\x12\x17\n\x0ftxMaxDurationMs\x18\x02 \x01(\r\x12\x14\n\x0ctxMaxRetries\x18\x03 \x01(\r\x12\x10\n\x08\x62ridgeId\x18\x04 \x01(\t\x12\x13\n\x0bversionUuid\x18\x05 \x01(\t\x12\x13\n\x0bupgradeBlSd\x18\x06 \x01(\x08\x12\x13\n\x0bimageDirUrl\x18\x07 \x01(\t\"\xc6\x02\n\rGatewayConfig\x12\x14\n\x07version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62leSwVersion\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12interfaceSwVersion\x18\x03 \x01(\tH\x02\x88\x01\x01\x12&\n\x08location\x18\x04 \x01(\x0b\x32\x0f.wltPb.LocationH\x03\x88\x01\x01\x12\x30\n\x06\x63onfig\x18\x05 \x03(\x0b\x32 .wltPb.GatewayConfig.ConfigEntry\x1aH\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.wltPb.GatewayConfigValue:\x02\x38\x01\x42\n\n\x08_versionB\x0f\n\r_bleSwVersionB\x15\n\x13_interfaceSwVersionB\x0b\n\t_location\"\x81\x01\n\rCustomMessage\x12\x32\n\x07\x65ntries\x18\x01 \x03(\x0b\x32!.wltPb.CustomMessage.EntriesEntry\x1a<\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\x02\x38\x01\x62\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bwltPb.proto\x12\x05wltPb\"$\n\x08Location\x12\x0b\n\x03lat\x18\x01 \x01(\x01\x12\x0b\n\x03lng\x18\x02 \x01(\x01\"j\n\x05Value\x12\x16\n\x0cintegerValue\x18\x01 \x01(\x03H\x00\x12\x15\n\x0bnumberValue\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x03 \x01(\tH\x00\x12\x13\n\tboolValue\x18\x04 \x01(\x08H\x00\x42\x06\n\x04type\"\x89\x02\n\x0bGatewayData\x12\x11\n\tgatewayId\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12*\n\x07packets\x18\x03 \x03(\x0b\x32\x19.wltPb.GatewayData.Packet\x12&\n\x08location\x18\x04 \x01(\x0b\x32\x0f.wltPb.LocationH\x00\x88\x01\x01\x1as\n\x06Packet\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x11\n\ttimestamp\x18\x02 \x01(\x04\x12\x12\n\nsequenceId\x18\x03 \x01(\r\x12\x11\n\x04rssi\x18\x04 \x01(\rH\x00\x88\x01\x01\x12\x15\n\raliasBridgeId\x18\x05 \x01(\tB\x07\n\x05_rssiB\x0b\n\t_location\"\xc9\x01\n\rUplinkMessage\x12-\n\rgatewayStatus\x18\x01 \x01(\x0b\x32\x14.wltPb.GatewayStatusH\x00\x12)\n\x0bgatewayInfo\x18\x02 \x01(\x0b\x32\x12.wltPb.GatewayInfoH\x00\x12)\n\x0bgatewayLogs\x18\x03 \x01(\x0b\x32\x12.wltPb.GatewayLogsH\x00\x12+\n\x0c\x61\x63tionStatus\x18\x04 \x01(\x0b\x32\x13.wltPb.ActionStatusH\x00\x42\x06\n\x04type\"&\n\x03\x41\x43L\x12\x12\n\nmode_allow\x18\x01 \x01(\x08\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\"\x97\x01\n\x12GatewayConfigValue\x12\x16\n\x0cintegerValue\x18\x01 \x01(\x03H\x00\x12\x15\n\x0bnumberValue\x18\x02 \x01(\x01H\x00\x12\x15\n\x0bstringValue\x18\x03 \x01(\tH\x00\x12\x13\n\tboolValue\x18\x04 \x01(\x08H\x00\x12\x1e\n\x08\x61\x63lValue\x18\x05 \x01(\x0b\x32\n.wltPb.ACLH\x00\x42\x06\n\x04type\"\xe8\x03\n\rGatewayStatus\x12\x11\n\tgatewayId\x18\x01 \x01(\t\x12\x13\n\x0bgatewayType\x18\x02 \x01(\t\x12\x19\n\x11\x64ownlinkSupported\x18\x03 \x01(\x08\x12!\n\x19\x62ridgeOtaUpgradeSupported\x18\x04 \x01(\x08\x12\x12\n\napiVersion\x18\x05 \x01(\r\x12\x14\n\x07version\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62leSwVersion\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12interfaceSwVersion\x18\x08 \x01(\tH\x02\x88\x01\x01\x12&\n\x08location\x18\t \x01(\x0b\x32\x0f.wltPb.LocationH\x03\x88\x01\x01\x12\x30\n\x06\x63onfig\x18\n \x03(\x0b\x32 .wltPb.GatewayStatus.ConfigEntry\x12\x17\n\nbleAddress\x18\x0b \x01(\tH\x04\x88\x01\x01\x1aH\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.wltPb.GatewayConfigValue:\x02\x38\x01\x42\n\n\x08_versionB\x0f\n\r_bleSwVersionB\x15\n\x13_interfaceSwVersionB\x0b\n\t_locationB\r\n\x0b_bleAddress\"}\n\x0bGatewayInfo\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.wltPb.GatewayInfo.EntriesEntry\x1a<\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\x02\x38\x01\"\x1b\n\x0bGatewayLogs\x12\x0c\n\x04logs\x18\x01 \x03(\t\"\x92\x01\n\x0c\x41\x63tionStatus\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\r\x12\x0e\n\x06status\x18\x02 \x01(\r\x12\x11\n\x04step\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08progress\x18\x04 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x08\x62ridgeId\x18\x05 \x01(\x0cH\x02\x88\x01\x01\x42\x07\n\x05_stepB\x0b\n\t_progressB\x0b\n\t_bridgeId\"\xbf\x02\n\x0f\x44ownlinkMessage\x12#\n\x08txPacket\x18\x01 \x01(\x0b\x32\x0f.wltPb.TxPacketH\x00\x12-\n\rgatewayAction\x18\x02 \x01(\x0b\x32\x14.wltPb.GatewayActionH\x00\x12-\n\rbridgeUpgrade\x18\x03 \x01(\x0b\x32\x14.wltPb.BridgeUpgradeH\x00\x12-\n\rgatewayConfig\x18\x04 \x01(\x0b\x32\x14.wltPb.GatewayConfigH\x00\x12-\n\rcustomMessage\x18\x06 \x01(\x0b\x32\x14.wltPb.CustomMessageH\x00\x12/\n\x0egatewayUpgrade\x18\x07 \x01(\x0b\x32\x15.wltPb.GatewayUpgradeH\x00\x42\x06\n\x04typeJ\x04\x08\x05\x10\x06R\x0c\x63ustomBroker\"F\n\x08TxPacket\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x12\n\nmaxRetries\x18\x02 \x01(\r\x12\x15\n\rmaxDurationMs\x18\x03 \x01(\r\"\x1f\n\rGatewayAction\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\"\xa5\x01\n\rBridgeUpgrade\x12\x14\n\x0crebootPacket\x18\x01 \x01(\x0c\x12\x17\n\x0ftxMaxDurationMs\x18\x02 \x01(\r\x12\x14\n\x0ctxMaxRetries\x18\x03 \x01(\r\x12\x10\n\x08\x62ridgeId\x18\x04 \x01(\t\x12\x13\n\x0bversionUuid\x18\x05 \x01(\t\x12\x13\n\x0bupgradeBlSd\x18\x06 \x01(\x08\x12\x13\n\x0bimageDirUrl\x18\x07 \x01(\t\"\xc6\x02\n\rGatewayConfig\x12\x14\n\x07version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62leSwVersion\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12interfaceSwVersion\x18\x03 \x01(\tH\x02\x88\x01\x01\x12&\n\x08location\x18\x04 \x01(\x0b\x32\x0f.wltPb.LocationH\x03\x88\x01\x01\x12\x30\n\x06\x63onfig\x18\x05 \x03(\x0b\x32 .wltPb.GatewayConfig.ConfigEntry\x1aH\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.wltPb.GatewayConfigValue:\x02\x38\x01\x42\n\n\x08_versionB\x0f\n\r_bleSwVersionB\x15\n\x13_interfaceSwVersionB\x0b\n\t_location\"\x81\x01\n\rCustomMessage\x12\x32\n\x07\x65ntries\x18\x01 \x03(\x0b\x32!.wltPb.CustomMessage.EntriesEntry\x1a<\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\x02\x38\x01\"\x9a\x01\n\x0eGatewayUpgrade\x12\x13\n\x0bimageDirUrl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x1f\n\x12interfaceSwVersion\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x62leSwVersion\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x15\n\x13_interfaceSwVersionB\x0f\n\r_bleSwVersionb\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -66,19 +66,21 @@ if not _descriptor._USE_C_DESCRIPTORS:
66
66
  _globals['_ACTIONSTATUS']._serialized_start=1482
67
67
  _globals['_ACTIONSTATUS']._serialized_end=1628
68
68
  _globals['_DOWNLINKMESSAGE']._serialized_start=1631
69
- _globals['_DOWNLINKMESSAGE']._serialized_end=1901
70
- _globals['_TXPACKET']._serialized_start=1903
71
- _globals['_TXPACKET']._serialized_end=1973
72
- _globals['_GATEWAYACTION']._serialized_start=1975
73
- _globals['_GATEWAYACTION']._serialized_end=2006
74
- _globals['_BRIDGEUPGRADE']._serialized_start=2009
75
- _globals['_BRIDGEUPGRADE']._serialized_end=2174
76
- _globals['_GATEWAYCONFIG']._serialized_start=2177
77
- _globals['_GATEWAYCONFIG']._serialized_end=2503
69
+ _globals['_DOWNLINKMESSAGE']._serialized_end=1950
70
+ _globals['_TXPACKET']._serialized_start=1952
71
+ _globals['_TXPACKET']._serialized_end=2022
72
+ _globals['_GATEWAYACTION']._serialized_start=2024
73
+ _globals['_GATEWAYACTION']._serialized_end=2055
74
+ _globals['_BRIDGEUPGRADE']._serialized_start=2058
75
+ _globals['_BRIDGEUPGRADE']._serialized_end=2223
76
+ _globals['_GATEWAYCONFIG']._serialized_start=2226
77
+ _globals['_GATEWAYCONFIG']._serialized_end=2552
78
78
  _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_start=1171
79
79
  _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_end=1243
80
- _globals['_CUSTOMMESSAGE']._serialized_start=2506
81
- _globals['_CUSTOMMESSAGE']._serialized_end=2635
80
+ _globals['_CUSTOMMESSAGE']._serialized_start=2555
81
+ _globals['_CUSTOMMESSAGE']._serialized_end=2684
82
82
  _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_start=1390
83
83
  _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_end=1450
84
+ _globals['_GATEWAYUPGRADE']._serialized_start=2687
85
+ _globals['_GATEWAYUPGRADE']._serialized_end=2841
84
86
  # @@protoc_insertion_point(module_scope)
@@ -152,18 +152,20 @@ class ActionStatus(_message.Message):
152
152
  def __init__(self, action: _Optional[int] = ..., status: _Optional[int] = ..., step: _Optional[int] = ..., progress: _Optional[int] = ..., bridgeId: _Optional[bytes] = ...) -> None: ...
153
153
 
154
154
  class DownlinkMessage(_message.Message):
155
- __slots__ = ("txPacket", "gatewayAction", "bridgeUpgrade", "gatewayConfig", "customMessage")
155
+ __slots__ = ("txPacket", "gatewayAction", "bridgeUpgrade", "gatewayConfig", "customMessage", "gatewayUpgrade")
156
156
  TXPACKET_FIELD_NUMBER: _ClassVar[int]
157
157
  GATEWAYACTION_FIELD_NUMBER: _ClassVar[int]
158
158
  BRIDGEUPGRADE_FIELD_NUMBER: _ClassVar[int]
159
159
  GATEWAYCONFIG_FIELD_NUMBER: _ClassVar[int]
160
160
  CUSTOMMESSAGE_FIELD_NUMBER: _ClassVar[int]
161
+ GATEWAYUPGRADE_FIELD_NUMBER: _ClassVar[int]
161
162
  txPacket: TxPacket
162
163
  gatewayAction: GatewayAction
163
164
  bridgeUpgrade: BridgeUpgrade
164
165
  gatewayConfig: GatewayConfig
165
166
  customMessage: CustomMessage
166
- def __init__(self, txPacket: _Optional[_Union[TxPacket, _Mapping]] = ..., gatewayAction: _Optional[_Union[GatewayAction, _Mapping]] = ..., bridgeUpgrade: _Optional[_Union[BridgeUpgrade, _Mapping]] = ..., gatewayConfig: _Optional[_Union[GatewayConfig, _Mapping]] = ..., customMessage: _Optional[_Union[CustomMessage, _Mapping]] = ...) -> None: ...
167
+ gatewayUpgrade: GatewayUpgrade
168
+ def __init__(self, txPacket: _Optional[_Union[TxPacket, _Mapping]] = ..., gatewayAction: _Optional[_Union[GatewayAction, _Mapping]] = ..., bridgeUpgrade: _Optional[_Union[BridgeUpgrade, _Mapping]] = ..., gatewayConfig: _Optional[_Union[GatewayConfig, _Mapping]] = ..., customMessage: _Optional[_Union[CustomMessage, _Mapping]] = ..., gatewayUpgrade: _Optional[_Union[GatewayUpgrade, _Mapping]] = ...) -> None: ...
167
169
 
168
170
  class TxPacket(_message.Message):
169
171
  __slots__ = ("payload", "maxRetries", "maxDurationMs")
@@ -232,3 +234,15 @@ class CustomMessage(_message.Message):
232
234
  ENTRIES_FIELD_NUMBER: _ClassVar[int]
233
235
  entries: _containers.MessageMap[str, Value]
234
236
  def __init__(self, entries: _Optional[_Mapping[str, Value]] = ...) -> None: ...
237
+
238
+ class GatewayUpgrade(_message.Message):
239
+ __slots__ = ("imageDirUrl", "version", "interfaceSwVersion", "bleSwVersion")
240
+ IMAGEDIRURL_FIELD_NUMBER: _ClassVar[int]
241
+ VERSION_FIELD_NUMBER: _ClassVar[int]
242
+ INTERFACESWVERSION_FIELD_NUMBER: _ClassVar[int]
243
+ BLESWVERSION_FIELD_NUMBER: _ClassVar[int]
244
+ imageDirUrl: str
245
+ version: str
246
+ interfaceSwVersion: str
247
+ bleSwVersion: str
248
+ def __init__(self, imageDirUrl: _Optional[str] = ..., version: _Optional[str] = ..., interfaceSwVersion: _Optional[str] = ..., bleSwVersion: _Optional[str] = ...) -> None: ...
@@ -0,0 +1,14 @@
1
+ import argparse
2
+ import webbrowser
3
+ from .server import app
4
+
5
+ def main():
6
+ parser = argparse.ArgumentParser(prog="wlt-cert-gui")
7
+ parser.add_argument("--host", default="127.0.0.1")
8
+ parser.add_argument("--port", type=int, default=5000)
9
+ parser.add_argument("--debug", action="store_true")
10
+ args = parser.parse_args()
11
+
12
+ webbrowser.open(f"http://{args.host}:{args.port}")
13
+ app.run(host=args.host, port=args.port, debug=args.debug)
14
+