wiliot-certificate 1.5.2a1__py3-none-any.whl → 4.4.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 (120) hide show
  1. brg_certificate/ag/energous_v0_defines.py +105 -114
  2. brg_certificate/ag/energous_v1_defines.py +105 -114
  3. brg_certificate/ag/energous_v2_defines.py +105 -114
  4. brg_certificate/ag/energous_v3_defines.py +105 -114
  5. brg_certificate/ag/energous_v4_defines.py +105 -114
  6. brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
  7. brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
  8. brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
  9. brg_certificate/ag/minew_lte_v0_defines.py +105 -114
  10. brg_certificate/ag/wlt_types.html +983 -150
  11. brg_certificate/ag/wlt_types_ag.py +1326 -248
  12. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  13. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  15. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
  16. brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
  17. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
  18. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
  19. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  20. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
  21. brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
  22. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  23. brg_certificate/cert_common.py +61 -11
  24. brg_certificate/cert_config.py +12 -7
  25. brg_certificate/cert_utils.py +3 -1
  26. brg_certificate/certificate_bcc_test_list.txt +0 -2
  27. brg_certificate/certificate_test_list.txt +4 -4
  28. brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
  29. brg_certificate/tests/calibration/interval_test/interval_test.py +5 -5
  30. brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
  31. brg_certificate/tests/calibration/output_power_test/output_power_test.py +5 -5
  32. brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
  33. brg_certificate/tests/calibration/pattern_test/pattern_test.py +16 -10
  34. brg_certificate/tests/datapath/aging_test/aging_test.py +10 -9
  35. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +8 -13
  36. brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
  37. brg_certificate/tests/datapath/output_power_test/output_power_test.py +5 -5
  38. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  39. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +11 -7
  40. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +11 -4
  41. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +10 -10
  42. brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
  43. brg_certificate/tests/datapath/pattern_test/pattern_test.py +5 -6
  44. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  45. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
  46. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  47. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +11 -10
  48. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  49. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +11 -10
  50. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  51. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +11 -10
  52. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
  53. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +5 -6
  54. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +39 -37
  55. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +46 -46
  56. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
  57. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +21 -17
  58. brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
  59. brg_certificate/tests/datapath/stress_test/stress_test.py +20 -17
  60. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
  61. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
  62. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +12 -10
  63. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
  64. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +13 -13
  65. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
  66. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +2 -2
  67. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  68. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +5 -5
  69. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
  70. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +5 -5
  71. brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
  72. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +5 -5
  73. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +2 -2
  74. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +256 -278
  75. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +2 -2
  76. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +256 -278
  77. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +3 -3
  78. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +30 -91
  79. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  80. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +5 -5
  81. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  82. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +5 -5
  83. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +2 -2
  84. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
  85. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +5 -5
  86. brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +2 -2
  87. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
  88. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +6 -7
  89. brg_certificate/wltPb_pb2.py +4 -4
  90. brg_certificate/wltPb_pb2.pyi +2 -1
  91. gw_certificate/api_if/gw_capabilities.py +37 -1
  92. gw_certificate/common/serialization_formatter.py +93 -0
  93. gw_certificate/common/wltPb_pb2.py +50 -38
  94. gw_certificate/common/wltPb_pb2.pyi +42 -35
  95. gw_certificate/gw_certificate.py +4 -2
  96. gw_certificate/gw_certificate_cli.py +5 -4
  97. gw_certificate/interface/4.4.91_app.zip +0 -0
  98. gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
  99. gw_certificate/interface/ble_simulator.py +5 -3
  100. gw_certificate/interface/flash_fw.py +90 -0
  101. gw_certificate/interface/mqtt.py +39 -23
  102. gw_certificate/interface/pkt_generator.py +0 -44
  103. gw_certificate/interface/uart_if.py +25 -12
  104. gw_certificate/tests/actions.py +33 -5
  105. gw_certificate/tests/connection.py +3 -1
  106. gw_certificate/tests/downlink.py +2 -2
  107. gw_certificate/tests/generic.py +5 -4
  108. gw_certificate/tests/registration.py +4 -4
  109. gw_certificate/tests/static/generated_packet_table.py +47 -25
  110. gw_certificate/tests/static/packet_table.csv +10067 -10051
  111. gw_certificate/tests/static/uplink_defines.py +2 -1
  112. gw_certificate/tests/throughput.py +3 -2
  113. gw_certificate/tests/uplink.py +171 -32
  114. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
  115. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +119 -117
  116. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
  117. gw_certificate/interface/4.4.52_app.zip +0 -0
  118. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
  119. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
  120. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: wltPb.proto
4
- # Protobuf Python Version: 4.25.1
5
+ # Protobuf Python Version: 6.30.2
5
6
  """Generated protocol buffer code."""
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
9
11
  from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 30,
16
+ 2,
17
+ '',
18
+ 'wltPb.proto'
19
+ )
10
20
  # @@protoc_insertion_point(imports)
11
21
 
12
22
  _sym_db = _symbol_database.Default()
@@ -14,20 +24,20 @@ _sym_db = _symbol_database.Default()
14
24
 
15
25
 
16
26
 
