PeterPawn / YourFritz

dynamic package management for AVM routers
GNU General Public License v2.0
219 stars 63 forks source link

juis_check: No result for 6490 Cable #62

Closed srett closed 9 months ago

srett commented 9 months ago
./juis_check -d 192.168.178.1
debug: Respawning script with Bash as shell, calling: command bash ./juis_check --debug --no-respawn 192.168.178.1
debug: -------------------------------------------------------
debug: Reading values from '192.168.178.1:80/juis_boxinfo.xml': .
debug: Read response from device:
debug: -------------------------------------------------------
       HTTP/1.0 404 Not Found
       Content-Length: 5103
       Content-Type: text/html; charset=utf-8

       <!DOCTYPE html>
       [...]
       </html>

debug: Error reading 'juis_boxinfo.xml' from FRITZ!Box device with address '192.168.178.1:80'.
debug: -------------------------------------------------------
debug: Reading values from '192.168.178.1:80/jason_boxinfo.xml': .
debug: Read response from device:
debug: -------------------------------------------------------
       HTTP/1.1 200 OK
       Cache-Control: max-age=120
       Connection: close
       Content-Type: text/xml;charset=utf-8
       Date: Sat, 16 Dec 2023 12:03:44 GMT
       ETag: "191602FB51C2CB421"
       Expires: Sat, 16 Dec 2023 12:05:44 GMT
       Last-Modified: Sat, 16 Dec 2023 12:01:51 GMT
       Mime-Version: 1.0

       <j:BoxInfo xmlns:j="http://jason.avm.de/updatecheck/">
       <j:Name>FRITZ!Box 6490 Cable</j:Name>
       <j:HW>213</j:HW>
       <j:Version>141.06.51</j:Version>
       <j:Revision>34089</j:Revision>
       <j:Serial>E0286[......]</j:Serial>
       <j:OEM>avm</j:OEM>
       <j:Lang>de</j:Lang>
       <j:Annex>Kabel</j:Annex>
       <j:Lab></j:Lab>
       <j:Country>049</j:Country>
       <j:UpdateConfig>2</j:UpdateConfig></j:BoxInfo>
debug: Splitting compound version number '141.06.51-34089' to:
debug: Major=141
debug: Minor=06
debug: Patch=51
debug: Buildnumber=34089
debug: Compound version number used for request: '141.06.51-34089'
debug: -------------------------------------------------------
debug: Variables set:
debug: -------------------------------------------------------
debug: Name="FRITZ!Box 6490 Cable"
debug: HW="213"
debug: OEM="avm"
debug: Lang="de"
debug: Annex="Kabel"
debug: Country="049"
debug: Serial="E0286D37D229"
debug: Major="141"
debug: Minor="6"
debug: Patch="51"
debug: Buildnumber="34089"
debug: Flag=""
debug: Buildtype="1"
debug: hostname="213.jws.avm.de"
debug: nonce="MTM6MDM6NDcxMi8xNi8yMw=="
debug: -------------------------------------------------------
debug: Sent request:
debug: -------------------------------------------------------
       POST /Jason/UpdateInfoService HTTP/1.1
       Host: 213.jws.avm.de:80
       Content-Length: 1175
       Content-Type: text/xml; charset="utf-8"
       Connection: close

       <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:e="http://juis.avm.de/updateinfo" xmlns:q="http://juis.avm.de/request">
         <soap:Header/>
         <soap:Body>
           <e:BoxFirmwareUpdateCheck>
             <e:RequestHeader>
               <q:Nonce>MTM6MDM6NDcxMi8xNi8yMw==</q:Nonce>
               <q:UserAgent>Box</q:UserAgent>
               <q:ManualRequest>true</q:ManualRequest>
             </e:RequestHeader>
             <e:BoxInfo>
               <q:Name>FRITZ!Box 6490 Cable</q:Name>
               <q:HW>213</q:HW>
               <q:Major>141</q:Major>
               <q:Minor>6</q:Minor>
               <q:Patch>51</q:Patch>
               <q:Buildnumber>34089</q:Buildnumber>
               <q:Buildtype>1</q:Buildtype>
               <q:Serial>E0286D37D229</q:Serial>
               <q:OEM>avm</q:OEM>
               <q:Lang>de</q:Lang>
               <q:Country>049</q:Country>
               <q:Annex>Kabel</q:Annex>
               <q:Flag></q:Flag>
               <q:UpdateConfig>1</q:UpdateConfig>
               <q:Provider>oma_lan</q:Provider>
             </e:BoxInfo>
           </e:BoxFirmwareUpdateCheck>
         </soap:Body>
       </soap:Envelope>
