Is it possible to scan through all IR codes to find functional ones for a device. It might mean being able to send codes from different protocols in the same sketch which I'm not sure about.
Also I'm not sure about the functions to use the sketch. Adding 1 to a code and waiting a short time before adding 1 again may be ideal and possibly have a pause/resume button to make notes of anything that works.
I've never been able to get my head around using count functions and I think that is probably the best way so help would be nice. Thanks. 
It may well be possible to program an Arduino to scan all codes, but for example, a 32-bit code would mean there are umpty-million combinations to try multiplied by the number of different protocols.
If you gave yourself 2 seconds to decide if a code worked (the device responded), it would take umpty-septillion hours to complete the task.
In other words, don't bother. Search online for the right codes for your device(s), it will be quicker (even if it takes a year or two).
If you have a working remote for the device, build an IR reader to get the info you want.
Have a look at A Multi-Protocol Infrared Remote Library for the Arduino
Happy hunting!
Thanks for the reply. The issue is there isn't a remote. It's an Android tv type device with an IR reciever and people have said it reacts with some remotes but they are unable to capture the codes.
There are some files on the device for Sunxi IR (.ko files) which I thought I'd try reading in Linux but they just show lots of symbols in Nano so I don't think that is the answer.
Maybe if the skecth scanned through codes with 100 ms delay and a button records the most recent code when presssed. Then work backwards til something works. Means it wouldn't take forever, just with more work on my part.
With a 100ms interval, scanning every combination of a 32-bit protocol will take 13.6 years.
I'll check back on this thread in a couple of years to see how you're getting on. 