17
- 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\"\xdb\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\x1a;\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\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\".\n\x0c\x41\x63tionStatus\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\r\x12\x0e\n\x06status\x18\x02 \x01(\r\"\xa7\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\x0c\x63ustomBroker\x18\x05 \x01(\x0b\x32\x13.wltPb.CustomBrokerH\x00\x12-\n\rcustomMessage\x18\x06 \x01(\x0b\x32\x14.wltPb.CustomMessageH\x00\x42\x06\n\x04type\"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\"\xb9\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\x1a;\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.wltPb.Value:\x02\x38\x01\x42\n\n\x08_versionB\x0f\n\r_bleSwVersionB\x15\n\x13_interfaceSwVersionB\x0b\n\t_location\"\xa6\x01\n\x0c\x43ustomBroker\x12\x14\n\x0c\x63ustomBroker\x18\x01 \x01(\x08\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x11\n\tbrokerUrl\x18\x03 \x01(\t\x12\x10\n\x08username\x18\x04 \x01(\t\x12\x10\n\x08password\x18\x05 \x01(\t\x12\x13\n\x0bupdateTopic\x18\x06 \x01(\t\x12\x13\n\x0bstatusTopic\x18\x07 \x01(\t\x12\x11\n\tdataTopic\x18\x08 \x01(\t\"\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\"\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')
18
28
 
19
29
  _globals = globals()
20
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wltPb_pb2', _globals)
22
- if _descriptor._USE_C_DESCRIPTORS == False:
23
- DESCRIPTOR._options = None
24
- _globals['_GATEWAYSTATUS_CONFIGENTRY']._options = None
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_GATEWAYSTATUS_CONFIGENTRY']._loaded_options = None
25
35
  _globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_options = b'8\001'
26
- _globals['_GATEWAYINFO_ENTRIESENTRY']._options = None
36
+ _globals['_GATEWAYINFO_ENTRIESENTRY']._loaded_options = None
27
37
  _globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_options = b'8\001'
28
- _globals['_GATEWAYCONFIG_CONFIGENTRY']._options = None
38
+ _globals['_GATEWAYCONFIG_CONFIGENTRY']._loaded_options = None
29
39
  _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_options = b'8\001'
30
- _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._options = None
40
+ _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._loaded_options = None
31
41
  _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_options = b'8\001'
32
42
  _globals['_LOCATION']._serialized_start=22
33
43
  _globals['_LOCATION']._serialized_end=58
@@ -39,34 +49,36 @@ if _descriptor._USE_C_DESCRIPTORS == False:
39
49
  _globals['_GATEWAYDATA_PACKET']._serialized_end=421
40
50
  _globals['_UPLINKMESSAGE']._serialized_start=437
41
51
  _globals['_UPLINKMESSAGE']._serialized_end=638
42
- _globals['_GATEWAYSTATUS']._serialized_start=641
43
- _globals['_GATEWAYSTATUS']._serialized_end=1116
44
- _globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_start=977
45
- _globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_end=1036
46
- _globals['_GATEWAYINFO']._serialized_start=1118
47
- _globals['_GATEWAYINFO']._serialized_end=1243
48
- _globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_start=1183
49
- _globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_end=1243
50
- _globals['_GATEWAYLOGS']._serialized_start=1245
51
- _globals['_GATEWAYLOGS']._serialized_end=1272
52
- _globals['_ACTIONSTATUS']._serialized_start=1274
53
- _globals['_ACTIONSTATUS']._serialized_end=1320
54
- _globals['_DOWNLINKMESSAGE']._serialized_start=1323
55
- _globals['_DOWNLINKMESSAGE']._serialized_end=1618
56
- _globals['_TXPACKET']._serialized_start=1620
57
- _globals['_TXPACKET']._serialized_end=1690
58
- _globals['_GATEWAYACTION']._serialized_start=1692
59
- _globals['_GATEWAYACTION']._serialized_end=1723
60
- _globals['_BRIDGEUPGRADE']._serialized_start=1726
61
- _globals['_BRIDGEUPGRADE']._serialized_end=1891
62
- _globals['_GATEWAYCONFIG']._serialized_start=1894
63
- _globals['_GATEWAYCONFIG']._serialized_end=2207
64
- _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_start=977
65
- _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_end=1036
66
- _globals['_CUSTOMBROKER']._serialized_start=2210
67
- _globals['_CUSTOMBROKER']._serialized_end=2376
68
- _globals['_CUSTOMMESSAGE']._serialized_start=2379
69
- _globals['_CUSTOMMESSAGE']._serialized_end=2508
70
- _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_start=1183
71
- _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_end=1243
52
+ _globals['_ACL']._serialized_start=640
53
+ _globals['_ACL']._serialized_end=678
54
+ _globals['_GATEWAYCONFIGVALUE']._serialized_start=681
55
+ _globals['_GATEWAYCONFIGVALUE']._serialized_end=832
56
+ _globals['_GATEWAYSTATUS']._serialized_start=835
57
+ _globals['_GATEWAYSTATUS']._serialized_end=1323
58
+ _globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_start=1171
59
+ _globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_end=1243
60
+ _globals['_GATEWAYINFO']._serialized_start=1325
61
+ _globals['_GATEWAYINFO']._serialized_end=1450
62
+ _globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_start=1390
63
+ _globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_end=1450
64
+ _globals['_GATEWAYLOGS']._serialized_start=1452
65
+ _globals['_GATEWAYLOGS']._serialized_end=1479
66
+ _globals['_ACTIONSTATUS']._serialized_start=1482
67
+ _globals['_ACTIONSTATUS']._serialized_end=1628
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
78
+ _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_start=1171
79
+ _globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_end=1243
80
+ _globals['_CUSTOMMESSAGE']._serialized_start=2506
81
+ _globals['_CUSTOMMESSAGE']._serialized_end=2635
82
+ _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_start=1390
83
+ _globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_end=1450
72
84
  # @@protoc_insertion_point(module_scope)