debug: -------------------------------------------------------
debug: Reading response from '213.jws.avm.de:80': .
debug: Received response:
debug: -------------------------------------------------------
       HTTP/1.1 200 OK
       download-delay: 251
       content-type: text/xml;charset=UTF-8
       content-length: 1866
       date: Sat, 16 Dec 2023 12:03:47 GMT
       access-control-allow-origin: http://scope.avm.de
       access-control-allow-headers: content-type
       connection: close

       <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/><soap:Body ID="Body"><ns2:BoxFirmwareUpdateCheckResponse xmlns:ns2="http://juis.avm.de/updateinfo" xmlns:ns3="http://juis.avm.de/response" xmlns:ns4="http://juis.avm.de/request"><ns2:ResponseUpdateInfo><ns3:ResponseHeader><ns3:Nonce>MTM6MDM6NDcxMi8xNi8yMw==</ns3:Nonce></ns3:ResponseHeader><ns3:UpdateInfo><ns3:CheckInterval>48</ns3:CheckInterval><ns3:Found>false</ns3:Found><ns3:Version></ns3:Version><ns3:DownloadURL></ns3:DownloadURL><ns3:InfoURL></ns3:InfoURL><ns3:InfoText></ns3:InfoText><ns3:HintURL></ns3:HintURL><ns3:Priority>1</ns3:Priority><ns3:AutoUpdateStartTime>0</ns3:AutoUpdateStartTime><ns3:AutoUpdateEndTime>0</ns3:AutoUpdateEndTime><ns3:AutoUpdateKeepServices>true</ns3:AutoUpdateKeepServices></ns3:UpdateInfo></ns2:ResponseUpdateInfo></ns2:BoxFirmwareUpdateCheckResponse><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/><Reference URI="#Body"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><DigestValue>CN0MjM6x44/fVZwVqKGMDR7ZLVt+sovSSWL3PD2kVzk=</DigestValue></Reference></SignedInfo><SignatureValue>M5ttEGTlCFJq+1CtJRwTWQlt5eivz7a0fNZ677uypHykGMkRwvWseTYQDxRGOBtW9Kyi6ePy2CfPSvheS7XKcSi5X+/sR/TFO7qpyslkM7PMpbfOKyZA7RCgoll2LLstYx6vPlsqcLWHSlAPRyS5XI0zr+Sgaz854TBXaeKwTbuItQcTufMwH+cIltwprQbSXb8w4aQT5zLnEzJbguLJb9YgCK0cV3c9UAX9pcehaLKHgjmwRLM7FWMpbJyb8OcuVtpjbOriatYDZmXxjeHEWd8D0YTEdW901vpjuUnxXcM31UsRGlATtprDaT2UNsezUbfR9j3P5VBBzPH2rYBgAw==</SignatureValue></Signature></soap:Body></soap:Envelope>
debug: -------------------------------------------------------
juis_check: No newer version found, check was made with source version '141.06.51-34089'.

However, after some googling I simply found https://download.avm.de/fritzbox/fritzbox-6490-cable/deutschland/fritz.os/ so was in the end able to update my box, but just to let you know in case this is not expected behavior.

PeterPawn commented 9 months ago

The content of AVM's answer is solely in responsibility of AVM.

But the previously installed version of firmware was rather old - it was lacking the newer version of the configuration file (juis_boxinfo.xml). Even if the script tries to get the correct values from the older version (jason_boxinfo.xml) it seems, the values from your device aren't supported by the JUIS server. If you add a Version=141.06.60-00000 parameter to your call, the current firmware version will be found:

...
vidar:~ $ juis_check fb6490 Version=141.06.60-00000
usr/local/bin/juis_check: Found newer version: 141.07.57
URL=http://download.avm.de/fritzbox/fritzbox-6490-cable/deutschland/fritz.os/FRITZ.Box_6490_Cable-07.57.image
vidar:~ $
...

So your result wasn't the expected one, but the script isn't in charge for this.

Feel free to reopen this issue, if needed ... I'll close it with my answer for now.

srett commented 9 months ago

Thanks for the quick reply; that's odd indeed. I actually ended up with a second 6490 which was running some early 7.x version, and also got the same result, i.e. nothing. What's weird is that both boxes seemed to be unbranded, regarding both the box design itself and the readout of firmware_version (but I'm not sure about provider additives). Yet they didn't have an update option in the WebUI: neither online check nor manual upload of an image file. With the older box from the initial post, I could use the devtools hack described here to upload the 7.57 image via browser, but the second box with the 7.x firmware required me to use the adam2 method. Both boxes now show the update feature in the WebUI. Both appear to be working so far, but I'll only find out about the cable modem part over the holidays when it's time to fix all the family IT issues. :smile:

Well hopefully search engines will pick this up and people will end up here should they have the same problem.

PeterPawn commented 9 months ago

but the second box with the 7.x firmware required me to use the adam2 method

It's the safest and fastest method for ("external") firmware updates on the cable boxes by AVM, anyway. There aren't any preconditions, which a device had to met - and it will work always (at least with Puma6-based devices).

There are some options in AVM's firmware, where online updates may be disabled - it's not a "one and only setting" thing, that may be reverted/circumvented in ONE safe way. Therefore the safest approach is to install a fresh retail firmware version, after the device has been initialized with factory settings first.