wiliot-certificate 1.3.0a1__tar.gz

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 (56) hide show
  1. wiliot_certificate-1.3.0a1/LICENSE +21 -0
  2. wiliot_certificate-1.3.0a1/PKG-INFO +113 -0
  3. wiliot_certificate-1.3.0a1/README.md +63 -0
  4. wiliot_certificate-1.3.0a1/pyproject.toml +46 -0
  5. wiliot_certificate-1.3.0a1/setup.cfg +4 -0
  6. wiliot_certificate-1.3.0a1/src/gw_certificate/__init__.py +0 -0
  7. wiliot_certificate-1.3.0a1/src/gw_certificate/ag/ut_defines.py +361 -0
  8. wiliot_certificate-1.3.0a1/src/gw_certificate/ag/wlt_types.py +85 -0
  9. wiliot_certificate-1.3.0a1/src/gw_certificate/ag/wlt_types_ag.py +5310 -0
  10. wiliot_certificate-1.3.0a1/src/gw_certificate/ag/wlt_types_data.py +64 -0
  11. wiliot_certificate-1.3.0a1/src/gw_certificate/api/extended_api.py +1547 -0
  12. wiliot_certificate-1.3.0a1/src/gw_certificate/api_if/__init__.py +0 -0
  13. wiliot_certificate-1.3.0a1/src/gw_certificate/api_if/api_validation.py +40 -0
  14. wiliot_certificate-1.3.0a1/src/gw_certificate/api_if/gw_capabilities.py +18 -0
  15. wiliot_certificate-1.3.0a1/src/gw_certificate/common/analysis_data_bricks.py +1455 -0
  16. wiliot_certificate-1.3.0a1/src/gw_certificate/common/debug.py +63 -0
  17. wiliot_certificate-1.3.0a1/src/gw_certificate/common/utils.py +219 -0
  18. wiliot_certificate-1.3.0a1/src/gw_certificate/common/utils_defines.py +102 -0
  19. wiliot_certificate-1.3.0a1/src/gw_certificate/common/wltPb_pb2.py +72 -0
  20. wiliot_certificate-1.3.0a1/src/gw_certificate/common/wltPb_pb2.pyi +227 -0
  21. wiliot_certificate-1.3.0a1/src/gw_certificate/gw_certificate.py +138 -0
  22. wiliot_certificate-1.3.0a1/src/gw_certificate/gw_certificate_cli.py +70 -0
  23. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/ble_simulator.py +91 -0
  24. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/ble_sniffer.py +189 -0
  25. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/if_defines.py +35 -0
  26. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/mqtt.py +469 -0
  27. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/packet_error.py +22 -0
  28. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/pkt_generator.py +720 -0
  29. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/uart_if.py +193 -0
  30. wiliot_certificate-1.3.0a1/src/gw_certificate/interface/uart_ports.py +20 -0
  31. wiliot_certificate-1.3.0a1/src/gw_certificate/templates/results.html +241 -0
  32. wiliot_certificate-1.3.0a1/src/gw_certificate/templates/stage.html +22 -0
  33. wiliot_certificate-1.3.0a1/src/gw_certificate/templates/table.html +6 -0
  34. wiliot_certificate-1.3.0a1/src/gw_certificate/templates/test.html +38 -0
  35. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/__init__.py +11 -0
  36. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/actions.py +131 -0
  37. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/bad_crc_to_PER_quantization.csv +51 -0
  38. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/connection.py +181 -0
  39. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/downlink.py +174 -0
  40. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/generic.py +161 -0
  41. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/registration.py +288 -0
  42. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/__init__.py +0 -0
  43. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/connection_defines.py +9 -0
  44. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/downlink_defines.py +9 -0
  45. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/generated_packet_table.py +209 -0
  46. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/packet_table.csv +10051 -0
  47. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/references.py +4 -0
  48. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/static/uplink_defines.py +20 -0
  49. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/throughput.py +244 -0
  50. wiliot_certificate-1.3.0a1/src/gw_certificate/tests/uplink.py +683 -0
  51. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/PKG-INFO +113 -0
  52. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/SOURCES.txt +54 -0
  53. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/dependency_links.txt +1 -0
  54. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/entry_points.txt +2 -0
  55. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/requires.txt +14 -0
  56. wiliot_certificate-1.3.0a1/src/wiliot_certificate.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Wiliot Ltd.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.2