@@ -1,7 +1,8 @@
1
1
  from google.protobuf.internal import containers as _containers
2
2
  from google.protobuf import descriptor as _descriptor
3
3
  from google.protobuf import message as _message
4
- from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
4
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
5
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
5
6
 
6
7
  DESCRIPTOR: _descriptor.FileDescriptor
7
8
 
@@ -62,6 +63,28 @@ class UplinkMessage(_message.Message):
62
63
  actionStatus: ActionStatus
63
64
  def __init__(self, gatewayStatus: _Optional[_Union[GatewayStatus, _Mapping]] = ..., gatewayInfo: _Optional[_Union[GatewayInfo, _Mapping]] = ..., gatewayLogs: _Optional[_Union[GatewayLogs, _Mapping]] = ..., actionStatus: _Optional[_Union[ActionStatus, _Mapping]] = ...) -> None: ...
64
65
 
66
+ class ACL(_message.Message):
67
+ __slots__ = ("mode_allow", "ids")
68
+ MODE_ALLOW_FIELD_NUMBER: _ClassVar[int]
69
+ IDS_FIELD_NUMBER: _ClassVar[int]
70
+ mode_allow: bool
71
+ ids: _containers.RepeatedScalarFieldContainer[bytes]
72
+ def __init__(self, mode_allow: bool = ..., ids: _Optional[_Iterable[bytes]] = ...) -> None: ...
73
+
74
+ class GatewayConfigValue(_message.Message):
75
+ __slots__ = ("integerValue", "numberValue", "stringValue", "boolValue", "aclValue")
76
+ INTEGERVALUE_FIELD_NUMBER: _ClassVar[int]
77
+ NUMBERVALUE_FIELD_NUMBER: _ClassVar[int]
78
+ STRINGVALUE_FIELD_NUMBER: _ClassVar[int]
79
+ BOOLVALUE_FIELD_NUMBER: _ClassVar[int]
80
+ ACLVALUE_FIELD_NUMBER: _ClassVar[int]
81
+ integerValue: int
82
+ numberValue: float
83
+ stringValue: str
84
+ boolValue: bool
85
+ aclValue: ACL
86
+ def __init__(self, integerValue: _Optional[int] = ..., numberValue: _Optional[float] = ..., stringValue: _Optional[str] = ..., boolValue: bool = ..., aclValue: _Optional[_Union[ACL, _Mapping]] = ...) -> None: ...
87
+
65
88
  class GatewayStatus(_message.Message):
66
89
  __slots__ = ("gatewayId", "gatewayType", "downlinkSupported", "bridgeOtaUpgradeSupported", "apiVersion", "version", "bleSwVersion", "interfaceSwVersion", "location", "config", "bleAddress")
67
90
  class ConfigEntry(_message.Message):
@@ -69,8 +92,8 @@ class GatewayStatus(_message.Message):
69
92
  KEY_FIELD_NUMBER: _ClassVar[int]
70
93
  VALUE_FIELD_NUMBER: _ClassVar[int]
71
94
  key: str
72
- value: Value
73
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...
95
+ value: GatewayConfigValue
96
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[GatewayConfigValue, _Mapping]] = ...) -> None: ...
74
97
  GATEWAYID_FIELD_NUMBER: _ClassVar[int]
75
98
  GATEWAYTYPE_FIELD_NUMBER: _ClassVar[int]
76
99
  DOWNLINKSUPPORTED_FIELD_NUMBER: _ClassVar[int]
@@ -91,9 +114,9 @@ class GatewayStatus(_message.Message):
91
114
  bleSwVersion: str
92
115
  interfaceSwVersion: str
93
116
  location: Location
94
- config: _containers.MessageMap[str, Value]
117
+ config: _containers.MessageMap[str, GatewayConfigValue]
95
118
  bleAddress: str
96
- def __init__(self, gatewayId: _Optional[str] = ..., gatewayType: _Optional[str] = ..., downlinkSupported: bool = ..., bridgeOtaUpgradeSupported: bool = ..., apiVersion: _Optional[int] = ..., version: _Optional[str] = ..., bleSwVersion: _Optional[str] = ..., interfaceSwVersion: _Optional[str] = ..., location: _Optional[_Union[Location, _Mapping]] = ..., config: _Optional[_Mapping[str, Value]] = ..., bleAddress: _Optional[str] = ...) -> None: ...
119
+ def __init__(self, gatewayId: _Optional[str] = ..., gatewayType: _Optional[str] = ..., downlinkSupported: bool = ..., bridgeOtaUpgradeSupported: bool = ..., apiVersion: _Optional[int] = ..., version: _Optional[str] = ..., bleSwVersion: _Optional[str] = ..., interfaceSwVersion: _Optional[str] = ..., location: _Optional[_Union[Location, _Mapping]] = ..., config: _Optional[_Mapping[str, GatewayConfigValue]] = ..., bleAddress: _Optional[str] = ...) -> None: ...
97
120
 
98
121
  class GatewayInfo(_message.Message):
99
122
  __slots__ = ("entries",)
@@ -115,28 +138,32 @@ class GatewayLogs(_message.Message):
115
138
  def __init__(self, logs: _Optional[_Iterable[str]] = ...) -> None: ...
116
139
 
117
140
  class ActionStatus(_message.Message):
118
- __slots__ = ("action", "status")
141
+ __slots__ = ("action", "status", "step", "progress", "bridgeId")
119
142
  ACTION_FIELD_NUMBER: _ClassVar[int]
120
143
  STATUS_FIELD_NUMBER: _ClassVar[int]
144
+ STEP_FIELD_NUMBER: _ClassVar[int]
145
+ PROGRESS_FIELD_NUMBER: _ClassVar[int]
146
+ BRIDGEID_FIELD_NUMBER: _ClassVar[int]
121
147
  action: int
122
148
  status: int
123
- def __init__(self, action: _Optional[int] = ..., status: _Optional[int] = ...) -> None: ...
149
+ step: int
150
+ progress: int
151
+ bridgeId: bytes
152
+ def __init__(self, action: _Optional[int] = ..., status: _Optional[int] = ..., step: _Optional[int] = ..., progress: _Optional[int] = ..., bridgeId: _Optional[bytes] = ...) -> None: ...
124
153
 
125
154
  class DownlinkMessage(_message.Message):
126
- __slots__ = ("txPacket", "gatewayAction", "bridgeUpgrade", "gatewayConfig", "customBroker", "customMessage")
155
+ __slots__ = ("txPacket", "gatewayAction", "bridgeUpgrade", "gatewayConfig", "customMessage")
127
156
  TXPACKET_FIELD_NUMBER: _ClassVar[int]
128
157
  GATEWAYACTION_FIELD_NUMBER: _ClassVar[int]
129
158
  BRIDGEUPGRADE_FIELD_NUMBER: _ClassVar[int]
130
159
  GATEWAYCONFIG_FIELD_NUMBER: _ClassVar[int]
131
- CUSTOMBROKER_FIELD_NUMBER: _ClassVar[int]
132
160
  CUSTOMMESSAGE_FIELD_NUMBER: _ClassVar[int]
133
161
  txPacket: TxPacket
134
162
  gatewayAction: GatewayAction
135
163
  bridgeUpgrade: BridgeUpgrade
136
164
  gatewayConfig: GatewayConfig
137
- customBroker: CustomBroker
138
165
  customMessage: CustomMessage
139
- def __init__(self, txPacket: _Optional[_Union[TxPacket, _Mapping]] = ..., gatewayAction: _Optional[_Union[GatewayAction, _Mapping]] = ..., bridgeUpgrade: _Optional[_Union[BridgeUpgrade, _Mapping]] = ..., gatewayConfig: _Optional[_Union[GatewayConfig, _Mapping]] = ..., customBroker: _Optional[_Union[CustomBroker, _Mapping]] = ..., customMessage: _Optional[_Union[CustomMessage, _Mapping]] = ...) -> None: ...
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: ...
140
167
 
141
168
  class TxPacket(_message.Message):
142
169
  __slots__ = ("payload", "maxRetries", "maxDurationMs")
@@ -179,8 +206,8 @@ class GatewayConfig(_message.Message):
179
206
  KEY_FIELD_NUMBER: _ClassVar[int]
180
207
  VALUE_FIELD_NUMBER: _ClassVar[int]
181
208
  key: str
182
- value: Value
183
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...
209
+ value: GatewayConfigValue
210
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[GatewayConfigValue, _Mapping]] = ...) -> None: ...
184
211
  VERSION_FIELD_NUMBER: _ClassVar[int]
185
212
  BLESWVERSION_FIELD_NUMBER: _ClassVar[int]
186
213
  INTERFACESWVERSION_FIELD_NUMBER: _ClassVar[int]
@@ -190,28 +217,8 @@ class GatewayConfig(_message.Message):
190
217
  bleSwVersion: str
191
218
  interfaceSwVersion: str
192
219
  location: Location
