Re: [concordance-devel] [Harmony 555] learning IR codes doesn't work

2009-04-26 Thread Andreas Schulz
On Sunday 26 April 2009, Michael Frase wrote:
> I have sent you a private mail with attached wireshark log. Did you
> receive it?
> Please have a look at it, if you have time.
> Michael

Yes, sorry for the delay, but I have been busy with other stuff
(plus, as I might have told already, I have always to convince
the rest of our family first to leave me the Harmony for some
testing). 
I don't see any obvious problem in the log you sent to me,
except that it fails to return to the keys status page for
some reason.

I have been able to do some more testing, but always failed to
fail so far:
I tried with my LINUX (Mandriva cooker system , KDE 4.2.2):
- works with Konqueror web browser, difference to your log is that 
  konqueror does not always load all these .css and .js files 
  again for the AutoLaunch_Refresh.asp
- works with firefox (3.0.8), which always reloads the .css and .js
  files, like your browser
- with Javascript disabled in firefox, I get a notification page from
  Logitech that Javascript is disabled, but after I clicked on 
  'Continue' button, the page confirms that the key has been learned.
- works also with epiphany (gnome browser, started from KDE).

So, I'm running out of ideas about what might be your problem.
Did you already succeed  to update your remote with concordance, 
or at least manage to pass the connectivity check before?

BTW: It is definitely NO good idea to tell your browser to always open
 .EZTut with just concordance - this will run concordance in the
 background and you have no access to the interactive part.
 For firefox, this almost in an instance blew my .xession-errors
 file with a gazillion of input prompt lines, until it filled up
 my home partition...

With Javascript initially disabled, I don't even get further than the
initial page of myremotesetup.com, telling me that my software has to
be updated..
Just of curiosity - there is also no way to get past the first page with 
lynx (ASCII-browser) - not actually a surprise...

Regards,
Andreas


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


[concordance-devel] Patch: concordance: Pronto code input

2009-04-26 Thread Andreas Schulz
OK, here we go..
This is against the CVS as of today (26.04.2009).
In contrast to my first approach, there is now a module
prontocodes that is statically linked to concordance and
provides just the basic stuff to convert pronto hex codes.

It will only accept raw modulated hex format, i.e. Pronto
codes starting with  
The complete hex code must be input as a single line of 
hexadecimal words, separated by blanks (which seems to be 
the usual format of these codes), without any number base 
markers (like 0x or h), just like:
 1234 5678 9ABC DEF0 

See attachments for the patch to concordance (concordance-pronto.patch)
and the additional static library prontocodes.h/.c.

Judging from a few quick tests, the uploaded code created from the
entered pronto code seems to be OK (verified code received by lirc,
but not yet with any real devices).

Andreas

/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *  (C) Copyright Andreas Schulz 2008
 *
 * Credits go to Evgueni Oulianov (eoulia...@hotbox.ru) for his
 * excellent document about the different Pronto IR formats,
 * which can be found e.g at:
 * http://www.hifi-remote.com/infrared/prontoirformats.pdf
 */

#ifndef PRONTOCODES_H
#define PRONTOCODES_H

#ifndef uint32_t
#define uint32_t unsigned int
#endif

/*
 * return codes:
 */
#define PCO_RETURN_OK 0
#define PCO_ERROR_BAD_CODE1  /* could not find all required values */
#define PCO_ERROR_OUTOFMEM2  /* failed to malloc returned arrays */
#define PCO_ERROR_NOT_IMPL   11  /* not yet implemented */

/*
 * Translate a return value into an actual error message. Pass 
 * in the int you received, get back a string.
 */
const char *pco_strerror(int err);

/*
 * Native Pronto code data structure. For raw format, once/repeat_signal
 * contain word pairs for mark/space durations (in carrier clock cycles).
 *
 * Note: the internal Pronto format header counts mark/space pairs; for
 *   convenience, we count total marks + spaces instead , i.e. twice
 *   the Pronto counts.
 * 
 * For decoded formats, format_id determines the encoding and once/
 * repeat_signal contain the corresponding address/command codes 
 * (or whatever data is needed for the specific encoding):
 * For reference, the original names from Evgueni's document have
 * been added in brackets <>:
 *
 * format_id :
 *   determines format (raw or several decoded)
 * carrier_clock_divider :
 *   IR carrier clock in internal units
 * once_signal_length:
 *   length of once_signal (total of marks+spaces -> even number)
 * repeat_signal_length  :
 *   length of repeat_signal (total of marks+spaces -> even number)
 * *once_signal  *:
 *   sequence to send once for command execution
 * *repeat_signal*:
 *   sequence to send repeatedly for command repetition
 */

struct pco_pronto_code {
	uint32_t format_id;
	uint32_t carrier_clock_divider;
	uint32_t once_signal_length;
	uint32_t repeat_signal_length;
	uint32_t *once_signal;
	uint32_t *repeat_signal;
};

/*
 * Provide interface to deallocate unused allocated memory:
 */
void pco_delete_ir_signal(uint32_t* ir_signal);
void pco_delete_pronto_code(struct pco_pronto_code pronto_code);

/*
 * Read from string:
 * Allocates memory for once/repeat_signal in result, caller is responsible
 * for deallocation.
 */
