Saturday, January 23, 2010

How To Downgrade The Firmware Version of Siemens S450 SIP Handset

How To Downgrade The Firmware Version of Siemens S450 SIP Handset

by cawan - cawan[at]ieee.org

Lets ask two questions first...

1. Why we need to do so?
Because the new firmware cannot work well! (dropout, connection lost on call, self-reboot...)

2. why need to write a long article to talk about how to downgrade the S450 firmware?
Because S450 do not allow user to downgrade the firmware version once it is being upgraded to the latest version. In other words, if our phone cannot work well once getting upgraded, it cannot be reverted.

Lets start the story from here.

First of all, we need to know how to download and save a local copy of S450 firmware from gigaset.com. Lets start from studying the web directory structure of gigaset.com.

By gathering and analizing the sniffed packets with ethereal to the communication between S450 and gigaset.com, the web directory structure of gigaset.com can be summarized as below.

Lets say http://gigaset.com/chagall/2/14/ is an image path of a specific version of firmware. Then it has a master directory file with the name of master.bin to show the baselines directory of the firmware with the name of baselines.com. By reading the baselines.bin, we can get know the exact filename of the firmware version to download. Lets have an example,

a) Get into http://gigaset.com/chagall/2/14/
b) Get the master directory file - master.bin with http://gigaset.com/chagall/2/14/master.bin
c) Read the master.bin, and get baselines.bin which is stated in master.bin
d) Get the baselines.bin with http://gigaset.com/chagall/2/14/baselines.bin
e) Read the baselines.bin and get the filename(s) of the firmware, for my example, it is chagall083_02.bin
f) Get the firmware file with http://gigaset.com/chagall/2/14/chagall083_02.bin

Now, lets have a look to the naming convention of the S450 firmware, as shown below,

chagall083_02.bin -> v02083
chagall072_01.bin -> v01072
chagall184_02.bin -> v02184
chagall191_02.bin -> v02191
chagall214_02.bin -> v02214 <- Latest Firmware at 23-Jan-2010 We can get a list of the firmware version for S450 from the following site, http://gigaset.com/shc/0,1935,hq_en_0_123868_rArNrNrNrN_variation%253A-5_pageType%253Adownloads_imagePos%253A0,00.html

So, now, we already know how to get the exact filename of the firmware version that we are looking for. For example, if we need to get the firmware version of v02214, then the correct filename should be chagall214_02.bin. So, we can try to download the firmware directly. For chagall214_02.bin (v02214), it should be http://gigaset.com/chagall/2/chagall214_02.bin, and for chagall191_02.bin (v02191), it should be http://gigaset.com/chagall/2/chagall191_02.bin instead.

May be someone will ask why chagall083_02.bin (v02083) is located at http://gigaset.com/chagall/2/14/chagall083_02.bin but not http://gigaset.com/chagall/2/chagall083_02.bin? This is because http://gigaset.com/chagall/2/ only stores a few of the most recent firmware version, and all the older version will be moved into a deeper path such as /14 in our example. So, once the firmware version is moved into the deeper path, then we need to recursively traverse into the gigaset web directory to get the desired firmware file with appropriate baselines.bin file.

Lets start to have a look to the methods to upgrade S450 firmware into the latest version.

1. From handset: Setting->Base->Software Upgrade

2. From Web: (using Siemens Gigaset site)

Goto Setting->Miscellaneous->Firmware Upgrade
In "Data Server" the default is "gigaset.com/chagall/"
In "User Defined Firmware" put "http://gigaset.com/chagall/2/chagall214_02.bin"
Then click "Upgrade Firmware"

3. From Web: (using own local web site)