193
- config: _containers.MessageMap[str, Value]
194
- def __init__(self, version: _Optional[str] = ..., bleSwVersion: _Optional[str] = ..., interfaceSwVersion: _Optional[str] = ..., location: _Optional[_Union[Location, _Mapping]] = ..., config: _Optional[_Mapping[str, Value]] = ...) -> None: ...
195
-
196
- class CustomBroker(_message.Message):
197
- __slots__ = ("customBroker", "port", "brokerUrl", "username", "password", "updateTopic", "statusTopic", "dataTopic")
198
- CUSTOMBROKER_FIELD_NUMBER: _ClassVar[int]
199
- PORT_FIELD_NUMBER: _ClassVar[int]
200
- BROKERURL_FIELD_NUMBER: _ClassVar[int]
201
- USERNAME_FIELD_NUMBER: _ClassVar[int]
202
- PASSWORD_FIELD_NUMBER: _ClassVar[int]
203
- UPDATETOPIC_FIELD_NUMBER: _ClassVar[int]
204
- STATUSTOPIC_FIELD_NUMBER: _ClassVar[int]
205
- DATATOPIC_FIELD_NUMBER: _ClassVar[int]
206
- customBroker: bool
207
- port: int
208
- brokerUrl: str
209
- username: str
210
- password: str
211
- updateTopic: str
212
- statusTopic: str
213
- dataTopic: str
214
- def __init__(self, customBroker: bool = ..., port: _Optional[int] = ..., brokerUrl: _Optional[str] = ..., username: _Optional[str] = ..., password: _Optional[str] = ..., updateTopic: _Optional[str] = ..., statusTopic: _Optional[str] = ..., dataTopic: _Optional[str] = ...) -> None: ...
220
+ config: _containers.MessageMap[str, GatewayConfigValue]
221
+ def __init__(self, version: _Optional[str] = ..., bleSwVersion: _Optional[str] = ..., interfaceSwVersion: _Optional[str] = ..., location: _Optional[_Union[Location, _Mapping]] = ..., config: _Optional[_Mapping[str, GatewayConfigValue]] = ...) -> None: ...
215
222
 
216
223
  class CustomMessage(_message.Message):
217
224
  __slots__ = ("entries",)
@@ -18,8 +18,9 @@ from gw_certificate.interface.ble_simulator import BLESimulator
18
18
  from gw_certificate.interface.mqtt import MqttClient
19
19
  from gw_certificate.tests import *
20
20
  from gw_certificate.interface.uart_ports import get_uart_ports
21
- from gw_certificate.api_if.gw_capabilities import GWCapabilities
21
+ from gw_certificate.api_if.gw_capabilities import GWCapabilities, ConfigurationData
22
22
  from gw_certificate.tests import TESTS_NO_UART
23
+
23
24
  import gw_certificate.cert_results as cert_results
24
25
 
25
26
  GW_CERT_VERSION = importlib.metadata.version("wiliot-certificate")
@@ -58,6 +59,7 @@ class GWCertificate:
58
59
  self.result_pdf_path = os.path.join(self.certificate_dir, f'results_{self.current_datetime.strftime('%Y%m%d_%H%M%S')}.pdf')
59
60
  self.template_engine = TemplateEngine()
60
61
  self.env = env
62
+ self.error = ""
61
63
 
62
64
  # Version
63
65
  self.gw_cert_version = GW_CERT_VERSION
@@ -71,7 +73,7 @@ class GWCertificate:
71
73
  self.stress_pps = stress_pps
72
74
  self.aggregation_time = aggregation_time
73
75
  self.actions = actions
74
- self.error = ""
76
+ self.cfg_data = ConfigurationData()
75
77
 
76
78
  # UART-related. Require only when running tests that need it
77
79
  self.use_uart = not all(test in TESTS_NO_UART for test in tests)
@@ -1,6 +1,6 @@
1
1
 
2
2
  import time
3
- from argparse import ArgumentParser
3
+ from argparse import ArgumentParser, SUPPRESS
4
4
 
5
5
  from gw_certificate.common.debug import debug_print
6
6
  from gw_certificate.gw_certificate import GWCertificate, GW_CERT_VERSION
@@ -27,7 +27,7 @@ def filter_actions(actions_names):
27
27
  def main():
28
28
  usage = (
29
29
  "usage: wlt-gw-certificate [-h] -owner OWNER -gw GW\n"
30
- f" [-tests {{connection, uplink, downlink, actions, stress}}] [-update] [-pps {STRESS_DEFAULT_PPS}]\n"
30
+ f" [-tests {{connection, uplink, downlink, actions, stress}}] [-noupdate] [-pps {STRESS_DEFAULT_PPS}]\n"
31
31
  f" [-actions {{info, reboot, bridgeota}}] [-agg AGG] [-env {{prod, test, dev}}]"
32
32
  )
33
33
 
@@ -44,13 +44,14 @@ def main():
44
44
  default=['connection', 'uplink', 'downlink', 'actions', 'stress'])
45
45
  optional.add_argument('-actions', type=str, choices=['info', 'reboot', 'bridgeota'],
46
46
  help="Action stages to run under ActionsTest", required=False, nargs='+', default=['info', 'reboot', 'bridgeota'])
47
- optional.add_argument('-update', action='store_true', help='Update test board firmware', default=False, required=False)
48
47
  optional.add_argument('-pps', type=int, help='Single packets-per-second rate to simulate in the stress test',
49
48
  choices=STRESS_DEFAULT_PPS, default=None, required=False)
50
49
  optional.add_argument('-agg', type=int, help='Aggregation time [seconds] the Uplink stages wait before processing results',
51
50
  default=0, required=False)
52
51
  optional.add_argument('-env', type=str, help='Environment for the RegistrationTest & BridgeOTAStage',
53
52
  choices=['prod', 'test', 'dev'], default='prod', required=False)
53
+ optional.add_argument('-update', action='store_true', help=SUPPRESS, default=True, required=False)
54
+ optional.add_argument('-noupdate', action='store_true', help='Skip the default certification kit firmware update', default=False, required=False)
54
55
  args = parser.parse_args()
55
56
 
