diff --git a/app/services/cwmp/main_state_machine.ts b/app/services/cwmp/main_state_machine.ts index 1fdecc8..729c9cd 100644 --- a/app/services/cwmp/main_state_machine.ts +++ b/app/services/cwmp/main_state_machine.ts @@ -72,6 +72,16 @@ class DiscoveringParametersState extends DeviceState { return { response: await this.processNext(context) } } + // If CPE responded with a Fault, GPN is not supported — skip discovery + if (context.message && !context.message.success) { + logger.info( + { faultData: context.message.data }, + '[DiscoveringParameters] GPN Fault received — marking as unsupported' + ) + context.device.setGpnStatus('unsupported') + return { nextState: new ConfigurationEvaluationState(), response: '' } + } + // Process response and continue if (this.parameterQueue.length > 0) { return { response: await this.processNext(context) }