I took a look at Shirrif's code. It appears that he is incorrectly decoding the NEC IR protocol. NEC defined the custom code (sometimes called the device number) and data codes (sometimes called function numbers) with the least significant bit sent first in each byte.
So his decode 40BF48B7 turns into 02FD12ED, also known as NEC device 2, function 18. Try that instead. Even better, post the raw IR capture so we can decode the signal.
ETA: See pages 59 and 60 of this document for a
description of the NEC IR protocol (simplest version). You'll see that the least signficant bit is sent first.
Last edited by 3FG on September 7, 2013 14:50.