In the firmware, look for REMIN_ISR; I believe we can see something
interesting at the structure from 0x2a90 (550D), or 0x2c18 (60D).
Debug code (put it in debug_loop_task and see if it reacts to remote
bmp_hexdump(FONT_SMALL, 0, 20, 0x2a90, 32*10);
See also http://www.lirc.org/ .
> To post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en
There is a counter of how many pulses were received, at 0x2ac8 on 550D.
I believe the first one is an interrupt handler triggered by some kind
of pulse, on both transitions (0->1 and 1->0). Here, you'll see a
state machine which looks for a signal like this:
The timestamps for these 4 transitions are saved in:
NSTUB( 0x2E6AC, remocon_timing_struct.t0_digic_time_maybe)
NSTUB( 0x2E6B0, remocon_timing_struct.1stpulse_digic_time)
NSTUB( 0x2E6B4, remocon_timing_struct.sigwait_digic_time)
NSTUB( 0x2E6B8, remocon_timing_struct.2ndpulse_digic_time)
Values are in DIGIC_TIME units, see AJ_guess_get_DIGIC_time.
#define MAX_DIGIC_TIME (0xFFFFF)
unsigned int time_ms = (999 * digic_time) / MAX_DIGIC_TIME;
Then, after 38ms from the last signal transition, [REM]RemTimeOut
checks pulse widths against some predefined values, prints some
messages, and if everything is OK, it calls the function stored at
NSTUB( 0x2A9C, remocon_struct.handler_function_maybe)
which is ff07bfbc, and seems to send an event into MainCtrl message
queue. The event contains a pointer to FF07BF00
which turns off IR remote, calls 0xff05a628 (which was named
secret_mode, not sure why), and then it turns on IR remote again.
So probably 0xff05a628 does the remote control action (take a
picture, record a movie maybe?), but I don't understand how it works;
at some point, it reaches something from Siodriver.c.
Now... newbie question (I don't have a Canon infrared remote, but I'll
get one if there is any interest in using it). What can you do with
it? Only take pictures, or also record movies or change any settings?
Sent from my iPhone.
This page has some information about how to interpret lirc remote config files
Having read this page http://www.arcfn.com/2010/03/understanding-sony-ir-remote-codes-lirc.html in more detail, I would say a good goal would be to implement the sony 12/15/20-bit protocol. This protocol is used in many remotes, which are easy to find, and cheap to buy second hand.
The IR pulses are received least significant bit first, which once received and the order reversed, the code can be determined depending on the number of bits.
12 bit codes have 5 device bits followed by 7 command bits. 15 bit codes have 8 device bits, and 7 command bits. Finally 20 bit codes have 5 device, 8 extended device, and 7 command bits.
Once understood in this form the commands are easily found at this website http://www.hifi-remote.com/sony/
eg a sony TV power button could be represented as 1.21(a 12 bit code)
a camcorder record button might be 22.101.29 (I assume an example of a 20 bit code)
This should allow a fairly extensive range of remotes to be supported with just a few entries in magic.cfg
#example magic.cfg entry for sony VCR/Camcorder remote control record button
remote.record = 22.101.29
With a defined protocol, it would be easier to display these codes on the camera, or log them to a file. Since they are now sensible data not just strings of bits.
This would make getting your sony remote to work with your camera a fairly quick process.
One final note, IR codes are typically modulated at 40kHz. These should be demodulated by the receiver, and not a concern as far as programming. But might be worth watching out for.
On 22/07/2011, at 10:26 AM, Sherry wrote: