OK, so I looked more at the serial number thing. As best I can tell, the Touch uses a completely different serial number than any other remote that we support (thanks, Logitech!). I queried the MH API for the serial number in your trace, and sure enough, it comes back as valid. So, it looks like we'll have to support that format, too.

So, I have a new patch (v2) attached that should also now handle the serial number. Please try it out and let me know how it goes.

Also, I have patched MHGUI (I created a branch 'harmony_touch' in git) to attempt to read the new serial number format. So, in theory you might be able to add your remote with MHGUI. You can try that as well.

Scott

On Wed, 11 Dec 2013, Scott Talbert wrote:

OK, I also pushed a fix to MHGUI to fix that traceback below about the ProductSetting not being found.

Now, we're still going to have an issue with MHGUI adding the Touch to an account, because doing that requires a serial number. I'll have to think about that some more.

On Wed, 11 Dec 2013, Cédric de Launois wrote:

I tried mhgui, It seems that 2nd calls to GetIdentity always fail (even
outside mhgui).
Instead of getting the following response :
DEBUG (debug_print_packet): ff 04 84 02 01 00 01 05 00 00 00 00 00 00 00 00

I get this one :
DEBUG (debug_print_packet): ff 04 ff 01 01 04 00 00 00 00 00 00 00 00 00 00

Problem with the sequence number reset ?

The remote hence doesn't appear in the gui.
Here is the complete DEBUG output :

No handlers could be found for logger "suds.umx.typed"
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14665, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "./mhgui", line 258, in UpdateRemotes
    product = mhMgr.GetProduct(remote.SkinId)
  File "/home/cedric/Downloads/concordance/congruity-17/mhmanager.py", line
142, in GetProduct
    return self.client.service['ProductsManager'].GetProduct(skinId)
  File "/usr/lib/python2.7/dist-packages/suds/client.py", line 542, in
__call__
    return client.invoke(args, kwargs)
  File "/usr/lib/python2.7/dist-packages/suds/client.py", line 602, in
invoke
    result = self.send(soapenv)
  File "/usr/lib/python2.7/dist-packages/suds/client.py", line 647, in send
    result = self.succeeded(binding, reply.message)
  File "/usr/lib/python2.7/dist-packages/suds/client.py", line 684, in
succeeded
    reply, result = binding.get_reply(self.method, reply)
  File "/usr/lib/python2.7/dist-packages/suds/bindings/binding.py", line
165, in get_reply
    result = unmarshaller.process(nodes[0], resolved)
  File "/usr/lib/python2.7/dist-packages/suds/umx/typed.py", line 66, in
process
    return Core.process(self, content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 48, in
process
    return self.append(content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 63, in
append
    self.append_children(content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 140, in
append_children
    cval = self.append(cont)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 63, in
append
    self.append_children(content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 140, in
append_children
    cval = self.append(cont)
  File "/usr/lib/python2.7/dist-packages/suds/umx/core.py", line 61, in
append
    self.start(content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/encoded.py", line 47, in
start
    Typed.start(self, content)
  File "/usr/lib/python2.7/dist-packages/suds/umx/typed.py", line 80, in
start
    raise TypeNotFound(content.node.qname())
suds.TypeNotFound: Type not found: 'a:ProductSetting'
DEBUG (FindRemote): bNumEndpoints 2
DEBUG (check_ep): address 81 attrib 03 max_length 64
DEBUG (check_ep): address 02 attrib 03 max_length 64
DEBUG (init_concord): FindRemote vid:046d pid:c12b ver:1099
DEBUG (GetIdentity): msg_two
DEBUG (debug_print_packet): ff ff 81 00 00 00 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): msg_three
DEBUG (debug_print_packet): ff 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): msg_four
DEBUG (debug_print_packet): ff 01 83 02 01 00 04 00 00 00 da 00 00 00 00 00
DEBUG (GetIdentity): msg_five
DEBUG (debug_print_packet): ff 04 84 02 01 00 01 05 00 00 00 00 00 00 00 00
DEBUG (HID_ReadReport): Timeout on interrupt read from device
DEBUG (GetIdentity): feature Infrared
usb_product_id 0xc12b
arch 0x11
serial_number 20120903194257-026202
skin 0x63
hw_ver 01.00
fw_ver 3.4.41
usb_vendor_id 0x046d
fw_type 0x00
link_hw usb
status normal
link_type hid
link_packet_length 64

DEBUG (GetIdentity): ri.flash_id:18 ri.architecture:17
DEBUG (GetIdentity): serial 20120903194257-026202
DEBUG (GetIdentity): msg_six
Traceback (most recent call last):
  File "./mhgui", line 316, in OnAddRemote
    serialNumber = ser_1 + ser_2 + ser_3
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
DEBUG (FindRemote): bNumEndpoints 2
DEBUG (check_ep): address 81 attrib 03 max_length 64
DEBUG (check_ep): address 02 attrib 03 max_length 64
DEBUG (init_concord): FindRemote vid:046d pid:c12b ver:1099
DEBUG (GetIdentity): msg_two
DEBUG (debug_print_packet): ff ff 81 00 00 00 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): msg_three
DEBUG (debug_print_packet): ff 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): msg_four
DEBUG (debug_print_packet): ff 01 83 02 01 01 04 00 00 00 da 00 00 00 00 00
DEBUG (GetIdentity): msg_five
DEBUG (debug_print_packet): ff 04 ff 01 01 04 00 00 00 00 00 00 00 00 00 00
DEBUG (HID_ReadReport): Timeout on interrupt read from device
DEBUG (GetIdentity):
DEBUG (GetIdentity): ri.flash_id:18 ri.architecture:0
DEBUG (GetIdentity): serial
DEBUG (GetIdentity): msg_six




2013/12/11 Scott Talbert <s...@techie.net>
      Yes - for that we created MHGUI, an alternative front end to the
      myharmony.com web service.

      It is packaged as part of the Congruity project:
      http://sourceforge.net/projects/congruity/

      It hasn't ever been used before with the Touch or Ultimate, but
      it should probably be close.  You will definitely want to check
      out the latest version from git.

      Scott

      On Wed, 11 Dec 2013, Cédric de Launois wrote:

            BTW, there is a big problem with Harmony Touch and
            Harmony Ultimate : the
            website is different and requires silverlight + a
            Logitech plugin.
            There is no way to bypass this check on a Linux
            host, and thus I can't
            download any config file.

            I wonder thus if concordance could be of any help
            for these remotes...



            2013/12/11 Scott Talbert <s...@techie.net>
                  Ah, OK.  Yeah that works sometimes.  It seems
            to work better for
                  the newer remotes - some of the older ones
            seem to have problems
                  with it.  Not sure why.

                  On Wed, 11 Dec 2013, Cédric de Launois wrote:

                        hehe, I'm running a Windows 7 in a
            virtualbox, and
                        capturing with Wireshark
                        on my linux host ;-)



                        2013/12/11 Scott Talbert
            <s...@techie.net>
                              Thanks - I'll take a look at this
            later.

                              BTW, how did you get Wireshark to
            capture
                        this?  Does the
                              Windows version of Wireshark
            support USB
                        capturing now?

                              Scott

                              On Wed, 11 Dec 2013, Cédric de
            Launois wrote:

                                    Hi again,

                                    Here is the capture.
                                    You'll probably need to
            extract the
                        relevant packets
                                    using filter : 
                                    'usb.device_address eq 17'

                                    Regards,
                                    Cedric


                                    2013/12/11 Scott Talbert
                        <s...@techie.net>
                                          On Wed, 11 Dec 2013,
            Cédric de
                        Launois wrote:

                                                Hi there,

                                                Is there any
            plan to support
                        the new
                                    Harmony Touch ?
                                                I tried to
            connect using
                        concordance -i
                                    but it
                                                fails.


                                    Yes, of course we plan to
            support it,
                        but no one had
                                    (yet) stopped by
                                    who owns one.

                                          I also have a dump of
            the USB
                        traffic between
                                    the official
                                          Logitech Harmony
                                          software and the
            remote :-D
                        (captured using
                                    wireshark).
                                          I can provide it if
            you want, but
                        here is the
                                    excerpt :

                                          The command data sent
            (6 times ?!)
                        seems to be
                                    (64 bytes)
                                          :
ff:00:00:01:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:




00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:




                                         
                       
            00:00:00:00:00:00:00:00:00:00:00:00:00:00

                                          Next a response from
            the Remote :
ff:ff:81:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:




00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:




                                         
                       
            00:00:00:00:00:00:00:00:00:00:00:00:00:00


                                    Awesome!  That's the MH
            protocol.  I
                        should be able
                                    to send a patch
                                    later which should in theory
            add
                        support.  Also,
                                    could you send the
                                    full Wireshark capture?  You
            can send it
                        directly to
                                    me, or send me a
                                    link if you don't want to
            post it on the
                        mailing
                                    list.

                                    Thanks,
                                    Scott
---------------------------------------------------------------------------



                                    ---
                                    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=84349831&iu=/4140/ostg.clktrk




                                   
                       
            _______________________________________________
                                    concordance-devel mailing
            list
                                   
            concordance-devel@lists.sourceforge.net
                                   
                       
            https://lists.sourceforge.net/lists/listinfo/concordance-devel








---------------------------------------------------------------------------
---
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=84349831&iu=/4140/ostg.clktrk

_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel



commit 5c26116d262ca1a008d4114ae34bbec596b37d49
Author: Scott Talbert <s...@techie.net>
Date:   Wed Dec 11 18:22:31 2013 -0500

    Attempt at supporting the Harmony Touch (v2).
    
    Add the PID for the Touch to the list of MH PIDs.
    Add the Touch's Skin/Arch to the remote_info structs.
    Add support for handling the Touch's non-standard serial number, and provide
    a libconcord call to expose this information.

