树莓派红外接收器录制遥控器按键问题分析

pi@4b:~ $ irrecord -d /dev/lirc0 ~/lircd.conf
Using driver default on device /dev/lirc0

irrecord -  application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)

This program will record the signals from your remote control
and create a config file for lircd.

A proper config file for lircd is maybe the most vital part of this
package, so you should invest some time to create a working config
file. Although I put a good deal of effort in this program it is often
not possible to automatically recognize all features of a remote
control. Often short-comings of the receiver hardware make it nearly
impossible. If you have problems to create a config file READ THE
DOCUMENTATION at https://sf.net/p/lirc-remotes/wiki

If there already is a remote control of the same brand available at
http://sf.net/p/lirc-remotes you might want to try using such a
remote as a template. The config files already contains all
parameters of the protocol used by remotes of a certain brand and
knowing these parameters makes the job of this program much
easier. There are also template files for the most common protocols
available. Templates can be downloaded using irdb-get(1). You use a
template file by providing the path of the file as a command line
parameter.

Please take the time to finish the file as described in
https://sourceforge.net/p/lirc-remotes/wiki/Checklist/ an send it
to  <lirc@bartelmus.de> so it can be made available to others.

Press RETURN to continue.

Checking for ambient light  creating too much disturbances.
Please don't press any buttons, just wait a few seconds...

No significant noise (received 0 bytes)

Enter name of remote (only ascii, no spaces) :changhong
Using changhong.lircd.conf as output filename

Now start pressing buttons on your remote control.

It is very important that you press many different buttons randomly
and hold them down for approximately one second. Each button should
generate at least one dot but never more than ten dots of output.
Don't stop pressing buttons until two lines of dots (2x80) have
been generated.

Press RETURN now to start recording.
................................................................................
Got gap (108767 us)}

Please keep on pressing buttons like described above.
Cannot find any gap, using an arbitrary 50 ms one. If you have a
regular remote for e. g., a TV or such this is probably a point
where you hit control-C. However, technical hardware like air
condition gear often works without any gap. If you think it's
reasonable that your remote lacks gap you can proceed.
Press RETURN to continue.


Please enter the name for the next button (press <ENTER> to finish recording)
KEY_POWER

Now hold down button "KEY_POWER".
Something went wrong: Cannot decode data
Please try again. (28 retries left)

Now hold down button "KEY_POWER".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_MENU

Now hold down button "KEY_MENU".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_BACK

Now hold down button "KEY_BACK".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_VOLUMEUP

Now hold down button "KEY_VOLUMEUP".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_VOLUMEDOWN

Now hold down button "KEY_VOLUMEDOWN".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_PLAY

Now hold down button "KEY_PLAY".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_LEFT

Now hold down button "KEY_LEFT".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_RIGHT

Now hold down button "KEY_RIGHT".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_UP

Now hold down button "KEY_UP".

Please enter the name for the next button (press <ENTER> to finish recording)
KEY_DOWN

Now hold down button "KEY_DOWN".

Please enter the name for the next button (press <ENTER> to finish recording)

Checking for toggle bit mask.
Please press an arbitrary button repeatedly as fast as possible.
Make sure you keep pressing the SAME button and that you DON'T HOLD
the button down!.
If you can't see any dots appear, wait a bit between button presses.

Press RETURN to continue.
....Cannot find any toggle mask.

Successfully written config file changhong.lircd.conf
pi@4b:~ $ cat changhong.lircd.conf

# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.10.1(default) on Tue Apr 14 19:16:49 2020
# Command line used: -d /dev/lirc0 /home/pi/lircd.conf
# Kernel version (uname -r): 4.19.97-v7l+
#
# Remote name (as of config file): changhong
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  changhong
  bits            0
  flags CONST_LENGTH
  eps             0
  aeps            0

  one             0     0
  zero            0     0
  gap          50000
  toggle_bit_mask 0x0
  frequency    38000

      begin codes
          KEY_POWER                0x0
          KEY_MENU                 0x0
          KEY_BACK                 0x0
          KEY_VOLUMEUP             0x0
          KEY_VOLUMEDOWN           0x0
          KEY_PLAY                 0x0
          KEY_LEFT                 0x0
          KEY_RIGHT                0x0
          KEY_UP                   0x0
          KEY_DOWN                 0x0
      end codes

end remote

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值