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.