56
57
  topic_suffix = '' if args.suffix == '' else '-'+args.suffix
@@ -72,7 +73,7 @@ def main():
72
73
  parser.error("When running any test other than registration, the gateway must be registered to an owner which should be provided using the '-owner' flag.")
73
74
 
74
75
 
75
- gwc = GWCertificate(gw_id=args.gw, owner_id=args.owner, topic_suffix=topic_suffix, tests=tests, update_fw=args.update,
76
+ gwc = GWCertificate(gw_id=args.gw, owner_id=args.owner, topic_suffix=topic_suffix, tests=tests, update_fw=(not args.noupdate),
76
77
  stress_pps=args.pps, aggregation_time=args.agg, env=args.env, actions=actions)
77
78
  debug_print(f"All arguments: {vars(args)}")
78
79
  gwc.run_tests()
Binary file
@@ -20,19 +20,21 @@ class BLESimulator():
20
20
  self.uart.reset_gw()
21
21
  time.sleep(3)
22
22
 
23
- def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS, delay=DEFAULT_DELAY):
23
+ def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS,
24
+ delay=DEFAULT_DELAY, print_for_debug=True):
24
25
  assert self.sim_mode is True, 'BLE Sim not initialized!'
25
26
  if len(raw_packet) == 62:
26
27
  # Add ADVA
27
28
  raw_packet = DEFAULT_ADVA + raw_packet
28
29
  if len(raw_packet) != 74:
29
30
  raise ValueError('Raw Packet must be 62/74 chars long!')
30
- self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}")
31
+ self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}", print_for_debug=print_for_debug)
31
32
  if delay > 0:
32
33
  diff = time.perf_counter()
33
34
  time.sleep((delay/1000) * duplicates)
34
35
  diff = time.perf_counter() - diff
35
- debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
+ if print_for_debug:
37
+ debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
38
 
37
39
 
38
40
  def send_data_si_pair(self, data_packet, si_packet, duplicates, output_power=DEFAULT_OUTPUT_POWER, delay=DEFAULT_DELAY, packet_error=None):
@@ -0,0 +1,90 @@
1
+ import sys
2
+ import serial
3
+ import time
4
+ import argparse
5
+ import subprocess
6
+ import serial.tools.list_ports
7
+ import datetime
8
+ import tkinter as tk
9
+ from tkinter import filedialog
10
+ SEP = "#"*100
11
+
12
+ NRFUTIL_MAP = {"linux": "nrfutil-linux", "linux2": "nrfutil-linux", "darwin": "nrfutil-mac", "win32": ".\\nrfutil.exe"}
13
+
14
+ def read_from_ble(ble_ser):
15
+ ble_ser_bytes = ble_ser.readline()
16
+ input = ble_ser_bytes.decode("utf-8", "ignore").strip()
17
+ if input:
18
+ print(input)
19
+ return input
20
+
21
+ class Command:
22
+ def __init__(self, cmd, expected, delay=0):
23
+ self.cmd = cmd
24
+ self.cmd_exec = b'\r\n!'+bytes(cmd, encoding='utf-8')+b'\r\n'
25
+ self.expected = expected
26
+ self.delay = delay
27
+ def exec_cmd(self, ble_ser):
28
+ print("==>> !{}".format(self.cmd))
29
+ ble_ser.write(self.cmd_exec)
30
+ start_time = datetime.datetime.now()
31
+ while (datetime.datetime.now() - start_time).seconds < 2:
32
+ if self.expected in read_from_ble(ble_ser):
33
+ print("success!\n{}".format(SEP))
34
+ return 0
35
+ print("failure!\n{}".format(SEP))
36
+ return 1
37
+
38
+ GW_COMMANDS = [
39
+ Command(cmd="version", expected="WILIOT_GW_BLE_CHIP_SW_VER"),
40
+ Command(cmd="move_to_bootloader", expected='')
41
+ ]
42
+
43
+ def run_cmd(cmd):
44
+ print("Running: " + cmd)
45
+ p = subprocess.Popen(cmd, shell=True)
46
+ p.wait()
47
+ if p.returncode:
48
+ print(f"\nFailed running : {cmd}\n")
49
+ sys.exit(-1)
50
+ else:
51
+ print(f"\nSuccess running : {cmd}\n")
52
+
53
+ def main():
54
+
55
+ ports = serial.tools.list_ports.comports()
56
+ print(SEP + "\nAvailable ports:")
57
+ for port, desc, hwid in sorted(ports):
58
+ print("{}: {} [{}]".format(port, desc, hwid))
59
+ print(SEP + "\n")
60
+
61
+ parser = argparse.ArgumentParser(description='Used to load gw image')
62
+ parser.add_argument('--p', type=str, help='COM for the ble - meaning loading gw zip file from UART')
63
+ args = parser.parse_args()
64
+
65
+
66
+ if args.p:
67
+ ble_ser = serial.Serial(port=args.p, baudrate=921600, timeout=0.1)
68
+ ble_ser.flushInput()
69
+
70
+ failures = 0
71
+
72
+ for cmd in GW_COMMANDS:
73
+ failures += cmd.exec_cmd(ble_ser)
74
+ time.sleep(cmd.delay)
75
+ if failures == 0:
76
+ ble_ser.close()
77
+ time.sleep(2)
78
+ print("Please pick a file! (<X.Y.Z>_app.zip)")
79
+ root = tk.Tk()
80
+ root.withdraw()
81
+ file_path = filedialog.askopenfilename()
82
+ print(file_path)
83
+ cmd = f'{NRFUTIL_MAP[sys.platform]} dfu serial --package "{file_path}" -p {args.p} -fc 0 -b 115200 -t 10'
84
+ run_cmd(cmd)
85
+ else:
86
+ print("ERROR: failed to run UART commands!")
87
+
88
+
89
+ if __name__ == "__main__":
90
+ main()
@@ -346,7 +346,7 @@ class MqttClient:
346
346
  return message.body_ex
