CLI: Unable to claim gateway - error with gateway-id format

echarlus
Wed, 12 Mar 2025 10:42:34 +0000
The Things Stack v3

Hi All,
I’m trying to claim a TTIG Gateway using ttn-lw-cli but it fails with an error stating that the gateway ID is not conform to requirements.
However, the id I’m using matches the pattern used to enforce GW ID format so I guess there’s another error somewhere but I cannot find it.
Has anyone succeeded in claiming through cli ? (this is on a TTN Cloud instance):

ttn-lw-cli -c .ttn-lw-cli.yml gateways claim --gateway-id ttig-test-01 --gateway-eui VALID_EUI --authentication-code 'edofrvwD' --organization-id my-org --target-frequency-plan-id EU_863_870_TTN --target-gateway-server-address XXX.eu1.cloud.thethings.industries

I’m getting this error :

error:pkg/errors:validation (invalid gateway: embedded message failed validation) name=CreateGatewayRequestValidationError field=gateway reason=embedded message failed validation correlation_id=48cad067d52f4d628d863ee99210eaae --- error:pkg/errors:validation (invalid ids: embedded message failed validation) field=ids reason=embedded message failed validation name=GatewayValidationError correlation_id=4308af927daf45aaa86013a50352b0ff --- error:pkg/errors:validation (invalid gateway_id: value does not match regex pattern "^[a-z0-9](?:[-]?[a-z0-9]){2,}$") name=GatewayIdentifiersValidationError field=gateway_id reason=value does not match regex pattern "^[a-z0-9](?:[-]?[a-z0-9]){2,}$" correlation_id=2ca74cacd9fb46d98d976f66e58de5a6

But the ID I used ttig-test-01 does indeed match the pattern [1](?:[-]?[a-z0-9]){2,}$”
Has anyone succeeded in claiming using cli ?
Thanks

1. a-z0-9 ↩︎

5 posts - 2 participants