2
+ Name: wiliot_certificate
3
+ Version: 1.3.0a1
4
+ Summary: A library for certifying Wiliot-compliant boards
5
+ Author-email: Wiliot <support@wiliot.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Wiliot Ltd.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+ Project-URL: Wiliot, https://www.wiliot.com
29
+ Project-URL: Certified, https://www.wiliot.com/product/ambient-iot-network#partner-device-certification
30
+ Classifier: Programming Language :: Python :: 3
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Requires-Python: >=3.9
34
+ Description-Content-Type: text/markdown
35
+ License-File: LICENSE
36
+ Requires-Dist: jinja2>=3.1.5
37
+ Requires-Dist: appdirs>=1.4.4
38
+ Requires-Dist: plotly>=6.0.0
39
+ Requires-Dist: numpy>=2.2.2
40
+ Requires-Dist: pandas>=2.2.3
41
+ Requires-Dist: colorama>=0.4.6
42
+ Requires-Dist: tabulate>=0.9.0
43
+ Requires-Dist: wiliot-core>=5.9.1
44
+ Requires-Dist: paho-mqtt>=2.1.0
45
+ Requires-Dist: bitstruct>=8.19.0
46
+ Requires-Dist: protobuf>=5.29.3
47
+ Requires-Dist: wiliot-api>=4.10.8
48
+ Requires-Dist: jsonschema>=4.23.0
49
+ Requires-Dist: statsmodels>=0.14.4
50
+
51
+ # wiliot-certificate #
52
+
53
+ <!-- Description -->
54
+ wiliot-certificate is a python library with tools used to test & certify boards and their compatibility with Wiliot's echosystem.
55
+ This python package includes the following CLI utilities:
56
+ - Gateway Certificate (`wlt-gw-certificate`)
57
+
58
+ ## Installing wiliot-certificate
59
+ ````commandline
60
+ pip install wiliot-certificate
61
+ ````
62
+
63
+ ## Using wiliot-certificate
64
+ ### Gateway Certificate
65
+ Test Wiliot GWs capabilities.
66
+ The GW Certificate includes different test that run sequentially to test each capability reported by the GW.
67
+ To run the GW Certificate the GW needs to use a public MQTT Broker (Eclipse):
68
+
69
+ Host: mqtt.eclipseprojects.io
70
+ TLS TCP Port: 8883
71
+ TLS Websocket Port: 443
72
+ TCP Port: 1883
73
+ Websocket Port: 80
74
+
75
+ More information can be found at https://mqtt.eclipseprojects.io/.
76
+
77
+ #### Connection Test
78
+ Processes status packet sent by the GW to the MQTT Broker and validates it according to API Version.
79
+
80
+ #### Uplink Test
81
+ Simulates Wiliot MEL and validates that data is uploaded correctly to the cloud.
82
+
83
+ #### Downlink Test
84
+ Sends advertising actions (txPacket) via MQTT to the GW and validates their advertisements.
85
+
86
+ #### Stress Test
87
+ Increments time delays between packets to evaluate GW's capability in handling increasing packets per second rates.
88
+
89
+ #### GW Certificate Release Notes:
90
+ 1.3.0:
91
+ - Released in a standalone wiliot-certificate package
92
+ - Python 3.13 support
93
+ - Gw API version 205 support
94
+ - Registration Test
95
+
96
+
97
+ ```
98
+ usage: wlt-gw-certificate [-h] -owner OWNER -gw GW [-suffix SUFFIX] [-tests {connection,uplink,downlink,stress}]
99
+
100
+ Gateway Certificate - CLI Tool to test Wiliot GWs
101
+
102
+ required arguments:
103
+ -gw GW Gateway ID
104
+ -owner OWNER Owner ID (optional when running only the registration test)
105
+
106
+ optional arguments:
107
+ -suffix Allow for different suffixes after the GW ID in MQTT topics
108
+ -tests Pick specific tests to run
109
+ -update Update the firmware of the test board
110
+ -pps Pick specific PPS rate for the stress test
111
+ -agg Time the uplink stages should wait before processing packets
112
+ -h, --help show this help message and exit
113
+ ```
@@ -0,0 +1,63 @@
1
+ # wiliot-certificate #
2
+
3
+ <!-- Description -->
4
+ wiliot-certificate is a python library with tools used to test & certify boards and their compatibility with Wiliot's echosystem.
5
+ This python package includes the following CLI utilities:
6
+ - Gateway Certificate (`wlt-gw-certificate`)
7
+
8
+ ## Installing wiliot-certificate
9
+ ````commandline
10
+ pip install wiliot-certificate
11
+ ````
12
+
13
+ ## Using wiliot-certificate
14
+ ### Gateway Certificate
15
+ Test Wiliot GWs capabilities.
16
+ The GW Certificate includes different test that run sequentially to test each capability reported by the GW.
17
+ To run the GW Certificate the GW needs to use a public MQTT Broker (Eclipse):
18
+
19
+ Host: mqtt.eclipseprojects.io
20
+ TLS TCP Port: 8883
21
+ TLS Websocket Port: 443
22
+ TCP Port: 1883
23
+ Websocket Port: 80
24
+
25
+ More information can be found at https://mqtt.eclipseprojects.io/.
26
+
27
+ #### Connection Test
28
+ Processes status packet sent by the GW to the MQTT Broker and validates it according to API Version.
29
+
30
+ #### Uplink Test
31
+ Simulates Wiliot MEL and validates that data is uploaded correctly to the cloud.
32
+
33
+ #### Downlink Test
34
+ Sends advertising actions (txPacket) via MQTT to the GW and validates their advertisements.
35
+
36
+ #### Stress Test
37
+ Increments time delays between packets to evaluate GW's capability in handling increasing packets per second rates.
38
+
39
+ #### GW Certificate Release Notes:
40
+ 1.3.0:
41
+ - Released in a standalone wiliot-certificate package
42
+ - Python 3.13 support
43
+ - Gw API version 205 support
44
+ - Registration Test
45
+
46
+
47
+ ```
48
+ usage: wlt-gw-certificate [-h] -owner OWNER -gw GW [-suffix SUFFIX] [-tests {connection,uplink,downlink,stress}]
49
+
50
+ Gateway Certificate - CLI Tool to test Wiliot GWs
51
+
52
+ required arguments:
53
+ -gw GW Gateway ID
54
+ -owner OWNER Owner ID (optional when running only the registration test)
55
+
56
+ optional arguments:
57
+ -suffix Allow for different suffixes after the GW ID in MQTT topics
58
+ -tests Pick specific tests to run
59
+ -update Update the firmware of the test board
60
+ -pps Pick specific PPS rate for the stress test
61
+ -agg Time the uplink stages should wait before processing packets
62
+ -h, --help show this help message and exit
63
+ ```
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "wiliot_certificate"
7
+ version = "1.3.0a1"
8
+ authors = [
9
+ { name="Wiliot", email="support@wiliot.com" }
10
+ ]
11
+ description = "A library for certifying Wiliot-compliant boards"
12
+ readme = "README.md"
13
+ requires-python = ">=3.9"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent"
18
+ ]
19
+ license = { file = "LICENSE" }
20
+
21
+ dependencies = [
22
+ "jinja2>=3.1.5",
23
+ "appdirs>=1.4.4",
24
+ "plotly>=6.0.0",
25
+ "numpy>=2.2.2",
26
+ "pandas>=2.2.3",
27
+ "colorama>=0.4.6",
28
+ "tabulate>=0.9.0",
29
+ "wiliot-core>=5.9.1",
30
+ "paho-mqtt>=2.1.0",
31
+ "bitstruct>=8.19.0",
32
+ "protobuf>=5.29.3",
33
+ "wiliot-api>=4.10.8",
34
+ "jsonschema>=4.23.0",
35
+ "statsmodels>=0.14.4"
36
+ ]
37
+
38
+ [project.urls]
39
+ Wiliot = "https://www.wiliot.com"
40
+ Certified = "https://www.wiliot.com/product/ambient-iot-network#partner-device-certification"
41
+
42
+ [project.scripts]
43
+ wlt-gw-certificate = "gw_certificate.gw_certificate_cli:main"
44
+
45
+ [tool.setuptools.package-data]
46
+ gw_certificate = ["tests/*.csv", "tests/static/*.csv", "templates/*.html"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,361 @@
1
+ # Files
2
+ UT_MQTT_LOG_FILE = "ut_mqtt_log.json"
3
+
4
+ # GW defines
5
+ GW_ID = "gatewayId"
6
+ ADDITIONAL = "additional"
7
+ REPORTED_CONF = "reportedConf"
8
+ GW_CONF = "gatewayConf"
9
+ GW_NAME = "gatewayName"
10
+ GW_API_VERSION = "apiVersion"
11
+ LAT = "lat"
12
+ LNG = "lng"
13
+ WLT_SERVER = "wiliotServer"
14
+ PACER_INTERVAL = "pacerInterval"
15
+ PKT_TYPES_MASK = "packetTypesMask"
16
+ RX_TX_PERIOD = "rxTxPeriodMs"
17
+ TX_PERIOD = "txPeriodMs"
18
+ ENERGY_PATTERN = "energyPattern"
19
+ OUTPUT_POWER_2_4 = "2.4GhzOutputPower"
20
+ NFPKT = "nfpkt"
21
+ RSSI = "rssi"
22
+ SRC_ID = "src_id"
23
+
24
+ MUL_BRG_TEST_MIN = 2
25
+ INTERNAL_BRG_RSSI = 1
26
+ BRIDGE_ID = "bridgeId"
27
+ ALIAS_BRIDGE_ID = "aliasBridgeId"
28
+ GROUP_ID = "group_id"
29
+ BRG_ACTION = "bridgeAction"
30
+ INTERNAL_BRG_STR = "internal_brg"
31
+ INTERNAL = "INTERNAL"
32
+
33
+ GW_DATA_MODE = "gwDataMode"
34
+ TAGS_AND_BRGS = "Tags & Bridges"
35
+ TAGS_ONLY = "Tags only"
36
+ BRGS_ONLY_37 = "Bridges only (ch37)"
37
+ BRGS_ONLY_38 = "Bridges only (ch38)"
38
+ BRGS_ONLY_39 = "Bridges only (ch39)"
39
+ HIBERNATE = "Hibernate"
40
+
41
+ BLE_WIFI = "ble_wifi"
42
+ BLE_LAN = "ble_lan"
43
+
44
+ WLT_SERVER = "wiliotServer"
45
+ PACER_INTERVAL = "pacerInterval"
46
+ OUTPUT_POWER_2_4 = "2.4GhzOutputPower"
47
+ USE_STAT_LOC = "useStaticLocation"
48
+ GW_ENERGY_PATTERN = "energizingPattern"
49
+ VERSION = "version"
50
+ WIFI_VERSION = "interfaceChipSwVersion"
51
+ BLE_VERSION = "bleChipSwVersion"
52
+ DATA_COUPLING = "dataCoupling"
53
+ GW_MODE = "gwMode"
54
+ PROD = "prod"
55
+
56
+ GET_INFO_ACTION = "getGwInfo"
57
+ REBOOT_GW_ACTION = "rebootGw"
58
+ LOG_PERIOD_ACTION = "LogPeriodSet"
59
+ GET_LOGS = "getLogs"
60
+ GW_INFO = "gatewayInfo"
61
+ GW_LOGS = "gatewayLogs"
62
+ GW_LATITUDE = "Latitude"
63
+ GW_LONGITUDE = "Longitude"
64
+ GW_LOG_PERIOD = 30
65
+
66
+ # Thin gw defines
67
+ THIN_GW_PROTOCOL_VERSION = "protocolVersion"
68
+ TX_PKT = "txPacket"
69
+ TX_MAX_DURATION_MS = "txMaxDurationMs"
70
+ TX_MAX_RETRIES = "txMaxRetries"
71
+ TRANPARENT_PKT_LEN = 31 * 2
72
+ COUPLED_DATA_PKT_LEN = 29 * 2 # No 1E16
73
+
74
+ # Configurable brg fields' names
75
+ BRG_TX_REPETITION = "tx_repetition"
76
+ BRG_GLOBAL_PACING_GROUP = "global_pacing_group"
77
+ BRG_OUTPUT_POWER = "output_power"
78
+ BRG_CALIB_OUTPUT_POWER = "calib_output_power"
79
+ BRG_COMM_OUTPUT_POWER = "comm_output_power"
80
+ BRG_CALIB_INTERVAL = "calib_interval"
81
+ BRG_CALIB_PATTERN = "calib_pattern"
82
+ BRG_RXTX_PERIOD = "rx_tx_period" # rx_tx_period_ms in Brg2GwCfg & Gw2BrgCfg
83
+ BRG_TX_PERIOD = "tx_period" # tx_period_ms in Brg2GwCfg & Gw2BrgCfg
84
+ BRG_DUTY_CYCLE = "duty_cycle"
85
+ BRG_CYCLE = "cycle"
86
+ BRG_PACER_INTERVAL = "pacer_interval"
87
+ BRG_PKT_FILTER = "pkt_filter"
88
+ BRG_ENERGY_PATTERN_2_4 = "energy_pattern_2400"
89
+ BRG_SUB1GHZ_ENERGY_PATTERN = "sub1g_energy_pattern"
90
+ BRG_ADAPTIVE_PACER = "adaptive_pacer"
91
+ BRG_UNIFIED_ECHO_PKT = "unified_echo_pkt"
92
+ BRG_COMM_PATTERN = "comm_pattern"
93
+
94
+ # Common defines
95
+ PACKETS = "packets"
96
+ TIMESTAMP = "timestamp"
97
+ ACTION = "action"
98
+ PAYLOAD = "payload"
99
+ SEQUENCE_ID = "sequenceId"
100
+ MODULE_IF = "module IF"
101
+ HB = "HB"
102
+ DATETIME = "datetime"
103
+ TIME = "time"
104
+ TIMESTAMP_DELTA = "timestamp_delta"
105
+ TAGS_COUNT = "tags_count"
106
+ NEW_TAGS = "new_tags"
107
+ TTFP = "ttfp"
108
+
109
+ # External Sensors
110
+ IS_SENSOR = "isSensor"
111
+ IS_EMBEDDED = "isEmbedded"
112
+ IS_SCRAMBLED = "isScrambled"
113
+ SENSOR_UUID = "sensorServiceId"
114
+ SENSOR_ID = "sensorId"
115
+
116
+ # OTA
117
+ STATUS_CODE_STR = "statusCode"
118
+ IMG_DIR_URL = "imageDirUrl"
119
+ UPGRADE_BLSD = "upgradeBlSd"
120
+ VER_UUID_STR = "versionUUID"
121
+ VER_MAX_LEN = 31
122
+
123
+ # Versions
124
+ VERSIONS = {
125
+ "1.5.0" : {WIFI_VERSION: "3.5.32", BLE_VERSION: "3.7.25"},
126
+ "1.5.2" : {WIFI_VERSION: "3.5.132", BLE_VERSION: "3.7.25"},
127
+ "1.6.1" : {WIFI_VERSION: "3.5.51", BLE_VERSION: "3.8.18"},
128
+ "1.7.0" : {WIFI_VERSION: "3.9.8", BLE_VERSION: "3.9.24"},
129
+ "1.7.1" : {WIFI_VERSION: "3.10.6", BLE_VERSION: "3.10.13"},
130
+ "1.8.0" : {WIFI_VERSION: "3.11.36", BLE_VERSION: "3.11.40"},
131
+ "1.8.2" : {WIFI_VERSION: "3.11.36", BLE_VERSION: "3.11.42"},
132
+ "1.9.0" : {WIFI_VERSION: "3.12.10", BLE_VERSION: "3.12.36"},
133
+ "1.10.1" : {WIFI_VERSION: "3.13.29", BLE_VERSION: "3.13.25"},
134
+ "3.14.0" : {WIFI_VERSION: "3.14.33", BLE_VERSION: "3.14.64"},
135
+ "3.15.0" : {WIFI_VERSION: "3.15.38", BLE_VERSION: "3.15.72"},
136
+ "3.16.3" : {WIFI_VERSION: "3.16.20", BLE_VERSION: "3.16.96"},
137
+ "3.17.0" : {WIFI_VERSION: "3.17.25", BLE_VERSION: "3.17.90"},
138
+ "4.0.0" : {WIFI_VERSION: "4.0.8", BLE_VERSION: "4.0.65"},
139
+ "4.1.0" : {WIFI_VERSION: "4.1.8", BLE_VERSION: "4.1.33"}
140
+ }
141
+
142
+ # Tests defines
143
+ DEFAULT_GW_FIELD_UPDATE_TIMEOUT = 10
144
+ DEFAULT_BRG_FIELD_UPDATE_TIMEOUT = 10
145
+ HB_PERIOD = 30
146
+ VER_UPDATE_TIMEOUT = 300
147
+ GW_LATITUDE_DEFAULT = 33.0222
148
+ GW_LONGITUDE_DEFAULT = -117.0839
149
+ # Set to work with default when versions tests only pass through new api ver
150
+ GW_API_VER_DEFAULT = "201"
151
+ GW_API_VER_OLD = "200"
152
+ BRG_CFG_HAS_LEN = 2
153
+ CLEAR_DATA_PATH_TIMEOUT = 10
154
+ BRG_ADVERTISEMENT_TIMEOUT = 30 + 2 # First 30 for wlt app start & 2 extra for brg to settle to recieve its get module action
155
+ BRG_OTA_TIMEOUT = 100
156
+ ACTION_LONG_TIMEOUT = 120
157
+ ACTION_SI_PKT_TIMEOUT = 10
158
+ ACTION_SHORT_TIMEOUT = 5
159
+
160
+ # Internal python ut defines - used only in ut
161
+ PACER_INTERVAL_THRESHOLD_HIGH = 0.90
162
+ PACER_INTERVAL_THRESHOLD = 0.80
163
+ GLOBAL_PACING_GROUP_THRESHOLD = 0.70
164
+ PACKETS_ECHO_OFF = 16
165
+ TEST_PASSED = 0
166
+ TEST_FAILED = -1
167
+ NO_RESPONSE = "NO_RESPONSE"
168
+ DONE = "DONE"
169
+ TEST_SUCCESS = ":)"
170
+ MGMT_PKT = "mgmt_pkt"
171
+ UNIFIED_PKT = "unified_pkt"
172
+ SIDE_INFO_PKT = "side_info_pkt"
173
+ DECODED_DATA = "decoded_data"
174
+ TAG_ID = "tag_id"
175
+ PACKET_CNTR = "packet_cntr"
176
+ PACKET_TYPE = "packet_type"
177
+ PACKET_DATA = "packet_data"
178
+ PKTS = "pkts"
179
+ MQTT_LOG_PRE_STR = "mqtt_log_"
180
+ GW_DATA = "gw_data"
181
+ GW_ID = "gw_id"
182
+ CER = "cer"
183
+ PKT_CNTR_DIFF = "packet_cntr_diff"
184
+ AVG = "avg_"
185
+ CER_PER_TAG = "cer_per_tag"
186
+ AWS = "aws"
187
+ TEST = "test"
188
+
189
+ # test reasons
190
+ BRG_VER_SUCCESS = "SUCCESS - BRG version matches expected version!"
191
+ WANTED_VER_SAME = "Wanted version is same as original one!"
192
+ WANTED_VER_SAME_MUL = "Wanted versions is same as original ones!"
193
+ VER_UPDATE_PASSED = "Version Update Ran Successfully!"
194
+ VER_UPDATE_FAILED = "The Update Process Has Been Interrupted!"
195
+
196
+ # Non Default defines
197
+ BRG_NON_DEFAULT_DUTY_CYCLE = 15
198
+ BRG_NON_DEFAULT_OP_2_4 = 6
199
+ BRG_NON_DEFAULT_EP_2_4 = 1
200
+ BRG_NON_DEFAULT_OUTPUT_POWER_SUB1G = 26
201
+ BRG_NON_DEFAULT_CYCLE_SUB1G = 40
202
+ BRG_NON_DEFAULT_PWR_MGMT_KEEP_ALIVE_SCAN = 0
203
+ BRG_NON_DEFAULT_TX_REPETITION = 2
204
+ BRG_NON_DEFAULT_PACER_INTERVAL = 20
205
+ BRG_NON_DEFAULT_CALIB_OUTPUT_POWER = 8
206
+ BRG_NON_DEFAULT_PKT_FILTER = 17
207
+ BRG_NON_DEFAULT_CALIB_PATTERN = 2
208
+ BRG_NON_DEFAULT_CALIB_INTERVAL = 15
209
+
210
+ LIS2DW12_NON_DEFAULT_STATE_THRESHOLD = 93
211
+ LIS2DW12_NON_DEFAULT_WAKE_UP_DURATION = 120
212
+ LIS2DW12_NON_DEFAULT_SLEEP_DURATION = 35
213
+
214
+ # ---------------------------------------------------RTSA defines---------------------------------------------------
215
+ # common defines
216
+ TRACE_LOG_FILE_NAME = "TRACELOG"
217
+ TRACE_LOG_FILE_PATH = "C:/SignalVu-PC Files/" + TRACE_LOG_FILE_NAME + ".TOV"
218
+
219
+ # freq defines
220
+ FREQ_2_4_GHZ = {'37':2.402, '38':2.426, '39':2.480}
221
+ FREQ_SUB1G_MHZ = {'865_7':865.700, '915':915.000, '916_3':916.300, '917_5':917.500, '918':918.000, '919_1':919.100}
222
+
223
+ # SignalVu API commands defines
224
+ TRACE_DETECTION = {'average':'AVERage', 'positive':'POSitive', 'negative':'NEGative', 'positive-negative':'POSNegative', 'sample':'SAMPle'}
225
+ MAX_TRACE_POINTS = {'1K':'ONEK', '10K':'TENK', '100K':'HUNDredk', 'never_decimate':'NEVerdecimate' }
226
+
227
+ # default values
228
+ DEFAULT_LENGTH_MS = 30
229
+ DEFAULT_TIME_PER_DIVISION_SEC = 5
230
+ DEFAULT_RX_TX_PERIOD_SEC = 0.015
231
+ BEACON_MIN_LENGTH_SEC = 375e-6
232
+ BEACON_MAX_LENGTH_SEC = 500e-6
233
+ ENERGIZING_TIME_THRESHOLD = 0.3
234
+ BEACON_POWER_THRESHOLD = 0.9
235
+ BEACON_POWER_CURVE_38 = 0.7
236
+ BEACON_POWER_CURVE_39 = 0.625
237
+ DEFAULT_SPAN_MHZ = 5
238
+ RXTX_MAX_CFG = 255
239
+ RXTX_CFG_DEFAULT = 100
240
+
241
+ # test times
242
+ FREQ_BEACONS_ANALYSIS_TIME_DELTA = 10
243
+
244
+ # structured energizing patterns information
245
+ class energizingPattern:
246
+ def __init__(self, ble_calibration_beacons = [], ble_energy = {}, ble_post_energy_beacons = [], sub1G_energy = False, info = ""):
247
+ self.ble_calibration_beacons = ble_calibration_beacons
248
+ self.ble_energy = ble_energy
249
+ self.ble_post_energy_beacons = ble_post_energy_beacons
250
+ self.sub1G_energy = sub1G_energy
251
+ self.info = info
252
+
253
+ EP_INFO = {
254
+ '17' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']]),
255
+ '18' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['39'] : 1.0}),
256
+ '20' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 0.2, FREQ_2_4_GHZ['39'] : 0.8}),
257
+ '24' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 1.0}),
258
+ '25' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 1.0}),
259
+ '26' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={2.454 : 1.0}),
260
+ '27' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39'], FREQ_2_4_GHZ['39']]),
261
+ '29' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 0.3333, 2.454 : 0.3333, FREQ_2_4_GHZ['39'] : 0.3333}),
262
+ '36' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'],FREQ_2_4_GHZ['38'],FREQ_2_4_GHZ['39']], info="idle"),
263
+ '37' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], ble_energy={2.450 : 1.0}, info="euro"),
264
+ '50' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], sub1G_energy=True),
265
+ '51' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['39'] : 1.0}, sub1G_energy=True),
266
+ '52' : energizingPattern(sub1G_energy=True),
267
+ '55' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['37'] : 1.0}, sub1G_energy=True),
268
+ '56' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={FREQ_2_4_GHZ['38'] : 1.0}, sub1G_energy=True),
269
+ '57' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], FREQ_2_4_GHZ['38'], FREQ_2_4_GHZ['39']], ble_energy={2.454 : 1.0}, sub1G_energy=True),
270
+ '61' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], sub1G_energy=True, info="euro"),
271
+ '62' : energizingPattern(ble_calibration_beacons=[FREQ_2_4_GHZ['37'], 2.415, FREQ_2_4_GHZ['39'], 2.441, 2.428, 2.454, 2.467], ble_energy={2.475 : 1.0}, sub1G_energy=True, info="euro"),
272
+ '99' : energizingPattern(ble_calibration_beacons=[i/1000.0 for i in range(2402, 2481, 2)])
273
+ }
274
+
275
+ EP_FREQ_BREAKDOWN_COUNTER_SETUP = {
276
+ 2.402 : {'beacons':0, 'energy_in_ms': 0.0},
277
+ 2.426 : {'beacons':0, 'energy_in_ms': 0.0},
278
+ 2.480 : {'beacons':0, 'energy_in_ms': 0.0},
279
+ 2.403 : {'beacons':0, 'energy_in_ms': 0.0},
280
+ 2.427 : {'beacons':0, 'energy_in_ms': 0.0},
281
+ 2.483 : {'beacons':0, 'energy_in_ms': 0.0},
282
+ 2.454 : {'beacons':0, 'energy_in_ms': 0.0},
283
+ 2.481 : {'beacons':0, 'energy_in_ms': 0.0},
284
+ 2.415 : {'beacons':0, 'energy_in_ms': 0.0},
285
+ 2.441 : {'beacons':0, 'energy_in_ms': 0.0},
286
+ 2.428 : {'beacons':0, 'energy_in_ms': 0.0},
287
+ 2.467 : {'beacons':0, 'energy_in_ms': 0.0},
288
+ 2.475 : {'beacons':0, 'energy_in_ms': 0.0},
289
+ 0.8657 : {'beacons':0, 'energy_in_ms': 0.0},
290
+ 0.915 : {'beacons':0, 'energy_in_ms': 0.0},
291
+ 0.9163 : {'beacons':0, 'energy_in_ms': 0.0},
292
+ 0.9175 : {'beacons':0, 'energy_in_ms': 0.0},
293
+ 0.918 : {'beacons':0, 'energy_in_ms': 0.0},
294
+ 0.9191 : {'beacons':0, 'energy_in_ms': 0.0}
295
+ }
296
+
297
+ # Tag IDs for setup 1 & 4 - private setups in a chamber
298
+ # Added to support tag count in versions_analysis_test
299
+ NO_TAGS_STR = "no_tags"
300
+ SETUP_1_STR = "setup_1"
301
+ SETUP_4_STR = "setup_4"
302
+
303
+ PRIVATE_SETUP_CHOICES = [NO_TAGS_STR,
304
+ SETUP_1_STR,
305
+ SETUP_4_STR]
306
+
307
+ SETUP_1_TAG_IDS = [
308
+ "000d40174823",
309
+ "000d401747df",
310
+ "000d401747f2",
311
+ "000d40174862",
312
+ "000d4017483d",
313
+ "000d40174843",
314
+ "000d401747f1",
315
+ "000d4017482a",
316
+ "000d401747f7",
317
+ "000d40174869",
318
+ "000d40174824",
319
+ "000d40174829",
320
+ "000d40174810",
321
+ "000d4017480b",
322
+ "000d401747d1",
323
+ "000d4017480a",
324
+ "000d401747f8",
325
+ "000d401747cc",
326
+ "000d40174882",
327
+ "000d40174863",
328
+ "000d4017483b",
329
+ "000d401747cb",
330
+ "000d40174842",
331
+ "000d4017487c",
332
+ "000d40174811",
333
+ "000d401747e0",
334
+ "000d40174881"
335
+ ]
336
+ SETUP_4_TAG_IDS = [
337
+ "000d40ce912e",
338
+ "000d40ce9107",
339
+ "000d40ce9233",
340
+ "000d40ce9240",
341
+ "000d40ce9219",
342
+ "000d40ce912d",
343
+ "000d40ce9120",
344
+ "000d40ce9228",
345
+ "000d40ce9146",
346
+ "000d40ce9138",
347
+ "000d40ce9200",
348
+ "000d40ce9229",
349
+ "000d40ce921a",
350
+ "000d40ce9148",
351
+ "000d40ce911f",
352
+ "000d40ce920e",
353
+ "000d40ce9232",
354
+ "000d40ce9201",
355
+ "000d40ce9137"
356
+ ]
357
+
358
+ TAG_IDS = {
359
+ SETUP_1_STR: SETUP_1_TAG_IDS,
360
+ SETUP_4_STR: SETUP_4_TAG_IDS
361
+ }