347
347
  return None
348
348
 
349
- def get_gw_configuration(self):
349
+ def get_gw_configuration_reboot(self):
350
350
  self.flush_messages()
351
351
  self.send_action(GwAction.REBOOT_GW)
352
352
  debug_print('---GW CONFIG---')
@@ -360,20 +360,29 @@ class MqttClient:
360
360
  if mqtt_mode == 'legacy':
361
361
  return self.send_action(GwAction.DISABLE_DEV_MODE)
362
362
  elif mqtt_mode == 'automatic':
363
- custom_mqtt = {
364
- "customBroker": False,
365
- "brokerUrl": "",
366
- "port": 8883,
367
- "username": "",
368
- "password": "",
369
- "updateTopic": f"update/{self.owner_id}/{self.gw_id}",
370
- "statusTopic": f"status/{self.owner_id}/{self.gw_id}",
371
- "dataTopic": f"data/{self.owner_id}/{self.gw_id}"
372
- }
373
363
  if self.get_serialization() in {Serialization.UNKNOWN, Serialization.JSON}:
364
+ custom_mqtt = {
365
+ "customBroker": False,
366
+ "brokerUrl": "",
367
+ "port": 8883,
368
+ "username": "",
369
+ "password": "",
370
+ "updateTopic": f"update/{self.owner_id}/{self.gw_id}",
371
+ "statusTopic": f"status/{self.owner_id}/{self.gw_id}",
372
+ "dataTopic": f"data/{self.owner_id}/{self.gw_id}"
373
+ }
374
374
  self.send_payload(custom_mqtt)
375
375
  if self.get_serialization() in {Serialization.UNKNOWN, Serialization.PB}:
376
- self.send_payload({'customBroker': custom_mqtt})
376
+ custom_mqtt = wltPb_pb2.DownlinkMessage()
377
+ custom_mqtt.customMessage.entries['customBroker'].CopyFrom(wltPb_pb2.Value(boolValue=False))
378
+ custom_mqtt.customMessage.entries['brokerUrl'].CopyFrom(wltPb_pb2.Value(stringValue=""))
379
+ custom_mqtt.customMessage.entries['port'].CopyFrom(wltPb_pb2.Value(integerValue=8883))
380
+ custom_mqtt.customMessage.entries['username'].CopyFrom(wltPb_pb2.Value(stringValue=""))
381
+ custom_mqtt.customMessage.entries['password'].CopyFrom(wltPb_pb2.Value(stringValue=""))
382
+ custom_mqtt.customMessage.entries['updateTopic'].CopyFrom(wltPb_pb2.Value(stringValue=f"update/{self.owner_id}/{self.gw_id}"))
383
+ custom_mqtt.customMessage.entries['statusTopic'].CopyFrom(wltPb_pb2.Value(stringValue=f"status/{self.owner_id}/{self.gw_id}"))
384
+ custom_mqtt.customMessage.entries['dataTopic'].CopyFrom(wltPb_pb2.Value(stringValue=f"data/{self.owner_id}/{self.gw_id}"))
385
+ self.send_payload(custom_mqtt)
377
386
  elif mqtt_mode == 'manual':
378
387
  debug_print(f"Make sure GW {self.gw_id} is set to Wiliot MQTT broker")
379
388
  return True
@@ -383,6 +392,15 @@ class MqttClient:
383
392
  self.userdata = {'messages': WltMqttMessages(), 'gw_seen': False , 'logger': self.logger, 'serialization':self.get_serialization(), 'published':[]}
384
393
  self.client.user_data_set(self.userdata)
385
394
 
395
+ def flush_messages_topic(self, topic:Literal['status', 'data', 'update']):
396
+ if topic == 'data':
397
+ self.userdata['messages'].data = []
398
+ elif topic == 'status':
399
+ self.userdata['messages'].status = []
400
+ elif topic == 'update':
401
+ self.userdata['messages'].update = []
402
+
403
+
386
404
  def get_all_messages_from_topic(self, topic:Literal['status', 'data', 'update']):
387
405
  return getattr(self.userdata['messages'], topic)
388
406
 
@@ -406,19 +424,21 @@ class MqttClient:
406
424
  elif GATEWAYSTATUS in message.body_ex.keys():
407
425
  return message.body_ex[GATEWAYSTATUS]
408
426
  return None
409
-
427
+
410
428
  def get_action_status_message(self):
429
+ # Implemented with a list since we can't expect when the GW will publish a msg. To avoid flushing it.
411
430
  messages = self.get_all_messages_from_topic('status')
