On 11/26/2013 09:36 AM, Phil Dibowitz wrote:
> On 11/26/2013 07:16 AM, Scott Talbert wrote:
>> Actually, we don't support firmware updates for Z-Wave HID, so that should 
>> have failed much earlier.  Looking at your debug trace, I think the real 
>> problem is that we attempted to do an *UpdateConfig* with a firmware file, 
>> which is not going to work too well.  I think that means the file parsing 
>> did not recognize the file as firmware, so it tried to process it as a 
>> config.
> 
> Oh, right! Heh, I'm an idiot.
> 
> So it looks like we deterine firmware based on a value of "Firmware_Main"
> inside a "TYPE" tag in the Data.xml - but neither of those tags are in the
> firmware file I got from the website.
> 
> Looking at the file, best I can see is, in the COMPLETEPOSTOPTIONS, there's a
> PATH of EasyZapper/New/ProcUpgradeFirmware/Upgrade_Receive_Complete.asp
> 
> I'll look into fixing this in the next few days.

Attached is a patch.

I would rather have put the const in xml_headers.h, but I had weird problems
with this. Even though xml_headers.h is protected with the standard:

#ifndef XML_HEADERS_H
#define XML_HEADERS_H

If I included it from operationfile.cpp, I got duplicate define errors when
libtool tried to link each of it's object files together. So I left it in
operationsfile.cpp. Thoughts welcome.


-- 
Phil Dibowitz                             p...@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss

commit eea63e81b70d1b6b607ad6464195d772e01cf38e
Author: Phil Dibowitz <p...@ipom.com>
Date:   Wed Nov 27 00:07:25 2013 -0800

    Fix firmware file detection
    
    Firmware files were not being identified properly for my 895.  It's
    unclear if this is just a new format we now get or if some models get a
    different XML format, but this will detect both the old and new files.
    
    Signed-off-by: Phil Dibowitz <p...@ipom.com>

diff --git a/libconcord/operationfile.cpp b/libconcord/operationfile.cpp
index 7ed330e..f20ab72 100644
--- a/libconcord/operationfile.cpp
+++ b/libconcord/operationfile.cpp
@@ -31,6 +31,9 @@
 #include "web.h"
 #include "remote.h"
 
+static const char *FW_URL =
+    "EasyZapper/New/ProcUpgradeFirmware/Upgrade_Receive_Complete.asp";
+
 int find_config_binary(uint8_t *config, uint32_t config_size,
     uint8_t **binary_ptr, uint32_t *binary_size)
 {
@@ -309,13 +312,20 @@ int OperationFile::ReadAndParseOpFile(char *file_name, int *type)
         string tag_s;
         err = GetTag("TYPE", tmp_data, tmp_size, tag_ptr, &tag_s);
         if (err == -1) {
-            debug("not a firmware file");
-            break;
+            err = GetTag("PATH", tmp_data, tmp_size, tag_ptr, &tag_s);
+            if (err == -1) {
+                debug("not a firmware file");
+                break;
+            }
         }
         if (!stricmp(tag_s.c_str(), "Firmware_Main")) {
             debug("IS a firmware file");
             found_firmware = true;
             break;
+        } else if (!stricmp(tag_s.c_str(), FW_URL)) {
+            debug("IS a firmware file");
+            found_firmware = true;
+            break;
         }
         tmp_data = tag_ptr + tag_s.length();
         tmp_size = end_info_ptr - tmp_data;

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to