Connect IR transmitter to GPIO and blast IR signals

If I connect an IR transmitter (like the one in the picture below) to the GPIO of my VIM3 then how do I make it visible as a device under Linux so I can actually send IR signals with it? Is a kernel module needed for this and is it available?

From what I gathered ir-ctl seems to be the most robust solution in modern kernels with a simple command too (e.g. ir-ctl -S rc5:0x1234) but I guess LIRC (with irsend command) could be an option too.

IR transmitter (is this suitable to connect to GPIO?)

you could, what kind of pin does it use? Regular GPIO ? It only says dat on the data pin, maybe its regular digital pin. what do you plan on doing, I could try to help you.

if you don’t have one yet, that is, the options are easier :slightly_smiling_face:

yes but you can save a few USB ports with one that uses GPIO, and Atleast have an excuse to use the GPIO :smile:

how do you like that? :grin:

Those just repeat incoming IR signals (only useful when your devices are hidden in your TV cabinet), the USB is just for power. It’s not possible to send IR commands from USB. So that makes it useless for me, unfortunately.

For example:
https://www.aliexpress.com/item/4000116954669.html
https://www.aliexpress.com/item/33052915347.html
https://www.aliexpress.com/item/32993940926.html
https://www.aliexpress.com/item/32730703435.html

@Electr1 what I’m trying to do is control my sound system at certain events (e.g. turn it on when my VIM3 turns on). So I want to run a script at boot that sends an IR signal to turn my sound system on. I’m running CoreELEC on my VIM3.

Ok shouldn’t be hard

Whoa !, that’s way too much data bandwidth :laughing:
That’s like stuffing a 6 lane highway through a crooked street !
Massive bottleneck if connected to a USB 2.0 port, but would fare better on the USB 3.0 port :slightly_smiling_face:

@jant90,
Here is a baseplan of what needs to be done,

1. Identify whether the module exists, if not it needs to be added,

2. create a script which runs at startup to send a turn on data packet
also a turn off data packet when shutting down

3. Test it and debug any errors in it

I have no Idea about working with CoreElec but I could learn about it in the process, If it was ubuntu it might have been a bit easier, but not a problem

Well at least for the Raspberry Pi there are modules available (gpio-ir-recv, gpio-ir, pwm-ir-tx). And on LibreELEC they can be activated through dtoverlay configuration option (https://wiki.libreelec.tv/infrared_remotes#gpio_ir_receiver_on_rpi). I can’t find those modules in my CoreELEC install though.

But are these modules RPi-specific or can they be used for the VIM3’s GPIO as well? Module source can be found here I believe: https://github.com/torvalds/linux/tree/master/drivers/media/rc.

they could be compatible but the GPIO pin number will change, we will have to deal with that.

We will definitely have to rebuild the image with the module installed as in raspi you could do dtoverlay, but here you have to physically change it for a new image.

1 Like

Some more information and links here:
https://forum.libreelec.tv/thread/22005-ir-blaster-to-on-and-off-tv/?postID=140867#post140867

Should be possible from what I understand but this goes above my head unfortunately.