2

I have been trying for the past week to make a simple system to switch my air conditioning ON/OFF based on raspberry pi. I have my IR VS1838B infrared receiver, and a small circuit build out of a transistor, a simple LED and an IR LED. I want to capture the codes

I have successfully managed to do the followings so far:

  • loaded drivers through raspberry pi overlays: gpio-ir-recv and gpio-ir-tx
  • tested receiving part with mode2 and I can see the pulse, space listing
  • tested receiving part with ir-keytable and devinput I can see events after setting NEC protocol. The buttons scancodes stay the same
  • tested receiving part with irrecord and "devinput" driver and I can generate a configuration file
  • tested the sending part and I can see my normal LED lighting and the IR LED lighting with the help of my smartphone camera
  • tested the sending part and I can see my receiver getting data from the transmitter

I am NOT able to:

  • record the scancodes with irrecord and the "default" plugin driver for lirc. It cannot detect the gap and it cannot recognize the pressing event of a key - NEC and lirc protocols selected, 2 remotes - tv and AC
  • record pulses and spaces from mode2 and send them to transmitter. The recording is consistent but after I send them to the transmitter and receive them again they are all changed.

I cannot understand at this point why is the linux driver capable of decoding the scancodes from the receiver( valid devinput events ) but when I try irrecord it doesn't work.

I want to generate a valid config file to be used for sending. Any hint, help would be extremely appreciated.

I managed to get a working config file for receiving tv codes. While trying to send them to the IR LED: sudo ir-ctl -d /dev/lirc-tx --scancode=nec:0xD02F

I receive:

  2182850     4919      147      974      148     1025
       97      975      147      976      148     2127
      121      975      150     2097      148     2168
       84     2123      122     2099      148     2101
      147     2101      147     1050       96     6589
      143     2104      146     2098      147     2099
      149      974      148     2102      146      976
      147      975      148     4393      111     2101
      144      975      147     2101      146     2104
      149    18096-pulse

I should receive:

     4532     4589      536     1746      517     1751
      517     1749      493      613      519      640
      515      642      491      613      517      615
      518     1748      545     1720      531     1753
      511      669      461      615      546      584
      519      614      602      531      516     1728
      543     1742      514      589      547     1749
      514      612      524      598      517      617
      514      627      514      611      522      616
      527     1736      510      612      520     1747
      545     1740      501     1749      487     1776
      520    14429-pulse

My conf is:

begin remote

  name  Samsung_AA59-00582A
  bits           16
  flags SPACE_ENC
  eps            30
  aeps          100

  header       4556  4511
  one           573  1677
  zero          573   552
  ptrail        573
  pre_data_bits   16
  pre_data       0xE0E0
  gap          46998
  toggle_bit_mask 0x0

migrated from superuser.com Jul 2 at 21:18

This question came from our site for computer enthusiasts and power users.

  • from here : Using an existing file as a template can sometimes be required for irrecord to work, If the program fails to recognize the protocol of the remote control you could use the --force option to at least create a config file in raw mode. SEE also the TROUBLESHOOTING part – Ephemeral Jul 3 at 10:37
  • Ok, I found my TV remote config, it seemed that I was close to generate one with the generic NEC config. Now, I want to use the scancode to send it to the tv. I test this while starting "irw" at the same time. I am not able to receive anything. If I inspect this with "mode2" I can see that the number sequence is not the same. – SabinManiac Jul 4 at 21:19

Your Answer

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

Browse other questions tagged or ask your own question.