diff --git a/concordance/concordance.c b/concordance/concordance.c
index e3cd32b..30c395d 100644
--- a/concordance/concordance.c
+++ b/concordance/concordance.c
@@ -916,8 +916,11 @@ int print_version_info(struct options_t *options)
         printf("  USB PID: %04X\n", get_usb_pid());
         printf("  USB Ver: %04X\n", get_usb_bcd());
 
-        printf("  Serial Number: %s\n\t%s\n\t%s\n", get_serial(1),
-               get_serial(2), get_serial(3));
+        if (strlen(mh_get_serial()) != 0)
+            printf("  Serial Number: %s\n", mh_get_serial());
+        else
+            printf("  Serial Number: %s\n\t%s\n\t%s\n", get_serial(1),
+                   get_serial(2), get_serial(3));
     }
 
     used = get_config_bytes_used();
diff --git a/libconcord/bindings/python/libconcord.py 
b/libconcord/bindings/python/libconcord.py
index 718fc0e..0e4d18f 100644
--- a/libconcord/bindings/python/libconcord.py
+++ b/libconcord/bindings/python/libconcord.py
@@ -973,3 +973,9 @@ mh_set_wifi_config = _create_func(
     _ret_lc_concord(),
     _in('config', POINTER(mh_wifi_config))
 )
+
+# const char *mh_get_serial();
+mh_get_serial = _create_func(
+    'mh_get_serial',
+    c_char_p
+)
diff --git a/libconcord/libconcord.cpp b/libconcord/libconcord.cpp
index c9b97eb..e11c0da 100644
--- a/libconcord/libconcord.cpp
+++ b/libconcord/libconcord.cpp
@@ -229,6 +229,7 @@ int is_mh_pid(unsigned int pid)
         case 0xC124: /* Harmony 300 */
         case 0xC125: /* Harmony 200 */
         case 0xC126: /* Harmony Link */
+        case 0xC12B: /* Harmony Touch */
             return 1;
         default:
             return 0;
@@ -1934,6 +1935,11 @@ int mh_set_wifi_config(const struct mh_wifi_config 
*config)
     return err;
 }
 
+const char *mh_get_serial()
+{
+    return ri.mh_serial.c_str();
+}
+
 /*
  * PRIVATE-SHARED INTERNAL FUNCTIONS
  * These are functions used by the whole library but are NOT part of the API
diff --git a/libconcord/libconcord.h b/libconcord/libconcord.h
index 8e6f7ec..76e3ec8 100644
--- a/libconcord/libconcord.h
+++ b/libconcord/libconcord.h
@@ -527,6 +527,7 @@ int mh_set_cfg_properties(const struct mh_cfg_properties 
*properties);
 int mh_get_wifi_networks(struct mh_wifi_networks *networks);
 int mh_get_wifi_config(struct mh_wifi_config *config);
 int mh_set_wifi_config(const struct mh_wifi_config *config);
+const char *mh_get_serial();
 
 #ifdef __cplusplus
 }
diff --git a/libconcord/remote.h b/libconcord/remote.h
index 549ac88..6027ebe 100644
--- a/libconcord/remote.h
+++ b/libconcord/remote.h
@@ -133,6 +133,8 @@ struct TRemoteInfo {
     uint8_t node_id;
     char *tid;
     char *xml_user_rf_setting;
+    /* Special serial number that some MH remotes use */
+    string mh_serial;
 };
 
 struct THarmonyTime {
diff --git a/libconcord/remote_info.h b/libconcord/remote_info.h
index 72d55d7..fd68264 100644
--- a/libconcord/remote_info.h
+++ b/libconcord/remote_info.h
@@ -129,7 +129,16 @@ static const TModel ModelList[]={
        { MFG_UNK,      "Unknown",                      NULL },
        { MFG_UNK,      "Unknown",                      NULL },
 // 90
-       { MFG_UNK,      "Unknown",                      NULL }
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Unknown",                      NULL },
+       { MFG_UNK,      "Harmony Touch",                NULL }
 };
 
 static const unsigned int max_model=sizeof(ModelList)/sizeof(TModel)-1;
@@ -500,7 +509,7 @@ static const TArchInfo ArchList[]={
                0,                              // eeprom_size
                "",                             // usb
        },
-       /* arch 17: Link */
+       /* arch 17: Link/Touch */
        {
                0,                              // serial_location
                0,                              // serial_address
diff --git a/libconcord/remote_mh.cpp b/libconcord/remote_mh.cpp
index 2670419..cc2e144 100644
--- a/libconcord/remote_mh.cpp
+++ b/libconcord/remote_mh.cpp
@@ -539,6 +539,7 @@ int CRemoteMH::GetIdentity(TRemoteInfo &ri, THIDINFO &hid, 
lc_callback cb,
         }
         make_serial(guid, ri);
     }
+    ri.mh_serial = find_value(identity, "serial_number");
 
     if ((err = reset_sequence(0x01, 0x06)))
         return err;
------------------------------------------------------------------------------
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=84349831&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