个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:Lirc USB-UIRT”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:Lirc USB-UIRT”的源代码
来自Ubuntu中文
←
UbuntuHelp:Lirc USB-UIRT
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/Lirc_USB-UIRT}} {{Languages|UbuntuHelp:Lirc_USB-UIRT}} == Lirc and the USB-UIRT == The USB-UIRT is a usb serial InfraRed device. Support for it is built-in to the kernel via the ftdi_sio driver and usb-serial. In order to make use of it, however, you need to install lirc. To do so, you will need to have '''universe''', and '''multiverse''' enabled. See Ubuntu documentation for more information on [[UbuntuHelp:Repositories/CommandLine#head-e1a24b1b2037f68b5a95f54388582b58ea4c9bd0|enabling|these repositories]]. ==== Install Lirc ==== <pre><nowiki> $ sudo apt-get install lirc </nowiki></pre> == Verify the USB-UIRT is detected == Plug the usb-uirt device into an available usb port. Check dmesg to make sure it was detected and that the tty was created.: <pre><nowiki> $ dmesg | grep -i usb </nowiki></pre> You should see some output that looks like the following.: <pre><nowiki> [ 8.376358] usb 1-2: new full speed USB device using uhci_hcd and address 3 [ 8.558634] usb 1-2: configuration #1 chosen from 1 choice [ 14.943365] usbcore: registered new interface driver usbserial [ 14.943374] drivers/usb/serial/usb-serial.c: USB Serial support registered fo r generic [ 15.043231] usbcore: registered new interface driver usbserial_generic [ 15.043234] drivers/usb/serial/usb-serial.c: USB Serial Driver core [ 15.045761] drivers/usb/serial/usb-serial.c: USB Serial support registered fo r FTDI USB Serial Device [ 15.045790] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected [ 15.045793] drivers/usb/serial/ftdi_sio.c: Detected FT232BM [ 15.045911] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 15.045916] usbcore: registered new interface driver ftdi_sio [ 15.045918] drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver</nowiki></pre> Note the tty that was created. You will use this in the next section. In the above example, it is <code><nowiki>ttyUSB0</nowiki></code>, which appears at <code><nowiki>/dev/ttyUSB0</nowiki></code>. == Configure Lirc hardware.conf == We need to edit the /etc/lirc/hardware.conf file, specifically, the LIRCD_ARGS, LOAD_MODULES and DRIVER variables. Set the LIRCD_ARGS to tell lircd where to find the serial device to use (you should know from the dmesg command in the previous step), set LOAD_MODULES to false and set the DRIVER to uirt2_raw. Like so: <pre><nowiki> # /etc/lirc/hardware.conf # # Arguments which will be used when launching lircd LIRCD_ARGS="-d /dev/ttyUSB0" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD=false #Try to load appropriate kernel modules LOAD_MODULES=false # Run "lircd --driver=help" for a list of supported drivers. DRIVER="uirt2_raw" # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be # automatically used instead DEVICE="" MODULES="" # Default configuration files for your hardware if any LIRCD_CONF="" LIRCMD_CONF="" </nowiki></pre> == Start lircd == Now all you need to do is start lircd and configure remotes in the <code><nowiki>/etc/lirc/lircd.conf</nowiki></code> and <code><nowiki>/etc/lirc/lircrc</nowiki></code> files. <pre><nowiki> $ sudo /etc/init.d/lirc start </nowiki></pre> Don't forget to make sure lirc starts at boot, too. This configuration allows you to both receive and transmit codes. Refer to the other LIRC documentation for instructions on how to test receiving with <code><nowiki>irw</nowiki></code> and transmitting with <code><nowiki>irsend</nowiki></code>. == Newer USB-UIRT Models == It has not been confirmed but some newer USB-UIRT Models may need the usb_uirt_raw driver instead of the uirt2_raw driver <pre><nowiki> # /etc/lirc/hardware.conf # # Arguments which will be used when launching lircd LIRCD_ARGS="-d /dev/ttyUSB0" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD=false #Try to load appropriate kernel modules LOAD_MODULES=false # Run "lircd --driver=help" for a list of supported drivers. DRIVER="usb_uirt_raw" # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be # automatically used instead DEVICE="" MODULES="" # Default configuration files for your hardware if any LIRCD_CONF="" LIRCMD_CONF="" </nowiki></pre> ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:Lirc USB-UIRT
。