Author Topic: LIRC RAW IR Commands?  (Read 14591 times)

ebolam

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
LIRC RAW IR Commands?
« on: December 06, 2008, 06:51:13 pm »
I've been working on trying to get linuxmce to control my receiver (Onkyo HT-RC506) with little luck. I could not find pronto style codes to send. I used lirc's irrecord function to get the raw codes for the remote to control the receiver, however I have not had any luck in finding a way to convert these codes into the pronto format. Does anyone have any experience with this? If not, is there a way to get linuxmce to take the lirc commands?

Example single button config file from irrecord:

begin remote

  name   ONKYO_RC-707M
  flags RAW_CODES|CONST_LENGTH
  eps            30
  aeps          100

  ptrail          0
  repeat     0     0
  gap    107325

      begin raw_codes

          name POWER
             9000    4450     600     500     650    1600
              600     500     650     450     650    1600
              650     450     650    1600     650    1600
              600     500     650     450     650    1600
              650    1600     600     500     650    1600
              600    1650     600     500     600    1650
              600    1600     650     500     600    1600
              650     500     600     500     600    1650
              600    1650     600     500     600     500
              600    1650     600     500     600    1650
              600    1650     600     500     600     500
              600


      end raw_codes

end remote
Main MD:
MB: BIOSTAR TA770
CPU: AMD Phenom 9500 Agena
Mem: CORSAIR XMS2 2GB x2
Video: MSI RX2600XT-T2D512EZ Radeon HD 2600XT
PVR: Hauppauge WinTV-PVR 500
HD: Seagate 750GB x4

Orbiter:
MB: MSI CN700 Mini-ITX
Screen: ELO 1529L (Touchscreen)

ebolam

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: LIRC RAW IR Commands?
« Reply #1 on: December 06, 2008, 08:57:11 pm »
I was able to get the non-raw versions of the above code. Here it is if that helps anyone:

begin remote

  name  Onkyo_RC-707M_Reg
  bits           24
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8966  4445
  one           601  1635
  zero          601   513
  ptrail        598
  repeat       8957  2234
  pre_data_bits   8
  pre_data       0x4B
  gap          107326
  toggle_bit_mask 0x0

      begin codes
          POWER                    0x36D32C
          DVD                      0x3631CE
          VCR_DVR                  0xB6F00F
          CBL_SAT                  0xB6708F
          CD                       0xB6906F
          MULTI_CH                 0x3620DF
          AUX                      0xB6F906
          TAPE                     0xB610EF
          TUNER                    0xB6D02F
          DOCK                     0x40728D
          MUTE                     0xB6A05F
          VOL+                     0xB640BF
          VOL-                     0xB6C03F
          MOVIE_TV                 0x350BF4
          MUSIC                    0x358B74
          GAME                     0x354BB4
          STEREO                   0x3632CD
          DIMMER                   0xB6A956
          SLEEP                    0xB6BA45
      end codes

end remote
Main MD:
MB: BIOSTAR TA770
CPU: AMD Phenom 9500 Agena
Mem: CORSAIR XMS2 2GB x2
Video: MSI RX2600XT-T2D512EZ Radeon HD 2600XT
PVR: Hauppauge WinTV-PVR 500
HD: Seagate 750GB x4

Orbiter:
MB: MSI CN700 Mini-ITX
Screen: ELO 1529L (Touchscreen)

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: LIRC RAW IR Commands?
« Reply #2 on: December 08, 2008, 12:19:20 am »
ebolam,

lirc support in linuxMCE is limited to receiving only.

For transmitting, you will currently need a USB-UIRT or something similar.

I have looked into adding the functionality for transmitting but it is certainly non-trivial and has not been done.

Regards
Darren

ebolam

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: LIRC RAW IR Commands?
« Reply #3 on: December 10, 2008, 04:19:52 am »
Not to argue, but at least from a command line it is very trivial to send commands to a device. All you have to do is type irsend send_once [remote name from the config file, in this case Onkyo_RC-707M_Reg] [Command like POWER or DVD]

Seams like this would be an easy add, plus it would have the benefit of hundreds of lirc formatted remotes that could be brought in from the lirc library.

Luckily I found some pronto format code for this device.

Thanks for your reply!
Main MD:
MB: BIOSTAR TA770
CPU: AMD Phenom 9500 Agena
Mem: CORSAIR XMS2 2GB x2
Video: MSI RX2600XT-T2D512EZ Radeon HD 2600XT
PVR: Hauppauge WinTV-PVR 500
HD: Seagate 750GB x4

Orbiter:
MB: MSI CN700 Mini-ITX
Screen: ELO 1529L (Touchscreen)

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: LIRC RAW IR Commands?
« Reply #4 on: December 10, 2008, 11:19:09 am »
Agree, but that assumes that a config file is setup and does not send raw codes. It relies on lirc to map the string that you pass to the appropriate code.

Unfortunately, it is not as easy to get lirc to just send the code (without changing the lirc code).

An option is to have a dynamic config file that linuxMCE manipulates when it records new codes and for manually entered codes only accept config file strings.
Then like you said, you could just use the equivalant of the lirc irsend. This would not support the same codes (which are PRONTO format) that the other IR devices support though and we would then lose the ability to record from say a USB_UIRT and playback on a lirc. This would also mean that existing device templates that people build for IR controlled devices would not work with the LIRC device - which sort of makes it a bit of a waste.

Ideally, if there was code to allow the receiving (and sending) of PRONTO formatted strings through the lirc drivers then the addition would be trivial. This code does not exist to my knowledge in the standard lirc code branch and there is no code written that makes use of the lirc libraries either.

That is all what i found out when I looked into it last. If things have changed or you are willing to write the missing code then I am all for it  :)

regards
Darren