I was taking a photo of our test equipment in the lab with my trusty Fairphone 4 earlier this afternoon when a 950 nm IR detector nearby went off as soon as I opened the camera app. Sure enough, when filming the Fairphone’s camera with another phone that sees near infrared, a blue dot appears.
I’m almost certain this is the autofocus rangefinder. But I’m not 100% sure because the camera is still able to focus when I mask it.
I have two questions:
Can I turn it off? It messes with our equipment. I tried to turn off the autofocus function in the camera app but that doesn’t do it. The only way to turn it off is to go into the camera app settings or exit the app altogether. Of course I can put a piece of electrical tape over it but where’s the fun in that…
Can I control this IR LED directly with software - ideally bypass whatever chip uses it to do whatever it’s doing and bit-bang it? If was directly controllable somehow, it would open up the possibility of turning it into an IR blaster and using the Fairphone as a remote - or better, as a TV-B-Gone
I doubt the chip is exposed in any meaningful way. I mean assuming it’s even possible drive the laser directly - and looking at the datasheet, I didn’t find anything to indicate that it’s even possible - I suppose one would have to write a driver to talk to the chip, or extend the existing one which probably only exposes a higher level distance measurement sort of API. All this sounds unlikely and not convenient for the purpose of making a simple IR blaster app…
I guess the only way to turn it on and off -ish with a simple app without rooting the phone and installing kernel-level stuff (i.e. stuff nobody will ever do) is to enable or disable measurements like a camera app would, but that’s almost certainly not fast enough to create a modulated 38 kHz carrier. Oh well.
True. Unfortunately it’s well hidden, because else you could do some amusing stuff with it, like for instance use it to “see” in total darkness! (Not very far, but good enough to walk around in a dark room using the depth image of your surroundings.)
AFAIK there was a hack back then allowing to do so, but it disappeared (?), or stopped working (?), at some point 1-2 years ago.
A pity, it would had been an amusing gadget to have (although there could be some legal issues in some countries?).