Hi,
I am currently trying to investigate a factory reset loop between at least AVM devices and GenieACS v1.1.3 and v1.2.3. In fact I just updated to v1.2.3 to see if this issues was fixed. But unfortunately it seems the problem still persists. I am trying to factory reset a device via CWMP and later provision it using a preset matching the serial number pointing to a provision, which reacts on the EVENT “0 BOOTSTRAP”.
PRESET:
{"_id":“prov-2”,“weight”:0,“precondition”:"DeviceID.SerialNumber = “3810D5697542"”,“events”:{“0 BOOTSTRAP”:true},“configurations”:[{“type”:“provision”,“name”:“prov-2”,“args”:null}]}
I initiated the factory reset using the API. The following task can be retrieved:
{"_id":“5fd11bb5c334895a945152b8”,“name”:“factoryReset”,“device”:“00040E-FRITZ%21Box-3810D5697542”,“timestamp”:“2020-12-09T18:47:17.430Z”}
On next Inform (I didn’t use connection_request) GenieACS correctly tries to factory reset the device. However, the task is never removed. Thus, on next Bootstrap Inform (since the device did a factory reset) it will be factory reset again. This leads to a factory reset loop of the device. In effect it will be never be provisioned and remains unusable unless I manually remove the task.
I upload a pcap file (https://apackets.com/pcaps?pcap=219f86032cf97227b8849c23f0c76c7f.pcap&view=charts) showing three factory resets. Looking closely at the first TCP session, one can see, that there is no FactoryResetRespone from the device. I can understand, that GenieACS won’t remove the task unless a FactoryResetRespone is received.
However, in the next two retries one can clearly see the response (packet number 23 and 81). You may want to filter for ‘xml.tag == “cwmp:FactoryResetResponse/”’. GenieACS furthermore is trying to get parameter names and values after the factory reset was initiated. This will of course time out at some point, since the devices is resetting. From my point of view GenieACS should only do the FactoryReset, without further commands.
Even if this fails (and maybe as a workaround), I would expect that GenieACS deletes all FactoryReset tasks if the device sends an Inform with event “0 BOOTSTRAP”.
Below you can find the Log during the three factory resets:
LOOP0
2020-12-09T18:50:05.881Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“100” informEvent=“4 VALUE CHANGE,1 BOOT,0 BOOTSTRAP” informRetryCount=0
2020-12-09T18:50:05.887Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d6cead0000” acsRequestName=“FactoryReset”
2020-12-09T18:50:35.890Z [ERROR] 127.0.0.1: Session timeout; sessionTimestamp=1607539805869 deviceId=“00040E-FRITZ%21Box-3810D5697542”
LOOP1
2020-12-09T18:52:56.135Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“100” informEvent=“4 VALUE CHANGE,1 BOOT,0 BOOTSTRAP” informRetryCount=0
2020-12-09T18:52:56.142Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00000” acsRequestName=“FactoryReset”
2020-12-09T18:52:56.382Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00200” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.403Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00201” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.430Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00202” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.468Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00203” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.488Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00204” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.496Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00205” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.547Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00206” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.555Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00207” acsRequestName=“GetParameterValues”
2020-12-09T18:52:56.609Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00208” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.661Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00209” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.713Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020a” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.721Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020b” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.735Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020c” acsRequestName=“GetParameterValues”
2020-12-09T18:52:56.786Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020d” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.801Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020e” acsRequestName=“GetParameterNames”
2020-12-09T18:52:56.851Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c0020f” acsRequestName=“GetParameterValues”
2020-12-09T18:52:56.915Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648d967c00210” acsRequestName=“GetParameterNames”
2020-12-09T18:53:26.916Z [ERROR] 127.0.0.1: Session timeout; sessionTimestamp=1607539976128 deviceId=“00040E-FRITZ%21Box-3810D5697542”
LOOP2
2020-12-09T18:55:49.017Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“100” informEvent=“4 VALUE CHANGE,1 BOOT,0 BOOTSTRAP” informRetryCount=0
2020-12-09T18:55:49.023Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100000” acsRequestName=“FactoryReset”
2020-12-09T18:55:49.204Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100200” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.219Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100201” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.240Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100202” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.267Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100203” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.282Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100204” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.289Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100205” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.337Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100206” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.343Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100207” acsRequestName=“GetParameterValues”
2020-12-09T18:55:49.393Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100208” acsRequestName=“GetParameterNames”
2020-12-09T18:55:49.442Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648dc0b100209” acsRequestName=“GetParameterNames”
2020-12-09T18:56:19.443Z [ERROR] 127.0.0.1: Session timeout; sessionTimestamp=1607540149008 deviceId=“00040E-FRITZ%21Box-3810D5697542”
TASK removed
2020-12-09T18:58:46.189Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“100” informEvent=“4 VALUE CHANGE,1 BOOT,0 BOOTSTRAP” informRetryCount=0
2020-12-09T18:58:46.209Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250100” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.266Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250101” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.287Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250102” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.314Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250103” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.329Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250104” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.336Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250105” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.384Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250106” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.391Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250107” acsRequestName=“GetParameterValues”
2020-12-09T18:58:46.440Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250108” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.489Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250109” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.538Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010a” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.544Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010b” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.554Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010c” acsRequestName=“GetParameterValues”
2020-12-09T18:58:46.605Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010d” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.615Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010e” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.663Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25010f” acsRequestName=“GetParameterValues”
2020-12-09T18:58:46.722Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250110” acsRequestName=“GetParameterNames”
2020-12-09T18:58:46.753Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250111” acsRequestName=“GetParameterNames”
2020-12-09T18:58:49.076Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250112” acsRequestName=“GetParameterNames”
2020-12-09T18:58:49.320Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250113” acsRequestName=“GetParameterNames”
2020-12-09T18:58:49.499Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250114” acsRequestName=“GetParameterValues”
2020-12-09T18:58:49.568Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250115” acsRequestName=“AddObject”
2020-12-09T18:58:49.593Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250116” acsRequestName=“GetParameterValues”
2020-12-09T18:58:49.624Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250117” acsRequestName=“SetParameterValues”
2020-12-09T18:58:49.939Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250118” acsRequestName=“GetParameterNames”
2020-12-09T18:58:50.669Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf250119” acsRequestName=“SetParameterValues”
2020-12-09T18:58:50.806Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25011a” acsRequestName=“GetParameterNames”
2020-12-09T18:58:50.882Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25011b” acsRequestName=“GetParameterValues”
2020-12-09T18:58:50.981Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25011c” acsRequestName=“GetParameterValues”
2020-12-09T18:58:51.034Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648debf25011d” acsRequestName=“SetParameterValues”
2020-12-09T18:59:20.212Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“101” informEvent=“4 VALUE CHANGE” informRetryCount=0
2020-12-09T18:59:59.397Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-444E6D6FACE4: Inform; cpeRequestId=“2179” informEvent=“2 PERIODIC” informRetryCount=0
2020-12-09T18:59:59.414Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-444E6D6FACE4: ACS request; acsRequestId=“17648dfdd1b0100” acsRequestName=“GetParameterValues”
2020-12-09T19:03:25.901Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-444E6DA82E4F: Inform; cpeRequestId=“1616” informEvent=“2 PERIODIC” informRetryCount=0
2020-12-09T19:03:25.915Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-444E6DA82E4F: ACS request; acsRequestId=“17648e303c70100” acsRequestName=“GetParameterValues”
2020-12-09T19:03:51.453Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: Inform; cpeRequestId=“102” informEvent=“2 PERIODIC” informRetryCount=0
2020-12-09T19:03:51.471Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680100” acsRequestName=“GetParameterNames”
2020-12-09T19:03:51.495Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680101” acsRequestName=“GetParameterNames”
2020-12-09T19:03:51.546Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680102” acsRequestName=“GetParameterValues”
2020-12-09T19:03:51.571Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680103” acsRequestName=“GetParameterNames”
2020-12-09T19:03:51.577Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680104” acsRequestName=“GetParameterValues”
2020-12-09T19:03:51.599Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680105” acsRequestName=“GetParameterNames”
2020-12-09T19:03:51.605Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680106” acsRequestName=“GetParameterNames”
2020-12-09T19:03:51.615Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680107” acsRequestName=“GetParameterNames”
2020-12-09T19:03:52.661Z [INFO] 127.0.0.1 00040E-FRITZ%21Box-3810D5697542: ACS request; acsRequestId=“17648e367680108” acsRequestName=“GetParameterValues”