3

i am getting error while sending irsend command.

Issue: i am typing following command

sudo irsend SEND_ONCE tank KEY_9

and getting following output:

irsend: command failed: SEND_ONCE tank KEY_9
irsend: unknown remote: "tank"

my conf file is stored at: "/home/pi/lircd.conf" and contents are:

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Sun Apr 24 11:23:11 2016
#
# contributed by 
#
# brand:                       /etc/lirc/myremote.conf
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  tank
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8964  4451
  one           583  1650
  zero          583   539
  ptrail        581
  repeat       8963  2229
  pre_data_bits   16
  pre_data       0xFF
  gap          107449
  toggle_bit_mask 0x0

      begin codes
          KEY_0                    0xD02F
          KEY_1                    0x906F
          KEY_2                    0x10EF
          KEY_3                    0x50AF
          KEY_4                    0x58A7
          KEY_5                    0x48B7
          KEY_6                    0x8877
          KEY_7                    0xB04F
          KEY_8                    0x28D7
          KEY_KP0                  0xE01F
          KEY_KP1                  0x609F
          KEY_KP2                  0xF00F
          KEY_KP3                  0xE817
          KEY_KP4                  0xD827
          KEY_KP5                  0xC837
          KEY_KP6                  0xA05F
          KEY_KP7                  0x20DF
      end codes

end remote

i am not sure what i am missing here. please help. Regards, Vin

  • 1
    You realize your config file is missing KEY_9, right? – Dmitry Grigoryev Jan 12 '17 at 9:50
  • I created an extensive tutorial on stackexchange on how I managed to remote control my TV using only a Raspberry Pi and an old Infrared diode from an old remote control. – Besi Aug 9 '17 at 9:42
2

You need to place the lircd.conf file that you have recorded into /etc/lirc and then restart the service :

# Make a backup of the original lircd.conf file
sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd_original.conf

# Copy over your new configuration file
sudo cp ~/lircd.conf /etc/lirc/lircd.conf

# Restart service
sudo /etc/init.d/lirc restart
1

It is possible that lirc is not able to load the file. To make sure that it is able to read the file try restarting the service.

To restart the service, type:

sudo /etc/init.d/lirc restart

P.S: Incase it returns an error like 'unknown command', it is probably because of the IR command not being entered in the config file. Looking at your config file, it looks like KEY_9 has not been entered.

Hope I could help :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.