Goto Setting->Miscellaneous->Firmware Upgrade
In "Data Server" the default is "gigaset.com/chagall/" (no need to change this, it is for self-healing purpose)
In "User Defined Firmware" put "http://192.168.1.1/chagall214_02.bin" (we put chagall214_02.bin into the root directory of http://192.168.1.1/) .
Then click "Upgrade Firmware"

We have mentioned about the term of self-healing above, then what is it? The Siemens S450 has the ability to perform so called self-healing once the firmware spoilt due to the incomplete firmware upgrade process. It will based on the default setting of the S450 to connect Siemens Gigaset site (as stated in the "Data Server" column) to download the latest firmware automatically. However, if the "User Defined Firmware" is specified with a valid URL (such as "http://192.168.1.1/chagall214_02.bin"), then it will override the "Data Server" in order to get the latest firmware instead. As additional info, if "User Defined Firmware" is left blank or not specified correctly, then S450 will use port 20 to transfer the latest firmware from gigaset site. So, for those S450 installed in NAT, it is necessary to set port forwarding of port 20 to the S450 IP address at the router and also allow port 20 at the firewall to enable self-healing from gigaset site.

Well, now, we reach to the most crucial part of this article - how to downgrade the firmware version. For my case, I use firmware version v02191 for some times with no error. However, once I upgrade the firmware version into v02214, my S450 totally cannot call into Asterisk server or Barix Annuncicom in peer-to-peer mode. Everytime I initiate a call, it keeps showing "Connection Lost" and stop then. When I enable to show Status, I keep getting "IP Status Code:701"...So, now I really need to have my v02191 back! Then I try to fill in "http://gigaset.com/chagall/2/chagall191_02.bin" in "User Defied Firmware" and click "Upgrade Firmware" button, it shows a message box with "Firmware Upgrade Not Possible: Latest firmware version is already installed." and the upgrade process stopped. Then, I download the chagall191_02.bin and put it in the root directory of my local web server and start the upgrade process again with "http://192.168.1.1/chagall191_02.bin", I got the same error. After that, I tried to rename the file into chagall999_02.bin, I got the same error too.

After having some packet analysis with ethereal, I get know my S450 will get a chunk of data from chagall191_02.bin first before showing the error message box and stop the firmware upgrade process. So, it is very obvious the S450 should has some kind of "version checking" mechanism to the chagall191_02.bin file. By performing hexadecimal file compare to the chagall191_02.bin and chagall214_02.bin, there are not many bytes are in different for the chunk that is transfer from my web server to the S450. In very quickly, I found that at offset 0x200, chagall191_02.bin is 0xBF (191 in decimal) and chagall214_02.bin is 0xD6 (214 in decimal). Now, I can just "fool" the S450 to assume the chagall191_02.bin (v02191) as v02255 by changing the 0xBF of chagall191_02.bin at offset 0x200 to 0xff. Then I try to "upgrade" the new "v02255" firmware again. This time, I get a message box with "Firmware update started. The device will be disconnected and this interface terminated. The device will then shut down and restart. Once completed, you may start the interface again.", and I can see the upgrade process is started from ethereal. Once the upgrade process is completed, I just turn off and turn on the power again to restart the S450. Then, I try to access the S450 with my browser but it has not response! Then it seems the S450 got some kind of checksum to ensure the data integrity of the firmware. After that, I try to ping the S450 and I can get response from it (I assume the bootstrap of the S450 is always exist to support self-healing). So now I replace the edited chagall191_02.bin with the original one at my web server. Then I restart my S450 again. From ethereal, I can see my S450 is downloading the original chagall191_02.bin from my web server, in other words, the so called "firmware downgrade" process is just started! Once completed, I restart my S450 again and get access to it from my web browser. Finally, I get get into it and when I click into the "Status", it shows the firmware version is 0219100000. So, my firmware downgrade process is completed.

So, this is the whole process of firmware downgrade of Siemens S450 Sip handset. Please take you own risk to practice all the steps as mentioned above. For any further queries, please contact me.

14 comments:

  1. Worked for me! Thanks for the detailed description. I used it to downgrade my T-Com Sinus 501 V (made by Gigaset) from a special provider beta version 22201, to the regular version 214.

    After downgrade, the webinterface displayed "file corrupt", when i tried to login with "german" or "france" as language setting. but login with "english" worked. Then i have done the update again, with
    "gigaset.com/chagall" as Server Setting
    and
    "gigaset.com/chagall/2/chagall214_02.bin" as userdefined firmware setting.

    now it also works again in german and france language mode...

    ReplyDelete
  2. After downgrading to 214 i had problems with incomming calls from "Freenet / 1&1". I got Error 704, when i tried to take an incomming call.

    So now i have downgraded to version 191. Now Freenet works. Unfortunately "Carpo / Easybell" still produces the same error. But this provider told me, they are working to solve this problem...

    ReplyDelete
  3. Can anybody of you give me his modified binary-File? I want to downgrade to 191.

    ReplyDelete
  4. You just need a hex editor to change
    location 0x200 in the file to 0xff.

    "changing the 0xBF of chagall191_02.bin at offset 0x200 to 0xff."

    ReplyDelete
  5. Hi... I am currently using version v02214 and would like to downgrade to v02083. Can you please help?.. I have no idea how to rename the hexadecimal file?...

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. I don't suppose you have any idea how to get the last firmware released for the Tesco version of this phone that's needed in order to unlock it - as no matter which version I install, I keep getting "You have the latest firmware", even with gigaset.com/chagall/2/chagall214_02.bin

    ReplyDelete
  8. Hi I just upgraded my Targa DIP 450 to 01.0720 from 01.0630. The thing is Now I got this echo and my voice cuts when talking, anyone had that problem ?

    I am also unsure if I can revert back since the targa fw doesnt seem to be the same as the siemens 450 one!

    please respond or email me!

    lechuckz@yahoo.com
    /Petter

    ReplyDelete
  9. I need the same help as Patrik...
    Hi... I am currently using version v02214 and would like to downgrade to v02083. Can you please help?.. I have no idea how to rename the hexadecimal file?...
    ThX

    ReplyDelete
  10. Just read you post and was hoping to apply the above to a locked C470ip, anbody know of wher i could obtain the correct firmware.

    Thanks

    ReplyDelete
  11. Hi Cawan,

    I have a Sinus 501v which I have a problem with and I found some info on your blog about downgrading but am having troube following your instructions. When I first got the 501v I'm sure it was possible to have more than 1 IP Service registered but now only the first registration works even thought the other 5 are there.

    I also bought a DP450 complete with a handset which I assume is an S45 although there is no model number shown on it.

    I think the problem may have occurred when I logged the S45 Handset onto the Sinus 501v because I think it did a software update. Anyway, the current software on the 501v is

    Firmware version: 021890000000 / 043.00
    EEPROM version: 157

    I can get to:-

    Firmware Update


    Data server:
    User defined firmware file:

    via the web interface but need to know what to enter in the boxes for 'Data server' and 'User defined firmware file' in order to get the 501v to download a firware version which will restore all 6 registrations.

    Hopep you can help.

    Peter

    ReplyDelete
  12. here's a document on how to unlock the Tesco locked version of S450IP aka the DP450.

    www.voicehost.co.uk/VH-Unlock-Tesco-DP450-IP.pdf

    also more information here:
    http://www.provu.co.uk/may2010.html#tesco

    ReplyDelete
  13. Hey I am running a business in uk and I am looking some SIP Providers that reduce cost and also improve communication level because By using a business SIP trunk to combine voice and data, you can drop your analogue ISDN and save more than 60% on connectivity charges. Please suggest me something like this SIP Providers http://business.simplecall.com/business-broadband

    ReplyDelete
  14. Thank you for this! Gigaset support was useless... Worked for me!

    ReplyDelete