431
+ action_status_msgs = []
412
432
  for message in messages:
413
433
  if GW_LOGS not in message.body_ex.keys():
414
434
  if STATUS_CODE_STR in message.body_ex.keys():
415
- return message.body_ex
435
+ action_status_msgs.append(message.body_ex)
416
436
  elif ACTIONSTATUS in message.body_ex.keys():
417
- if 'status' not in message.body_ex[ACTIONSTATUS].keys():
418
- # Default values are omitted in protobuf, set 0 for explicitness
419
- message.body_ex[ACTIONSTATUS]['status'] = 0
420
- return message.body_ex[ACTIONSTATUS]
421
- return None
437
+ message.body_ex[ACTIONSTATUS].setdefault('status', 0)
438
+ action_status_msgs.append(message.body_ex[ACTIONSTATUS])
439
+ if len(action_status_msgs) == 0:
440
+ return None
441
+ return action_status_msgs[-1]
422
442
 
423
443
  def get_coupled_tags_pkts(self):
424
444
  return [p for p in self.get_all_pkts_from_topic('data') if NFPKT in p]
@@ -517,9 +537,6 @@ def on_message_protobuf(mqttc, userdata, message):
517
537
  try:
518
538
  pb_message = wltPb_pb2.GatewayData()
519
539
  pb_message.ParseFromString(message.payload)
520
- # # Decode packets payloads as hex
521
- # for idx, packet in enumerate(pb_message.packets):
522
- # pb_message.packets[idx].payload = packet.payload.hex().upper().encode('utf-8')
523
540
  except DecodeError as e:
524
541
  userdata['logger'].debug(f'{message.topic}: An exception occured:\n{e}\n(could be a JSON msg or pb msg that is not UplinkMessage)###########')
525
542
  userdata['logger'].debug(f'Raw Payload: {message.payload}')
@@ -528,7 +545,6 @@ def on_message_protobuf(mqttc, userdata, message):
528
545
  userdata['logger'].debug(f'{message.topic}: {message.payload}')
529
546
  if pb_message is not None:
530
547
  pb_message_dict = MessageToDict(pb_message)
531
- # Decode b64 packet payloads to hex
532
548
  if 'data' in message.topic and 'packets' in pb_message_dict.keys():
533
549
  for idx, packet in enumerate(pb_message_dict['packets']):
534
550
  pb_message_dict['packets'][idx]['payload'] = base64.b64decode(packet['payload']).hex().upper()
@@ -185,15 +185,6 @@ class TagPktGenerator:
185
185
  assert len(pkt) == 62, "packet must be 74 / 62 hex chars long!"
186
186
  self.data_packet.set(pkt)
187
187
 
188
- def get_expected_mqtt(self):
189
- timestamp = int(datetime.datetime.now().timestamp() * 1000)
190
- expected = {
191
- TIMESTAMP: timestamp,
192
- PAYLOAD: self.get_packet()[ADVA_LENGTH+GAP_LENGTH:]
193
- }
194
- return expected
195
-
196
-
197
188
 
198
189
  class BrgPktGenerator:
199
190
  """Bridge Packet Generator - represents 1 wiliot Bridge"""
@@ -451,41 +442,6 @@ class BrgPktGenerator:
451
442
  }
452
443
  return [expected_data, expected_si]
453
444
 
454
- def get_expected_mqtt_unified(self, full_data_pkt, tag_idx:int=None):
455
- if tag_idx is None:
456
- tag_idx = 0
457
- assert tag_idx <= len(self.tag_list), f'Tag index must be in {[i for i in range(len(self.tag_list))]}'
458
-
459
- def extract_param_from_pkt():
460
- # Take only the relevant digis from the data packet
461
- param_hex_string = full_data_pkt[46:-22]
462
- if len(param_hex_string) != 6:
463
- raise ValueError("The parameters hex representation must be 6 digits long")
464
-
465
- # Convert to decimal from binari and assign
466
- param_binari_string = bin(int(param_hex_string, 16))[2:].zfill(24)
467
- nfpkt = int(param_binari_string[:8], 2)
468
- rssi = int(param_binari_string[8:14], 2)
469
- # Note: rssi here is -40 then the actual value. This portion is to be added on cloud
470
- brg_latency = int(param_binari_string[14:20], 2)
471
- brg_global_pacing_group = int(param_binari_string[20:], 2)
472
- return [nfpkt, rssi, brg_latency, brg_global_pacing_group]
473
-
474
- """generates expected MQTT packet"""
475
- timestamp = int(datetime.datetime.now().timestamp() * 1000)
476
- pkt_param = extract_param_from_pkt()
477
-
478
- expected_data = {
479
- TIMESTAMP: timestamp,
480
- BRIDGE_ID: self.bridge_id,
481
- NFPKT: pkt_param[0],
482
- RSSI: pkt_param[1],
483
- BRG_LATENCY: pkt_param[2],
484
- BRG_GLOBAL_PACING_GROUP: pkt_param[3],
485
- PAYLOAD: full_data_pkt[(ADVA_LENGTH+GAP_LENGTH):]
486
- }
487
- return [expected_data]
488
-
489
445
  def get_expected_hb_mqtt(self):
490
446
  timestamp = int(datetime.datetime.now().timestamp() * 1000)
491
447
  expected = {