diff --git a/tools/cgathui_common/tests/ble_etcp_probe.c b/tools/cgathui_common/tests/ble_etcp_probe.c index 72eaaf2f4..077f833d2 100644 --- a/tools/cgathui_common/tests/ble_etcp_probe.c +++ b/tools/cgathui_common/tests/ble_etcp_probe.c @@ -74,9 +74,12 @@ int main(int argc, char** argv) { unsigned window = argc > 5 ? (unsigned)atoi(argv[5]) : 1; packet_size = argc > 6 ? (unsigned)atoi(argv[6]) : 1500; unsigned interval_ms = argc > 7 ? (unsigned)atoi(argv[7]) : 0; - if (seconds < 1 || seconds > 300 || !packets || packets > 1000000 || !window || window > 64 || - packet_size < 2 || packet_size > 1500 || interval_ms > 1000) return 2; debug_config_init(); debug_set_level(DEBUG_LEVEL_WARN); debug_set_category_level(DEBUG_CATEGORY_DISCOVERY, DEBUG_LEVEL_DEBUG); + if (seconds < 1 || seconds > 300 || !packets || packets > 1000000 || !window || window > 64 || + packet_size < 2 || packet_size > 1500 || interval_ms > 1000) { + DEBUG_ERROR(DEBUG_CATEGORY_DISCOVERY, "BLE probe invalid arguments seconds=%d packets=%u window=%u bytes=%u interval_ms=%u", + seconds, packets, window, packet_size, interval_ms); return 2; + } struct UASYNC* ua = uasync_create(); struct SC_MYKEYS keys; if (!ua || sc_generate_keypair(&keys) != SC_OK) return 1; char priv[65], pub[65], config[512];