OK, here's a new patch to try. This might hopefully fix the issue with
being able to do repeated GetIdentity calls. I am skipping the read of
the /cfg/usercfg which seems to be where things start to go wrong.
I also pushed a fix for mhgui for the traceback you were getting (but not
that it was really impacting anything). It basically was just preventing
the busy indicator from being shown.
Now, I took a look at your wireshark captures. Unfortunately, it appears
that for the Touch they are not using the same mechanism to update the
configuration that the other MH remotes use (/cfg/usercfg). They are
using some other thing (/sys/hlapi) that they keep reading and writing
too. Unfortunately, this is going to make it a bit trickier to get this
working. In order to figure this out, I'm probably going to need to see
the https traffic between the Silverlight app and the web service. If you
are up for it, could you install something like Fiddler (fiddler2.com)
that can capture https traffic. Then, capture all of the traffic going to
*.myharmony.com while you are doing a configuration update (and preferably
the USB traffic at the same time).
Thanks,
Scott
On Fri, 13 Dec 2013, Cédric de Launois wrote:
Hi Scott,
The result is quite encouraging.
Regarding libconcord, the GetIdentity seems to work :
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 (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 (ReadFile): msg_read_file
DEBUG (debug_print_packet): ff 01 83 02 01 00 04 00 00 00 da 00 00 00 00 00
DEBUG (ReadFile): msg_ack
DEBUG (debug_print_packet): ff 04 84 02 01 00 01 05 00 00 00 00 00 00 00 00
DEBUG (debug_print_packet): 85 be 66 65 61 74 75 72 65 20 49 6e 66 72 61 72
DEBUG (debug_print_packet): 86 be 20 32 30 31 32 30 39 30 33 31 39 34 32 35
DEBUG (debug_print_packet): 87 be 62 5f 76 65 6e 64 6f 72 5f 69 64 20 30 78
DEBUG (debug_print_packet): 88 a0 5f 74 79 70 65 20 68 69 64 0a 6c 69 6e 6b
DEBUG (ReadFile): data_read=218
DEBUG (reset_sequence): msg_reset_seq
DEBUG (debug_print_packet): ff 07 85 01 01 00 00 00 00 00 00 00 00 00 00 00
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
Requesting identity: 50% DEBUG (GetIdentity): msg_read_config
DEBUG (debug_print_packet): ff 01 ff 01 01 0b 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): ri.config_bytes_used = 4
100% done
DEBUG (reset_sequence): msg_reset_seq
DEBUG (debug_print_packet): ff 07 ff 01 01 04 00 00 00 00 00 00 00 00 00 00
Model: Unknown Harmony Touch
Skin: 99
Firmware Version: 3.4
Firmware Type: 0
Hardware Version: 1.0.0
External Flash: 512 KiB - FF:12 25F040
Architecture: 17
Protocol: 9
Manufacturer: Logitech
Product: Harmony Remote
IRL, ORL, FRL: 64, 64, 0
USB VID: 046D
USB PID: C12B
USB Ver: 1099
Serial Number: 20120903194257-026202
Config Flash Used: 0% (1 of 512 KiB)
Success!
However, issuing a second concordance -i -v always fail :
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 (HID_WriteReport): Failed to write to device: -110 (Connection timed
out)
DEBUG (GetIdentity): Failed to write to remote
ERROR: failed to requesting identity
Failed with error 1
I need to disconnect the USB and reconnect it to get it work again.
Regarding mhgui, it now detects my configuration, but issues the following
error messages :
Traceback (most recent call last):
File "/usr/local/bin/mhgui", line 2667, in _OnNext
if self.cur_page.OnNext():
File "/usr/local/bin/mhgui", line 248, in OnNext
BackgroundTask((self.DoLogin, username, password), (self.FinishLogin,))
File "/usr/local/bin/mhgui", line 117, in __init__
self.throbber = ThrobberDialog(throbberTitle)
File "/usr/local/bin/mhgui", line 90, in __init__
self.FindGif("throbber.gif"))
File "/usr/local/bin/mhgui", line 98, in FindGif
appdir = os.path.abspath(os.path.dirname(sys.argv[0]))
IndexError: list index out of range
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 "/usr/local/bin/mhgui", line 132, in ThreadDoneFunction
self.onDoneFunction(bgFuncResult, *self.onDoneFunctionArgs)
File "/usr/local/bin/mhgui", line 256, in FinishLogin
self.parent._SetPage(self.next, True, True)
File "/usr/local/bin/mhgui", line 2721, in _SetPage
(page, data) = self.cur_page.OnActivated(prev_page, data)
File "/usr/local/bin/mhgui", line 343, in OnActivated
BackgroundTask((self.LoadData,), (self.LoadDataUI,), False)
File "/usr/local/bin/mhgui", line 117, in __init__
self.throbber = ThrobberDialog(throbberTitle)
File "/usr/local/bin/mhgui", line 90, in __init__
self.FindGif("throbber.gif"))
File "/usr/local/bin/mhgui", line 98, in FindGif
appdir = os.path.abspath(os.path.dirname(sys.argv[0]))
IndexError: list index out of range
These errors do not seem to have any impact tough.
The Remote is correctly detected by mhgui (but the serial is still 'None') :
Model: Harmony Touch ()
USB HID Model: Logitech Harmony Remote
Serial:
None
None
None
Arch:17 Proto:9 Skin:99
Firmware type:0, version 3.4
HW version 1.0
Flash Manufacturer:255 ID:18 Part:25F040 Size:512K
USB HID Irl:64 Orl:64 Frl:0
USB VID:046d PID:c12b BCD:1099
Config used 4 / total 524288 = 0%
Firmware updates: NOT supported
However, the writing of the config does not work :
Error while writing to the remote
(libconcord function update_configuration error 4)
Traceback (most recent call last):
File "/usr/local/bin/congruity", line 715, in _WorkerFunction
self._WorkerFunctionBody()
File "/usr/local/bin/congruity", line 844, in _WorkerFunctionBody
0
File "/usr/local/lib/python2.7/dist-packages/libconcord.py", line 124, in
__call__
raise LibConcordException(self.func_name, result)
LibConcordException: libconcord function 'update_configuration' failed with
error code 4 ('Error while writing to the remote')
libconcord says :
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 (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 (ReadFile): msg_read_file
DEBUG (debug_print_packet): ff 01 83 02 01 00 04 00 00 00 da 00 00 00 00 00
DEBUG (ReadFile): msg_ack
DEBUG (debug_print_packet): ff 04 84 02 01 00 01 05 00 00 00 00 00 00 00 00
DEBUG (debug_print_packet): 85 be 66 65 61 74 75 72 65 20 49 6e 66 72 61 72
DEBUG (debug_print_packet): 86 be 20 32 30 31 32 30 39 30 33 31 39 34 32 35
DEBUG (debug_print_packet): 87 be 62 5f 76 65 6e 64 6f 72 5f 69 64 20 30 78
DEBUG (debug_print_packet): 88 a0 5f 74 79 70 65 20 68 69 64 0a 6c 69 6e 6b
DEBUG (ReadFile): data_read=218
DEBUG (reset_sequence): msg_reset_seq
DEBUG (debug_print_packet): ff 07 85 01 01 00 00 00 00 00 00 00 00 00 00 00
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): msg_read_config
DEBUG (debug_print_packet): ff 01 ff 01 01 0b 00 00 00 00 00 00 00 00 00 00
DEBUG (GetIdentity): ri.config_bytes_used = 4
DEBUG (reset_sequence): msg_reset_seq
DEBUG (debug_print_packet): ff 07 ff 01 01 04 00 00 00 00 00 00 00 00 00 00
DEBUG (HID_ReadReport): Timeout on interrupt read from device
DEBUG (UpdateConfig): Failed to read from remote
That's it. Thanks already for your work !
Tell me if you want me do something (but I won't have much time this WE).
Regards,
Cedric
2013/12/12 Cédric de Launois <cedric.delaun...@gmail.com>
I'll try your patch and let you know. Thanks a lot already !
2013/12/12 Scott Talbert <s...@techie.net>
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
---------------------------------------------------------------------------
---
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 d73aabfeee2a6bb4a8eb1f549a5122ec049b9db0
Author: Scott Talbert <s...@techie.net>
Date: Wed Dec 11 18:22:31 2013 -0500
Attempt at supporting the Harmony Touch (v3).
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.
Don't try to read the /cfg/usercfg on the Link/Touch.
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..81f27a6 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_HAR, "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..7f2638c 100644
--- a/libconcord/remote_mh.cpp
+++ b/libconcord/remote_mh.cpp
@@ -493,38 +493,6 @@ int CRemoteMH::GetIdentity(TRemoteInfo &ri, THIDINFO &hid,
lc_callback cb,
setup_ri_pointers(ri);
- if (cb) {
- cb(cb_stage, cb_count++, 1, 2, LC_CB_COUNTER_TYPE_STEPS, cb_arg, NULL);
- }
-
- // Send the read config message to find the config bytes used.
- const uint8_t msg_read_config[MH_MAX_PACKET_SIZE] =
- { 0xFF, 0x01, 0x00, 0x03, 0x80, '/', 'c', 'f', 'g', '/',
- 'u', 's', 'e', 'r', 'c', 'f', 'g', 0x00, 0x80, 'R', 0x00 };
- if ((err = HID_WriteReport(msg_read_config))) {
- debug("Failed to write to remote");
- return LC_ERROR_WRITE;
- }
-
- if ((err = HID_ReadReport(rsp))) {
- debug("Failed to read from remote");
- return LC_ERROR_READ;
- }
- debug("msg_read_config");
- debug_print_packet(rsp);
-
- // In ReadFlash() we add an extra four bytes to the end of the config file
- // buffer, so we include space for those bytes here.
- ri.config_bytes_used = (rsp[7] << 24) + (rsp[8] << 16) + (rsp[9] << 8)
- + rsp[10] + 4;
- debug("ri.config_bytes_used = %d", ri.config_bytes_used);
- ri.max_config_size = (ri.flash->size << 10);
- ri.valid_config = 1;
-
- if (cb) {
- cb(cb_stage, cb_count++, 2, 2, LC_CB_COUNTER_TYPE_STEPS, cb_arg, NULL);
- }
-
string guid_str = find_value(identity, "guid");
if (guid_str.length() >= 98) {
uint8_t guid[48];
@@ -539,9 +507,45 @@ 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;
+ if (cb) {
+ cb(cb_stage, cb_count++, 1, 2, LC_CB_COUNTER_TYPE_STEPS, cb_arg, NULL);
+ }
+
+ /* Arch 17 (Link/Touch) don't have the '/cfg/usercfg' so don't read it */
+ if (ri.architecture != 17) {
+ // Send the read config message to find the config bytes used.
+ const uint8_t msg_read_config[MH_MAX_PACKET_SIZE] =
+ { 0xFF, 0x01, 0x00, 0x03, 0x80, '/', 'c', 'f', 'g', '/',
+ 'u', 's', 'e', 'r', 'c', 'f', 'g', 0x00, 0x80, 'R', 0x00 };
+ if ((err = HID_WriteReport(msg_read_config))) {
+ debug("Failed to write to remote");
+ return LC_ERROR_WRITE;
+ }
+
+ if ((err = HID_ReadReport(rsp))) {
+ debug("Failed to read from remote");
+ return LC_ERROR_READ;
+ }
+ debug("msg_read_config");
+ debug_print_packet(rsp);
+
+ if ((err = reset_sequence(0x01, 0x06)))
+ return err;
+
+ // In ReadFlash() we add an extra four bytes to the end of the config
+ // file buffer, so we include space for those bytes here.
+ ri.config_bytes_used = (rsp[7] << 24) + (rsp[8] << 16) + (rsp[9] << 8)
+ + rsp[10] + 4;
+ debug("ri.config_bytes_used = %d", ri.config_bytes_used);
+ ri.max_config_size = (ri.flash->size << 10);
+ }
+ ri.valid_config = 1;
+
+ if (cb) {
+ cb(cb_stage, cb_count++, 2, 2, LC_CB_COUNTER_TYPE_STEPS, cb_arg, NULL);
+ }
return 0;
}
------------------------------------------------------------------------------
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