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.
- {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
- {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
- certificate/cert_common.py +1488 -0
- certificate/cert_config.py +480 -0
- {brg_certificate → certificate}/cert_data_sim.py +134 -46
- {brg_certificate → certificate}/cert_defines.py +129 -128
- {brg_certificate → certificate}/cert_gw_sim.py +183 -53
- {brg_certificate → certificate}/cert_mqtt.py +179 -64
- {brg_certificate → certificate}/cert_prints.py +35 -33
- {brg_certificate → certificate}/cert_protobuf.py +15 -6
- {brg_certificate → certificate}/cert_results.py +240 -64
- certificate/cert_utils.py +634 -0
- certificate/certificate.py +205 -0
- certificate/certificate_cli.py +76 -0
- certificate/certificate_eth_test_list.txt +76 -0
- certificate/certificate_sanity_test_list.txt +66 -0
- certificate/certificate_test_list.txt +76 -0
- {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +3 -2
- {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
- certificate/tests/calibration/output_power_test/output_power_test.json +23 -0
- certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
- {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +2 -1
- {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
- certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +15 -0
- certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
- certificate/tests/cloud_connectivity/acl_test/acl_test.json +15 -0
- certificate/tests/cloud_connectivity/acl_test/acl_test.py +96 -0
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +19 -0
- certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +41 -0
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +19 -0
- certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
- certificate/tests/cloud_connectivity/connection_test/connection_test.json +18 -0
- certificate/tests/cloud_connectivity/connection_test/connection_test.py +67 -0
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +15 -0
- certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +80 -0
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +21 -0
- certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +201 -0
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +17 -0
- certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +104 -0
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +18 -0
- certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +59 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test.json +20 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
- certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
- certificate/tests/cloud_connectivity/stress_test/stress_test.json +17 -0
- certificate/tests/cloud_connectivity/stress_test/stress_test.py +101 -0
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +25 -0
- certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +92 -0
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +20 -0
- certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +169 -0
- {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +2 -1
- certificate/tests/datapath/aging_test/aging_test.py +142 -0
- certificate/tests/datapath/event_ble5_test/event_ble5_test.json +17 -0
- certificate/tests/datapath/event_ble5_test/event_ble5_test.py +89 -0
- certificate/tests/datapath/event_test/event_test.json +17 -0
- certificate/tests/datapath/event_test/event_test.py +80 -0
- {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +4 -3
- {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +19 -13
- certificate/tests/datapath/output_power_test/output_power_test.json +23 -0
- {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
- {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -11
- {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
- {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +3 -2
- {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +20 -0
- certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
- {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +15 -14
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +19 -0
- certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +85 -0
- {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
- {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -1
- {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
- {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -2
- {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
- 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
- certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
- {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +3 -2
- {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +8 -7
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +113 -73
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +8 -7
- {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
- {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +4 -3
- {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +15 -11
- {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +4 -3
- {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +15 -11
- {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +3 -1
- {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
- certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +15 -0
- certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
- certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +15 -0
- certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
- certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +15 -0
- certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
- certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +15 -0
- certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
- certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +16 -0
- certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
- certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +15 -0
- certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
- certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +15 -0
- certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +15 -0
- certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +45 -0
- {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +3 -2
- {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
- {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +2 -1
- {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
- certificate/tests/energy2400/output_power_test/output_power_test.json +23 -0
- {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
- {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +2 -1
- {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +26 -0
- certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +379 -0
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +20 -0
- certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +173 -0
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +24 -0
- certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
- {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -1
- {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
- {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +2 -1
- {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
- {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +2 -1
- {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
- {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +5 -4
- certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +450 -0
- certificate/wlt_types.py +122 -0
- {gw_certificate → common}/api_if/202/status.json +6 -0
- {gw_certificate → common}/api_if/203/status.json +6 -0
- {gw_certificate → common}/api_if/204/status.json +6 -0
- common/api_if/206/data.json +85 -0
- common/api_if/206/status.json +69 -0
- common/api_if/api_validation.py +91 -0
- common/web/templates/generator.html +210 -0
- common/web/templates/index.html +20 -0
- common/web/templates/menu.html +54 -0
- common/web/templates/parser.html +53 -0
- {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
- common/web/web_utils.py +399 -0
- {brg_certificate → common}/wltPb_pb2.py +14 -12
- {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
- gui_certificate/gui_certificate_cli.py +14 -0
- gui_certificate/server.py +1267 -0
- gui_certificate/templates/cert_run.html +1273 -0
- wiliot_certificate-4.5.0.dist-info/METADATA +99 -0
- wiliot_certificate-4.5.0.dist-info/RECORD +168 -0
- {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0.dist-info}/WHEEL +1 -1
- wiliot_certificate-4.5.0.dist-info/entry_points.txt +5 -0
- wiliot_certificate-4.5.0.dist-info/top_level.txt +3 -0
- brg_certificate/ag/energous_v0_defines.py +0 -925
- brg_certificate/ag/energous_v1_defines.py +0 -931
- brg_certificate/ag/energous_v2_defines.py +0 -925
- brg_certificate/ag/energous_v3_defines.py +0 -925
- brg_certificate/ag/energous_v4_defines.py +0 -925
- brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
- brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
- brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
- brg_certificate/ag/minew_lte_v0_defines.py +0 -925
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -142
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -785
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -139
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -394
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -515
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +0 -672
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -550
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -595
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -598
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -938
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1234
- brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
- brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -110
- brg_certificate/brg_certificate.py +0 -225
- brg_certificate/brg_certificate_cli.py +0 -63
- brg_certificate/cert_common.py +0 -923
- brg_certificate/cert_config.py +0 -402
- brg_certificate/cert_utils.py +0 -362
- brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
- brg_certificate/certificate_bcc_test_list.txt +0 -48
- brg_certificate/certificate_sanity_test_list.txt +0 -43
- brg_certificate/certificate_test_list.txt +0 -53
- brg_certificate/config/eclipse.json +0 -10
- brg_certificate/config/hivemq.json +0 -10
- brg_certificate/config/mosquitto.json +0 -10
- brg_certificate/config/mosquitto.md +0 -95
- brg_certificate/config/wiliot-dev.json +0 -10
- brg_certificate/restore_brg.py +0 -61
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
- brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +0 -321
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
- brg_certificate/wltPb_pb2.pyi +0 -234
- brg_certificate/wlt_types.py +0 -113
- gw_certificate/ag/ut_defines.py +0 -364
- gw_certificate/ag/wlt_types.py +0 -85
- gw_certificate/ag/wlt_types_ag.py +0 -5310
- gw_certificate/ag/wlt_types_data.py +0 -64
- gw_certificate/api/extended_api.py +0 -23
- gw_certificate/api_if/200/data.json +0 -106
- gw_certificate/api_if/200/status.json +0 -47
- gw_certificate/api_if/201/data.json +0 -98
- gw_certificate/api_if/201/status.json +0 -53
- gw_certificate/api_if/205/logs.json +0 -12
- gw_certificate/api_if/api_validation.py +0 -38
- gw_certificate/api_if/gw_capabilities.py +0 -54
- gw_certificate/cert_results.py +0 -145
- gw_certificate/common/analysis_data_bricks.py +0 -60
- gw_certificate/common/debug.py +0 -42
- gw_certificate/common/serialization_formatter.py +0 -93
- gw_certificate/common/utils.py +0 -8
- gw_certificate/common/utils_defines.py +0 -15
- gw_certificate/common/wltPb_pb2.py +0 -84
- gw_certificate/gw_certificate.py +0 -154
- gw_certificate/gw_certificate_cli.py +0 -87
- gw_certificate/interface/4.4.93_app.zip +0 -0
- gw_certificate/interface/4.4.93_sd_bl_app.zip +0 -0
- gw_certificate/interface/ble_simulator.py +0 -61
- gw_certificate/interface/ble_sniffer.py +0 -189
- gw_certificate/interface/flash_fw.py +0 -90
- gw_certificate/interface/if_defines.py +0 -36
- gw_certificate/interface/mqtt.py +0 -563
- gw_certificate/interface/nrfutil-linux +0 -0
- gw_certificate/interface/nrfutil-mac +0 -0
- gw_certificate/interface/nrfutil.exe +0 -0
- gw_certificate/interface/pkt_generator.py +0 -594
- gw_certificate/interface/uart_if.py +0 -236
- gw_certificate/interface/uart_ports.py +0 -20
- gw_certificate/templates/results.html +0 -241
- gw_certificate/templates/stage.html +0 -22
- gw_certificate/templates/table.html +0 -6
- gw_certificate/templates/test.html +0 -38
- gw_certificate/tests/__init__.py +0 -10
- gw_certificate/tests/actions.py +0 -289
- gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
- gw_certificate/tests/connection.py +0 -188
- gw_certificate/tests/downlink.py +0 -172
- gw_certificate/tests/generic.py +0 -238
- gw_certificate/tests/registration.py +0 -340
- gw_certificate/tests/static/__init__.py +0 -0
- gw_certificate/tests/static/connection_defines.py +0 -9
- gw_certificate/tests/static/downlink_defines.py +0 -9
- gw_certificate/tests/static/generated_packet_table.py +0 -195
- gw_certificate/tests/static/packet_table.csv +0 -10067
- gw_certificate/tests/static/references.py +0 -5
- gw_certificate/tests/static/uplink_defines.py +0 -14
- gw_certificate/tests/throughput.py +0 -240
- gw_certificate/tests/uplink.py +0 -853
- wiliot_certificate-4.4.3.dist-info/METADATA +0 -211
- wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
- wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
- wiliot_certificate-4.4.3.dist-info/top_level.txt +0 -3
- {brg_certificate → certificate}/__init__.py +0 -0
- {gw_certificate → common}/api_if/202/data.json +0 -0
- {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
- {gw_certificate → common}/api_if/203/data.json +0 -0
- {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
- {gw_certificate → common}/api_if/204/data.json +0 -0
- {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
- {gw_certificate → common}/api_if/205/data.json +0 -0
- {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
- {gw_certificate → common}/api_if/205/status.json +0 -0
- {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
- {gw_certificate → common/api_if}/__init__.py +0 -0
- {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
- {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
from importlib import reload
|
|
3
|
-
import os
|
|
4
|
-
import inspect
|
|
5
|
-
from appdirs import user_data_dir
|
|
6
|
-
|
|
7
|
-
from gw_certificate.common.debug import debug_print
|
|
8
|
-
from gw_certificate.common.utils import current_timestamp
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def db_utils():
|
|
12
|
-
"""
|
|
13
|
-
Use databricks dbutils from an external package
|
|
14
|
-
for example: to use dbutils.fs.head() - use db_utils().fs.head()
|
|
15
|
-
"""
|
|
16
|
-
for frame in inspect.getouterframes(inspect.currentframe()):
|
|
17
|
-
global_names = set(frame.frame.f_globals)
|
|
18
|
-
# Use multiple functions to reduce risk of mismatch
|
|
19
|
-
if all(v in global_names for v in ["dbutils"]):
|
|
20
|
-
return frame.frame.f_globals["dbutils"]()
|
|
21
|
-
raise EnvironmentError("Unable to detect dbutils function")
|
|
22
|
-
|
|
23
|
-
def initialize_logger(working_directory=None):
|
|
24
|
-
"""
|
|
25
|
-
initializes the logger to print to log and to logfile, which by default is named by the current timestamp (ms)
|
|
26
|
-
when calling the function.
|
|
27
|
-
:param working_directory: working directory to save logfile (in case running locally)
|
|
28
|
-
:type working_directory: str
|
|
29
|
-
:return: logger fileHandler filename
|
|
30
|
-
"""
|
|
31
|
-
logging.shutdown()
|
|
32
|
-
reload(logging)
|
|
33
|
-
logger = logging.getLogger()
|
|
34
|
-
for handler in logger.handlers:
|
|
35
|
-
try:
|
|
36
|
-
# extract current filename from log
|
|
37
|
-
filename = handler.baseFilename.split('\\')[-1].split('.')[0]
|
|
38
|
-
debug_print(f'Logger already initialized! passing logfile {filename}')
|
|
39
|
-
return filename
|
|
40
|
-
except Exception:
|
|
41
|
-
pass
|
|
42
|
-
logger_filename = int(current_timestamp())
|
|
43
|
-
if working_directory is None:
|
|
44
|
-
working_directory = os.path.join(user_data_dir(), 'wiliot', 'deployment_tools')
|
|
45
|
-
if not os.path.exists(working_directory):
|
|
46
|
-
os.makedirs(working_directory)
|
|
47
|
-
logging.basicConfig(level=logging.DEBUG,
|
|
48
|
-
format='%(asctime)s | %(levelname)s | %(message)s',
|
|
49
|
-
handlers=[
|
|
50
|
-
logging.FileHandler(f'{working_directory}/{logger_filename}.log', 'a'),
|
|
51
|
-
# logging.handlers.RotatingFileHandler
|
|
52
|
-
logging.StreamHandler()
|
|
53
|
-
])
|
|
54
|
-
# filter stream to show info and up
|
|
55
|
-
logging.getLogger().handlers[0].setLevel(logging.DEBUG)
|
|
56
|
-
logging.getLogger().handlers[1].setLevel(logging.INFO)
|
|
57
|
-
debug_print(f'logger initialized at {logger_filename}', center=True)
|
|
58
|
-
debug_print(f'logfile located at {working_directory}/{logger_filename}.log')
|
|
59
|
-
logging.getLogger().setLevel(logging.DEBUG)
|
|
60
|
-
return logger_filename
|
gw_certificate/common/debug.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
import logging
|
|
3
|
-
import colorama
|
|
4
|
-
import tabulate
|
|
5
|
-
import pprint
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Debugging & Printing
|
|
9
|
-
def debug_print(txt, pretty=False, center=False, tab=False, color=None, enable=True):
|
|
10
|
-
"""
|
|
11
|
-
:type txt: string
|
|
12
|
-
:param txt: text to print
|
|
13
|
-
:type pretty: bool
|
|
14
|
-
:param pretty: pretty print
|
|
15
|
-
:type center: bool
|
|
16
|
-
:param center: print with stars (*)
|
|
17
|
-
:type tab: bool
|
|
18
|
-
:param tab: tabulate input
|
|
19
|
-
:type color: str
|
|
20
|
-
:param color: colorama color code
|
|
21
|
-
"""
|
|
22
|
-
if enable:
|
|
23
|
-
if tab:
|
|
24
|
-
txt = '\n' + tabulate.tabulate(txt, tablefmt='rst')
|
|
25
|
-
if type(txt) != str:
|
|
26
|
-
try:
|
|
27
|
-
txt = str(txt)
|
|
28
|
-
except TypeError:
|
|
29
|
-
debug_print('Could not Print!')
|
|
30
|
-
if center:
|
|
31
|
-
txt = txt.center(94, '-')
|
|
32
|
-
if color is not None:
|
|
33
|
-
txt = eval(f'colorama.Fore.{color}') + txt + colorama.Style.RESET_ALL
|
|
34
|
-
if pretty:
|
|
35
|
-
txt = pprint.pformat(txt, sort_dicts=False)
|
|
36
|
-
|
|
37
|
-
# Print Text
|
|
38
|
-
if logging.getLogger().hasHandlers():
|
|
39
|
-
log = logging.getLogger()
|
|
40
|
-
log.info(txt)
|
|
41
|
-
else:
|
|
42
|
-
print(datetime.datetime.now().strftime("[%d/%m/%Y, %H:%M:%S]: ") + txt)
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from enum import Enum
|
|
3
|
-
from google.protobuf.json_format import MessageToDict, Parse, ParseError, ParseDict
|
|
4
|
-
import base64
|
|
5
|
-
|
|
6
|
-
from gw_certificate.interface.mqtt import Serialization
|
|
7
|
-
from gw_certificate.interface.if_defines import LOCATION
|
|
8
|
-
from gw_certificate.common import wltPb_pb2
|
|
9
|
-
from gw_certificate.ag.ut_defines import GW_CONF, ADDITIONAL, VERSION, BLE_VERSION, WIFI_VERSION, LAT, LNG
|
|
10
|
-
from gw_certificate.common.debug import debug_print
|
|
11
|
-
|
|
12
|
-
# helper defines
|
|
13
|
-
ACL_MODE = "mode"
|
|
14
|
-
ACL_BRIDGE_IDS = "bridgeIds"
|
|
15
|
-
ACL_DENY = "deny"
|
|
16
|
-
ACL_ALLOW = "allow"
|
|
17
|
-
ACL_DENY_VALUE = 0
|
|
18
|
-
ACL_ALLOW_VALUE = 1
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class Configurable(Enum):
|
|
22
|
-
ACL = "accessControlList"
|
|
23
|
-
|
|
24
|
-
class SerializationFormatter():
|
|
25
|
-
def __init__(self, serialization:Serialization):
|
|
26
|
-
self.serialization = serialization
|
|
27
|
-
|
|
28
|
-
def is_pb(self):
|
|
29
|
-
return self.serialization == Serialization.PB
|
|
30
|
-
|
|
31
|
-
def cfg_param_set(self, received_status_msg: dict, param: Configurable, value):
|
|
32
|
-
'''
|
|
33
|
-
Since configuration paramters change between partners, we must use a received_status_msg to keep every parameter as is.
|
|
34
|
-
In the future we may use a validation schema file or default.
|
|
35
|
-
'''
|
|
36
|
-
|
|
37
|
-
def gatewaystatus_to_downlink(gw_status_dict: dict, param_to_set: Configurable, value_to_set) -> wltPb_pb2.DownlinkMessage:
|
|
38
|
-
gw_status = ParseDict(gw_status_dict, wltPb_pb2.GatewayStatus())
|
|
39
|
-
gw_cfg = wltPb_pb2.GatewayConfig()
|
|
40
|
-
|
|
41
|
-
if gw_status.HasField(VERSION):
|
|
42
|
-
gw_cfg.version = gw_status.version
|
|
43
|
-
if gw_status.HasField('bleSwVersion'):
|
|
44
|
-
gw_cfg.bleSwVersion = gw_status.bleSwVersion
|
|
45
|
-
if gw_status.HasField('interfaceSwVersion'):
|
|
46
|
-
gw_cfg.interfaceSwVersion = gw_status.interfaceSwVersion
|
|
47
|
-
if gw_status.HasField(LOCATION):
|
|
48
|
-
gw_cfg.location.lat = gw_status.location.lat
|
|
49
|
-
gw_cfg.location.lng = gw_status.location.lng
|
|
50
|
-
|
|
51
|
-
for key, val in gw_status.config.items():
|
|
52
|
-
if key != param_to_set:
|
|
53
|
-
gw_cfg.config[key].CopyFrom(val)
|
|
54
|
-
else:
|
|
55
|
-
pb_gcvalue = wltPb_pb2.GatewayConfigValue()
|
|
56
|
-
if isinstance(value_to_set, int):
|
|
57
|
-
pb_gcvalue.integerValue = value_to_set
|
|
58
|
-
elif isinstance(value_to_set, float):
|
|
59
|
-
pb_gcvalue.numberValue = value_to_set
|
|
60
|
-
elif isinstance(value_to_set, str):
|
|
61
|
-
pb_gcvalue.stringValue = value_to_set
|
|
62
|
-
elif isinstance(value_to_set, bool):
|
|
63
|
-
pb_gcvalue.boolValue = value_to_set
|
|
64
|
-
elif isinstance(value_to_set, dict) and key == Configurable.ACL.value:
|
|
65
|
-
pb_gcvalue.aclValue.mode_allow = ACL_ALLOW_VALUE if value_to_set.get(ACL_MODE) == ACL_ALLOW else ACL_DENY_VALUE
|
|
66
|
-
ids_bytes = [bytes.fromhex(id) for id in value_to_set.get(ACL_BRIDGE_IDS)]
|
|
67
|
-
pb_gcvalue.aclValue.ids.extend(ids_bytes)
|
|
68
|
-
else:
|
|
69
|
-
debug_print(f"Unsupported value type for key '{key}': {type(val)}, protobuf cfg may be invalid")
|
|
70
|
-
|
|
71
|
-
gw_cfg.config[key].CopyFrom(pb_gcvalue)
|
|
72
|
-
|
|
73
|
-
return wltPb_pb2.DownlinkMessage(gatewayConfig=gw_cfg)
|
|
74
|
-
|
|
75
|
-
cfg_msg = received_status_msg.copy()
|
|
76
|
-
if self.serialization == Serialization.PB:
|
|
77
|
-
# In protobuf, we must convert the GatewayStatus to a DownlinkMessage with oneof=GatewayConfig
|
|
78
|
-
cfg_msg = gatewaystatus_to_downlink(cfg_msg, param, value)
|
|
79
|
-
return cfg_msg
|
|
80
|
-
else:
|
|
81
|
-
# JSON
|
|
82
|
-
cfg_msg.setdefault(GW_CONF, {}).setdefault(ADDITIONAL, {})[param] = value
|
|
83
|
-
debug_print(cfg_msg)
|
|
84
|
-
return cfg_msg
|
|
85
|
-
|
|
86
|
-
def pb_status_acl_bytes_to_hex_string(self, msg: dict) -> dict:
|
|
87
|
-
brg_ids_bytes = msg.get('config', {}).get('accessControlList', {}).get('aclValue', {}).get('ids', {})
|
|
88
|
-
brg_ids_ascii = []
|
|
89
|
-
for brg_id in brg_ids_bytes:
|
|
90
|
-
brg_ids_ascii.append(base64.b64decode(brg_id).hex().upper())
|
|
91
|
-
if len(brg_ids_ascii) > 0:
|
|
92
|
-
msg['config']['accessControlList']['aclValue']['ids'] = brg_ids_ascii
|
|
93
|
-
return msg
|
gw_certificate/common/utils.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Brownout / OTA Defines
|
|
2
|
-
SEP = "#" * 50
|
|
3
|
-
BO_DICT = {
|
|
4
|
-
'datapath': {'config': {'pktFilter': 'Disable forwarding'}},
|
|
5
|
-
'energy2400': {'config': {'energyPattern2400': 'No Energizing'}},
|
|
6
|
-
'energySub1g': {'config': {'sub1gEnergyPattern': 'No Energizing'}},
|
|
7
|
-
'calibration': {'config': {'calibPattern': 'Disable calibration beaconing'}}
|
|
8
|
-
}
|
|
9
|
-
BROADCAST_DST_MAC = 'FFFFFFFFFFFF'
|
|
10
|
-
|
|
11
|
-
colors = ['red', 'blue', 'yellow', 'cyan', 'green', 'brown', 'orange', 'pink', 'purple', 'black']
|
|
12
|
-
|
|
13
|
-
# Test Tool
|
|
14
|
-
GW_DATA_SRC = 'gwDataSrc'
|
|
15
|
-
GW_DATA_MODE = 'gwDataMode'
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: wltPb.proto
|
|
5
|
-
# Protobuf Python Version: 6.30.2
|
|
6
|
-
"""Generated protocol buffer code."""
|
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
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
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wltPb_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
DESCRIPTOR._loaded_options = None
|
|
34
|
-
_globals['_GATEWAYSTATUS_CONFIGENTRY']._loaded_options = None
|
|
35
|
-
_globals['_GATEWAYSTATUS_CONFIGENTRY']._serialized_options = b'8\001'
|
|
36
|
-
_globals['_GATEWAYINFO_ENTRIESENTRY']._loaded_options = None
|
|
37
|
-
_globals['_GATEWAYINFO_ENTRIESENTRY']._serialized_options = b'8\001'
|
|
38
|
-
_globals['_GATEWAYCONFIG_CONFIGENTRY']._loaded_options = None
|
|
39
|
-
_globals['_GATEWAYCONFIG_CONFIGENTRY']._serialized_options = b'8\001'
|
|
40
|
-
_globals['_CUSTOMMESSAGE_ENTRIESENTRY']._loaded_options = None
|
|
41
|
-
_globals['_CUSTOMMESSAGE_ENTRIESENTRY']._serialized_options = b'8\001'
|
|
42
|
-
_globals['_LOCATION']._serialized_start=22
|
|
43
|
-
_globals['_LOCATION']._serialized_end=58
|
|
44
|
-
_globals['_VALUE']._serialized_start=60
|
|
45
|
-
_globals['_VALUE']._serialized_end=166
|
|
46
|
-
_globals['_GATEWAYDATA']._serialized_start=169
|
|
47
|
-
_globals['_GATEWAYDATA']._serialized_end=434
|
|
48
|
-
_globals['_GATEWAYDATA_PACKET']._serialized_start=306
|
|
49
|
-
_globals['_GATEWAYDATA_PACKET']._serialized_end=421
|
|
50
|
-
_globals['_UPLINKMESSAGE']._serialized_start=437
|
|
51
|
-
_globals['_UPLINKMESSAGE']._serialized_end=638
|
|
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
|
|
84
|
-
# @@protoc_insertion_point(module_scope)
|
gw_certificate/gw_certificate.py
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# External Imports
|
|
2
|
-
import time
|
|
3
|
-
import datetime
|
|
4
|
-
import os
|
|
5
|
-
import webbrowser
|
|
6
|
-
from jinja2 import Environment, FileSystemLoader
|
|
7
|
-
import pkg_resources
|
|
8
|
-
import time
|
|
9
|
-
import importlib.metadata
|
|
10
|
-
from wiliot_core.utils.utils import WiliotDir
|
|
11
|
-
|
|
12
|
-
# Internal Imports
|
|
13
|
-
from gw_certificate.common.analysis_data_bricks import initialize_logger
|
|
14
|
-
from gw_certificate.common.debug import debug_print
|
|
15
|
-
from gw_certificate.interface.ble_sniffer import BLESniffer
|
|
16
|
-
from gw_certificate.interface.uart_if import UARTError, UARTInterface
|
|
17
|
-
from gw_certificate.interface.ble_simulator import BLESimulator
|
|
18
|
-
from gw_certificate.interface.mqtt import MqttClient
|
|
19
|
-
from gw_certificate.tests import *
|
|
20
|
-
from gw_certificate.interface.uart_ports import get_uart_ports
|
|
21
|
-
from gw_certificate.api_if.gw_capabilities import GWCapabilities, ConfigurationData
|
|
22
|
-
from gw_certificate.tests import TESTS_NO_UART
|
|
23
|
-
|
|
24
|
-
import gw_certificate.cert_results as cert_results
|
|
25
|
-
|
|
26
|
-
GW_CERT_VERSION = importlib.metadata.version("wiliot-certificate")
|
|
27
|
-
|
|
28
|
-
class GWCertificateError(Exception):
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class TemplateEngine:
|
|
33
|
-
def __init__(self):
|
|
34
|
-
self.template_dir = pkg_resources.resource_filename(__name__, 'templates')
|
|
35
|
-
self.env = Environment(loader=FileSystemLoader(self.template_dir))
|
|
36
|
-
|
|
37
|
-
def get_template(self, template_name):
|
|
38
|
-
return self.env.get_template(template_name)
|
|
39
|
-
|
|
40
|
-
def render_template(self, template_name, **kwargs):
|
|
41
|
-
template = self.get_template(template_name)
|
|
42
|
-
return template.render(**kwargs)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class GWCertificate:
|
|
46
|
-
def __init__(self, gw_id, owner_id, actions:list, tests:list, topic_suffix='', update_fw=False, stress_pps=None,
|
|
47
|
-
aggregation_time=0, env='prod'):
|
|
48
|
-
# Runtime
|
|
49
|
-
self.env_dirs = WiliotDir()
|
|
50
|
-
self.current_datetime = datetime.datetime.now()
|
|
51
|
-
self.duration = None
|
|
52
|
-
self.certificate_dir = os.path.join(self.env_dirs.get_wiliot_root_app_dir(), 'gw-certificate', self.current_datetime.strftime('%Y%m%d_%H%M%S'))
|
|
53
|
-
self.env_dirs.create_dir(self.certificate_dir)
|
|
54
|
-
self.logger_filename = initialize_logger(self.certificate_dir)
|
|
55
|
-
self.logger_filepath = os.path.join(self.certificate_dir, f'{self.logger_filename}.log')
|
|
56
|
-
self.mqtt_logger_filepath = os.path.join(self.certificate_dir, f'{self.logger_filename}_mqtt.log')
|
|
57
|
-
self.sniffer_logger_filepath = os.path.join(self.certificate_dir, f'{self.logger_filename}_sniffer.log')
|
|
58
|
-
self.result_html_path = os.path.join(self.certificate_dir, f"results_{self.current_datetime.strftime('%Y%m%d_%H%M%S')}.html")
|
|
59
|
-
self.result_pdf_path = os.path.join(self.certificate_dir, f"results_{self.current_datetime.strftime('%Y%m%d_%H%M%S')}.pdf")
|
|
60
|
-
self.template_engine = TemplateEngine()
|
|
61
|
-
self.env = env
|
|
62
|
-
self.error = ""
|
|
63
|
-
|
|
64
|
-
# Version
|
|
65
|
-
self.gw_cert_version = GW_CERT_VERSION
|
|
66
|
-
|
|
67
|
-
# GW & specific tests related
|
|
68
|
-
self.gw_id = gw_id
|
|
69
|
-
self.owner_id = owner_id
|
|
70
|
-
self.topic_suffix = topic_suffix
|
|
71
|
-
self.mqttc = MqttClient(gw_id, owner_id, self.mqtt_logger_filepath, topic_suffix=topic_suffix, broker='eclipse')
|
|
72
|
-
self.gw_capabilities = GWCapabilities()
|
|
73
|
-
self.stress_pps = stress_pps
|
|
74
|
-
self.aggregation_time = aggregation_time
|
|
75
|
-
self.actions = actions
|
|
76
|
-
self.cfg_data = ConfigurationData()
|
|
77
|
-
|
|
78
|
-
# UART-related. Require only when running tests that need it
|
|
79
|
-
self.use_uart = not all(test in TESTS_NO_UART for test in tests)
|
|
80
|
-
if self.use_uart:
|
|
81
|
-
self.uart = None
|
|
82
|
-
self.uart_comports = get_uart_ports()
|
|
83
|
-
debug_print(f'UART Ports:{self.uart_comports}')
|
|
84
|
-
if len(self.uart_comports) < 1:
|
|
85
|
-
self.error = "A Wiliot certification kit must be connected to USB!"
|
|
86
|
-
raise GWCertificateError(self.error)
|
|
87
|
-
|
|
88
|
-
for port in self.uart_comports:
|
|
89
|
-
try:
|
|
90
|
-
self.uart = UARTInterface(port, update_fw=update_fw)
|
|
91
|
-
break
|
|
92
|
-
except UARTError as e:
|
|
93
|
-
debug_print(f'Port: {port} - {e}')
|
|
94
|
-
if type(self.uart) is not UARTInterface:
|
|
95
|
-
self.error = "Cannot initialize any port!"
|
|
96
|
-
raise GWCertificateError(self.error)
|
|
97
|
-
self.ble_sim = BLESimulator(self.uart)
|
|
98
|
-
self.sniffer = BLESniffer(self.uart, logger_filepath=self.sniffer_logger_filepath)
|
|
99
|
-
|
|
100
|
-
# Tests
|
|
101
|
-
self.tests = [t(**self.__dict__) for t in tests]
|
|
102
|
-
debug_print(f'Running Tests: {self.tests}')
|
|
103
|
-
|
|
104
|
-
def runtime(self):
|
|
105
|
-
datetime.timedelta
|
|
106
|
-
return datetime.datetime.now() - self.current_datetime
|
|
107
|
-
|
|
108
|
-
def run_tests(self):
|
|
109
|
-
debug_print("Sleeping 20 seconds after mqtt connect")
|
|
110
|
-
time.sleep(20)
|
|
111
|
-
|
|
112
|
-
# capabilities_received = ConnectionTest in self.tests
|
|
113
|
-
for test in self.tests:
|
|
114
|
-
# if capabilities_received:
|
|
115
|
-
# if (type(test) == DownlinkTest and self.gw_capabilities.downlinkSupported == False):
|
|
116
|
-
# debug_print(f'# Skipping {type(test)} since it is not a supported capability. #')
|
|
117
|
-
# continue
|
|
118
|
-
test.prepare_test()
|
|
119
|
-
test.run()
|
|
120
|
-
test.end_test()
|
|
121
|
-
|
|
122
|
-
def create_results_html(self):
|
|
123
|
-
with open(self.logger_filepath, 'r') as f:
|
|
124
|
-
log = f.read().split('\n')
|
|
125
|
-
with open(self.mqtt_logger_filepath, 'r') as f:
|
|
126
|
-
mqtt_log = f.read().split('\n')
|
|
127
|
-
if self.use_uart:
|
|
128
|
-
with open(self.sniffer_logger_filepath, 'r') as f:
|
|
129
|
-
sniffer_log = f.read().split('\n')
|
|
130
|
-
else:
|
|
131
|
-
sniffer_log = []
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
html = self.template_engine.render_template('results.html', tests=self.tests,
|
|
135
|
-
log = log,
|
|
136
|
-
mqtt_log = mqtt_log,
|
|
137
|
-
sniffer_log = sniffer_log,
|
|
138
|
-
gw_id = self.gw_id,
|
|
139
|
-
version = self.gw_cert_version,
|
|
140
|
-
datetime = self.current_datetime.strftime('%Y%m%d_%H%M%S'))
|
|
141
|
-
with open(self.result_html_path, 'w', encoding="utf-8") as f:
|
|
142
|
-
f.write(html)
|
|
143
|
-
cert_results.generate_pdf_results_file(self)
|
|
144
|
-
debug_print("Test Finished. Results HTML Saved: " + self.result_html_path)
|
|
145
|
-
webbrowser.open('file://' + os.path.realpath(self.result_html_path))
|
|
146
|
-
webbrowser.open('file://' + os.path.realpath(self.result_pdf_path))
|
|
147
|
-
|
|
148
|
-
if __name__ == "__main__":
|
|
149
|
-
from api_secrets import *
|
|
150
|
-
gw_id = 'gw_id'
|
|
151
|
-
owner_id = 'owner_id'
|
|
152
|
-
gwc = GWCertificate(gw_id=gw_id,owner_id=owner_id, tests=[ConnectionTest, DownlinkTest, UplinkTest, StressTest])
|
|
153
|
-
gwc.run_tests()
|
|
154
|
-
gwc.create_results_html()
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import time
|
|
3
|
-
from argparse import ArgumentParser, SUPPRESS
|
|
4
|
-
|
|
5
|
-
from gw_certificate.common.debug import debug_print
|
|
6
|
-
from gw_certificate.gw_certificate import GWCertificate, GW_CERT_VERSION
|
|
7
|
-
from gw_certificate.tests import TESTS
|
|
8
|
-
from gw_certificate.tests.actions import ACTIONS_STAGES
|
|
9
|
-
from gw_certificate.tests.throughput import STRESS_DEFAULT_PPS, StressTest
|
|
10
|
-
from gw_certificate.tests.registration import REG_CERT_OWNER_ID, RegistrationTest
|
|
11
|
-
from gw_certificate.tests.uplink import UplinkTest
|
|
12
|
-
|
|
13
|
-
def filter_by_args(args_list, list_to_filter):
|
|
14
|
-
chosen_list = []
|
|
15
|
-
for entry in list_to_filter:
|
|
16
|
-
for arg in args_list:
|
|
17
|
-
if arg in entry.__name__.lower() and entry not in chosen_list:
|
|
18
|
-
chosen_list.append(entry)
|
|
19
|
-
return chosen_list
|
|
20
|
-
|
|
21
|
-
def filter_tests(tests_names):
|
|
22
|
-
return filter_by_args(tests_names, TESTS)
|
|
23
|
-
|
|
24
|
-
def filter_actions(actions_names):
|
|
25
|
-
return filter_by_args(actions_names, ACTIONS_STAGES)
|
|
26
|
-
|
|
27
|
-
def main():
|
|
28
|
-
usage = (
|
|
29
|
-
"usage: wlt-gw-certificate [-h] -owner OWNER -gw GW\n"
|
|
30
|
-
f" [-tests {{connection, uplink, downlink, actions, stress}}] [-noupdate] [-pps {STRESS_DEFAULT_PPS}]\n"
|
|
31
|
-
f" [-actions {{info, reboot, bridgeota}}] [-agg AGG] [-env {{prod, test, dev}}]"
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
parser = ArgumentParser(prog='wlt-gw-certificate',
|
|
35
|
-
description=f'Gateway Certificate v{GW_CERT_VERSION} - CLI Tool to test Wiliot GWs', usage=usage)
|
|
36
|
-
|
|
37
|
-
required = parser.add_argument_group('required arguments')
|
|
38
|
-
required.add_argument('-gw', type=str, help="Gateway ID", required=True)
|
|
39
|
-
optional = parser.add_argument_group('optional arguments')
|
|
40
|
-
optional.add_argument('-owner', type=str, help="Owner ID", required=False, default=REG_CERT_OWNER_ID)
|
|
41
|
-
optional.add_argument('-suffix', type=str, help="Topic suffix", default='', required=False)
|
|
42
|
-
optional.add_argument('-tests', type=str, choices=['registration', 'connection', 'uplink', 'downlink', 'actions', 'stress'],
|
|
43
|
-
help="Tests to run. Registration omitted by default.", required=False, nargs='+',
|
|
44
|
-
default=['connection', 'uplink', 'downlink', 'actions', 'stress'])
|
|
45
|
-
optional.add_argument('-actions', type=str, choices=['info', 'reboot', 'bridgeota'],
|
|
46
|
-
help="Action stages to run under ActionsTest", required=False, nargs='+', default=['info', 'reboot', 'bridgeota'])
|
|
47
|
-
optional.add_argument('-pps', type=int, help='Single packets-per-second rate to simulate in the stress test',
|
|
48
|
-
choices=STRESS_DEFAULT_PPS, default=None, required=False)
|
|
49
|
-
optional.add_argument('-agg', type=int, help='Aggregation time [seconds] the Uplink stages wait before processing results',
|
|
50
|
-
default=0, required=False)
|
|
51
|
-
optional.add_argument('-env', type=str, help='Environment for the RegistrationTest & BridgeOTAStage',
|
|
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)
|
|
55
|
-
args = parser.parse_args()
|
|
56
|
-
|
|
57
|
-
topic_suffix = '' if args.suffix == '' else '-'+args.suffix
|
|
58
|
-
tests = filter_tests(args.tests)
|
|
59
|
-
actions = filter_actions(args.actions)
|
|
60
|
-
|
|
61
|
-
# Validate args combination before running
|
|
62
|
-
if args.pps != None and StressTest not in tests:
|
|
63
|
-
parser.error("Packets per second (-pps) flag can only be used when 'stress' is included in test list (e.g. -tests stress)")
|
|
64
|
-
if args.agg != 0 and not any(t in tests for t in (UplinkTest, StressTest)):
|
|
65
|
-
parser.error("Aggregation time (-agg) flag can only be used when 'uplink' or 'stress' are included in test list (e.g. -tests uplink)")
|
|
66
|
-
|
|
67
|
-
if RegistrationTest in tests:
|
|
68
|
-
if not all(test == RegistrationTest for test in tests):
|
|
69
|
-
parser.error("The registration test must be run on it's own, without any others tests.")
|
|
70
|
-
if args.owner != REG_CERT_OWNER_ID:
|
|
71
|
-
parser.error(f"The registration test must be run without the -owner flag (defaults to {REG_CERT_OWNER_ID}).")
|
|
72
|
-
elif args.owner == REG_CERT_OWNER_ID:
|
|
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.")
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
gwc = GWCertificate(gw_id=args.gw, owner_id=args.owner, topic_suffix=topic_suffix, tests=tests, update_fw=(not args.noupdate),
|
|
77
|
-
stress_pps=args.pps, aggregation_time=args.agg, env=args.env, actions=actions)
|
|
78
|
-
debug_print(f"All arguments: {vars(args)}")
|
|
79
|
-
gwc.run_tests()
|
|
80
|
-
gwc.create_results_html()
|
|
81
|
-
|
|
82
|
-
def main_cli():
|
|
83
|
-
main()
|
|
84
|
-
|
|
85
|
-
if __name__ == '__main__':
|
|
86
|
-
main()
|
|
87
|
-
|
|
Binary file
|
|
Binary file
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
from gw_certificate.interface.uart_if import UARTInterface
|
|
5
|
-
from gw_certificate.common.debug import debug_print
|
|
6
|
-
from gw_certificate.interface.if_defines import *
|
|
7
|
-
|
|
8
|
-
class BLESimulator():
|
|
9
|
-
def __init__(self, uart:UARTInterface):
|
|
10
|
-
self.uart = uart
|
|
11
|
-
self.sim_mode = False
|
|
12
|
-
|
|
13
|
-
def set_sim_mode(self, sim_mode):
|
|
14
|
-
self.uart.flush()
|
|
15
|
-
mode_dict = {True: 1, False: 0}
|
|
16
|
-
self.sim_mode = sim_mode
|
|
17
|
-
self.uart.reset_gw()
|
|
18
|
-
self.uart.write_ble_command(f"!ble_sim_init {mode_dict[sim_mode]}")
|
|
19
|
-
if not sim_mode:
|
|
20
|
-
self.uart.reset_gw()
|
|
21
|
-
time.sleep(3)
|
|
22
|
-
|
|
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):
|
|
25
|
-
assert self.sim_mode is True, 'BLE Sim not initialized!'
|
|
26
|
-
if len(raw_packet) == 62:
|
|
27
|
-
# Add ADVA
|
|
28
|
-
raw_packet = DEFAULT_ADVA + raw_packet
|
|
29
|
-
if len(raw_packet) != 74:
|
|
30
|
-
raise ValueError('Raw Packet must be 62/74 chars long!')
|
|
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)
|
|
32
|
-
if delay > 0:
|
|
33
|
-
diff = time.perf_counter()
|
|
34
|
-
time.sleep((delay/1000) * duplicates)
|
|
35
|
-
diff = time.perf_counter() - diff
|
|
36
|
-
if print_for_debug:
|
|
37
|
-
debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def send_data_si_pair(self, data_packet, si_packet, duplicates, output_power=DEFAULT_OUTPUT_POWER, delay=DEFAULT_DELAY, packet_error=None):
|
|
41
|
-
if packet_error is None:
|
|
42
|
-
packet_error = [True for i in range (duplicates * 2)]
|
|
43
|
-
# debug_print(packet_error)
|
|
44
|
-
# print(f'delay {delay}')
|
|
45
|
-
packet_to_send = data_packet
|
|
46
|
-
def switch_packet(packet_to_send):
|
|
47
|
-
if packet_to_send == data_packet:
|
|
48
|
-
return si_packet
|
|
49
|
-
else:
|
|
50
|
-
return data_packet
|
|
51
|
-
for dup in range(duplicates * 2):
|
|
52
|
-
diff = time.perf_counter()
|
|
53
|
-
if packet_error[dup]:
|
|
54
|
-
debug_print(f'Sending Packet {dup}')
|
|
55
|
-
self.send_packet(packet_to_send, duplicates=1, output_power=output_power, channel=SEND_ALL_ADV_CHANNELS, delay=0)
|
|
56
|
-
else:
|
|
57
|
-
debug_print(f'Dropping Packet {dup}')
|
|
58
|
-
time.sleep(delay/1000)
|
|
59
|
-
diff = time.perf_counter() - diff
|
|
60
|
-
debug_print(f'Desired Delay: {delay/1000} Actual Delay {diff}')
|
|
61
|
-
packet_to_send = switch_packet(packet_to_send)
|