int pco_sscanf_pronto_code(char *source, struct pco_pronto_code *result);

/*
 * Decode from Pronto format to IR signal mark/space stream and carrier
 * clock. repetitions determines the repetitions of repeat_signal part of
 * the pronto code - 0 means that repeat_signal is not included at all.
 * Allocates memory for the returned ir_signal, caller is responsible 
 * for deallocation.
 */
int pco_pronto_to_ir_signal(
	struct pco_pronto_code source, uint32_t repetitions,
	uint32_t *carrier_freq,
	uint32_t **ir_signal, uint32_t *ir_signal_length);

#endif
/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope t

Re: [concordance-devel] [Harmony 555] learning IR codes doesn't work

2009-04-26 Thread Phil Dibowitz
Michael Frase wrote:
> Am Mittwoch, den 22.04.2009, 01:00 +0200 schrieb Andreas Schulz:
>> OK, I tried, and it works for me.
>> I created a new dummy device in my config:
>> Home Appliance - zzz-testing Home Appliance (just4test) 
>> and learned a few keys from some other remote (power, 1,2,3).
>> All these keys show up as 'your original remote' in light blue
>> in the keys table.
>> After I updated my 785, just these learned keys worked
>> (verified with lirc).
>>
>> I am using the current CVS versions of libconcord and
>> concordance with LINUX.
>>
>> My first idea was that Logitech may have rejected your 
>> code because of too many repetitions of the signal, but
>> I successfully taught the remote even longer signals.
>>
>> If you can handle ethereal/wireshark, you may want to check
>> if you find something like the following after the learned 
>> key has been uploaded:
>>
>> Source  Destination  Protocol Info
>>74.217.80.10 HTTP POST
>> /EasyZapper/New/ProcDigitizeInfrared/LearnIr_Receive.asp HTTP/1.1 
>> (application/x-www-form-urlencoded)
>>74.217.80.10 HTTP GET
>> /EasyZapper/New/Display.asp?TargetUrl=/EasyZapper/New/Downloader/
>>  AutoLaunch_Refresh.asp HTTP/1.1
>> 74.217.80.10HTTP/XML HTTP/1.1 200 OK
>>
>> Andreas
> 
> I have sent you a private mail with attached wireshark log. Did you
> receive it?
> Please have a look at it, if you have time.

Andreas,

Thanks for looking into this. Let me know if you need help.

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

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] [Harmony 555] learning IR codes doesn't work

2009-04-26 Thread Michael Frase
Am Mittwoch, den 22.04.2009, 01:00 +0200 schrieb Andreas Schulz:
> OK, I tried, and it works for me.
> I created a new dummy device in my config:
> Home Appliance - zzz-testing Home Appliance (just4test) 
> and learned a few keys from some other remote (power, 1,2,3).
> All these keys show up as 'your original remote' in light blue
> in the keys table.
> After I updated my 785, just these learned keys worked
> (verified with lirc).
> 
> I am using the current CVS versions of libconcord and
> concordance with LINUX.
> 
> My first idea was that Logitech may have rejected your 
> code because of too many repetitions of the signal, but
> I successfully taught the remote even longer signals.
> 
> If you can handle ethereal/wireshark, you may want to check
> if you find something like the following after the learned 
> key has been uploaded:
> 
> Source  Destination  Protocol Info
>74.217.80.10 HTTP POST
> /EasyZapper/New/ProcDigitizeInfrared/LearnIr_Receive.asp HTTP/1.1 
> (application/x-www-form-urlencoded)
>74.217.80.10 HTTP GET
> /EasyZapper/New/Display.asp?TargetUrl=/EasyZapper/New/Downloader/
>   AutoLaunch_Refresh.asp HTTP/1.1
> 74.217.80.10HTTP/XML HTTP/1.1 200 OK
> 
> Andreas

I have sent you a private mail with attached wireshark log. Did you
receive it?
Please have a look at it, if you have time.


Michael

> 
> On Tuesday 21 April 2009, Michael Frase wrote:
> > Thanks for your investigation.
> >
> > Verbose output:
> >
> > $ concordance -v LearnIr.EZTut
> > Concordance 0.21
> > Copyright 2007 Kevin Timmerman and Phil Dibowitz
> > This software is distributed under the GPLv3.
> >
> > Requesting Identity: 100% done
> > Received file contains 1 key names to be learned.
> >
> > Key name :  :
> > [L]earn, [N]ext, [P]revious, [Q]uit (L)?
> >
> > press corresponding key on original remote within 5 sec:
> > Learning IR signal:  100% done
> >
> > ASCII-graph of received IR signal:
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> > ##_#_#_#_#_##_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#
> >
> > Carrier clock  : 36144 Hz
> > Total mark/space pairs : 192
> >
> > [U]pload new code, [R]etry same key, [N]ext key, [Q]uit (U)?
> >
> > Upload to website:   100% done
> > Last key in list!
> >
> > Key name :  :
> > [L]earn, [N]ext, [P]revious, [Q]uit (L)?Q
> > Success!
> 
> 
> --
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> ___
> concordance-devel mailing list
> concordance-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/concordance-devel


--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel