最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - How to programmatically send IR signals from a mac with lirc - Stack Overflow

programmeradmin0浏览0评论

So I would like to control IR devices from my mac. There is a mac port of the linux lib lirc / On the mac port website it says the Sony Vaio PCVA-IR5U receiver is supported by mac os. So I went on eBay an bought one. When I plug it in, mac os starts the Keyboard Setup Assistant. Sadly the list of devices in /dev stays unchanged. Yet from what I have understood from the lirc docu this is the way lirc would talk to the device. Does that mean apple is not exposing the low level ir driver anymore? I set the driver in lircd.conf to sonyir as described in the lirc setup instructions. Sadly irsend does not recognise any device. But I guess with no low level device exposed this is no surprise. Does anyone use lirc on a mac these days and can share what receiver they are using and how lirc interfaces with it? I'm on an M1 Air runnig Sequoia 15.3

So I would like to control IR devices from my mac. There is a mac port of the linux lib lirc https://ports.macports.org/port/lirc/ On the mac port website it says the Sony Vaio PCVA-IR5U receiver is supported by mac os. So I went on eBay an bought one. When I plug it in, mac os starts the Keyboard Setup Assistant. Sadly the list of devices in /dev stays unchanged. Yet from what I have understood from the lirc docu this is the way lirc would talk to the device. Does that mean apple is not exposing the low level ir driver anymore? I set the driver in lircd.conf to sonyir as described in the lirc setup instructions. Sadly irsend does not recognise any device. But I guess with no low level device exposed this is no surprise. Does anyone use lirc on a mac these days and can share what receiver they are using and how lirc interfaces with it? I'm on an M1 Air runnig Sequoia 15.3

Share Improve this question asked 2 days ago Jonas KreuschJonas Kreusch 3562 silver badges16 bronze badges 2
  • 1 Searching for that device comes up with a receiver, not a transceiver or transmitter. – NickSlash Commented 2 days ago
  • OMG you are right – Jonas Kreusch Commented yesterday
Add a comment  | 

2 Answers 2

Reset to default 0

I maintained the lirc port on MacPorts for a number of years. I never had that Sony Viao device and, honestly, I can't remember why I was convinced that it would work. I only ever used SiliconDust's HDHomeRun device as a IR receiver with MythTV. (For that, it worked well for many years.) However, I'm no longer running MythTV or contributing to MacPorts.

Perhaps if you explain what your overall objective is, we may be able to point you towards a better solution.

Possible Issues & Solutions

  1. macOS May Not Expose the IR Device Properly

macOS might not expose low-level IR drivers the same way Linux does. You can check this by running:

ioreg -p IOUSB -l

This will list connected USB devices and help determine if macOS detects the IR receiver at all.

  1. Check If LIRC Is Installed and Working

Ensure LIRC is installed using MacPorts:

sudo port install lirc

Verify that lircd is running correctly:

ps aux | grep lircd

  1. Check /dev for IR Devices

If the device isn’t listed in /dev, macOS may not be exposing it properly. Try:

ls /dev

Look for IR-related devices like /dev/ttyUSB0 or /dev/hidraw*.

  1. Try Manually Loading the Driver

If macOS doesn't detect the IR device, try using kextload:

sudo kextload /System/Library/Extensions/IOUSBFamily.kext

(Note: This may not work on macOS versions with strict driver signing.)

  1. Configure LIRC Properly

Ensure the lircd.conf file is correctly set for the Sony IR receiver.

Run:

sudo lircd --device=/dev/

(Replace with the correct device path.)

Alternative Solutions

If LIRC does not work on macOS, consider using:

A Raspberry Pi with LIRC and sending IR commands remotely.

Flirc USB IR Transmitter, which works natively with macOS.

发布评论

评论列表(0)

  1. 暂无评论