MyreMylar
Posts: 2
Joined: Thu Jul 23, 2015 2:20 pm

Using LIRC to control an Irdroid IR transceiver/transmitter

Thu Jul 23, 2015 3:19 pm

Ok, what I'm trying to do is get command line control of my TV on the Raspberry Pi using LIRC.

I have an Irdroid IR Transceiver, which I know works OK, because I got it sending and receiving IR signals (and controlling the TV) on my Windows laptop via WinLIRC. I've had a go at setting it up on the Pi but something somewhere along the line seems not to work so I was wondering if anyone else had tried something similar and might be able to spot where I'm messing up.

As far as I can tell the rough setup process for LIRC is:
  • apt-get lirc
  • edit the /etc/lirc/hardware.conf file to *something*
  • stick your remote control config data that maps IR code values to strings/button names (either downloaded or home made) into /etc/lirc/lircd.conf
  • sudo /etc/init.d/lirc start
  • start sending commands like so: sudo irsend SEND_ONCE AA59-00741A volume_up
However when I try that last command right now I get these errors:

Code: Select all

irsend: command failed: SEND_ONCE AA59-00741A volume_up
irsend: hardware does not support sending
which is clearly wrong since it does.

This is my lirc hardware.conf file:

Code: Select all

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/ttyACM0"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

and this is my lircd.conf file:

Code: Select all


# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.9.0(IRToy) on Thu Jul 23 12:12:58 2015
#
# contributed by 
#
# brand: Samsung                      
# model no. of remote control: AA59-00741A
# devices being controlled by this remote: Samsung TV
#

begin remote

  name  AA59-00741A
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       4470  4452
  one           534  1660
  zero          534   553
  ptrail        533
  pre_data_bits   16
  pre_data       0xE0E0
  gap          106159
  min_repeat      1
  toggle_bit_mask 0x0

      begin codes
          1                        0x20DF
          2                        0xA05F
          3                        0x609F
          4                        0x10EF
          5                        0x906F
          6                        0x50AF
          7                        0x30CF
          8                        0xB04F
          9                        0x708F
          0                        0x8877
          mute                     0xF00F
          volume_up                0xE01F
          volume_down              0xD02F
          power                    0x40BF
          guide                    0xF20D
          source                   0x807F
          channel_up               0x48B7
          channel_down             0x08F7
      end codes

end remote

this is some of the output from dmesg relating to the transceiver:

Code: Select all

[84555.684923] usb 1-1.5.1.3: new full-speed USB device number 11 using dwc_otg
[84555.817317] usb 1-1.5.1.3: New USB device found, idVendor=04d8, idProduct=f58b
[84555.817341] usb 1-1.5.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[84555.817359] usb 1-1.5.1.3: Manufacturer: Irdroid\xffffffcc\xffffff92\xffffff92CDC Test\xffffffcc\xffffff92\xffffff92000
[84555.818781] cdc_acm 1-1.5.1.3:1.0: This device cannot do calls on its own. It is not a modem.
[84555.818893] cdc_acm 1-1.5.1.3:1.0: ttyACM0: USB ACM device
[86779.418493] lirc_dev: IR Remote Control driver registered, major 246
[86779.423493] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[86779.429693] lirc_rpi: gpio chip not found!
[92634.408269] input: lircd as /devices/virtual/input/input2

I've tried using google and hacking about with various things for four or so hours but I thought I might as well ask here before beating my head against the problem some more later.

Cheers!

drgeoff
Posts: 9820
Joined: Wed Jan 25, 2012 6:39 pm

Re: Using LIRC to control an Irdroid IR transceiver/transmit

Thu Jul 23, 2015 6:10 pm

I've never used lirc but the line

Code: Select all

lirc_rpi: gpio chip not found!
might be giving a hint.

MyreMylar
Posts: 2
Joined: Thu Jul 23, 2015 2:20 pm

Re: Using LIRC to control an Irdroid IR transceiver/transmit

Thu Jul 23, 2015 7:57 pm

Yeah, I'm not sure how it's even pulling in that gpio stuff, given that I'm using a USB device and marking that in the hardware.conf. Maybe it's something hard coded into the version of lirc compiled for Raspbian?

Then again it might just be an ignorable error message...

Irdroid
Posts: 1
Joined: Thu Aug 20, 2015 11:18 am

Re: Using LIRC to control an Irdroid IR transceiver/transmit

Thu Aug 20, 2015 11:20 am

The Irdroid USB IR transceiver needs a patched version of LIRC to allow sending. You can Download the source from here :
http://www.irdroid.com/downloads/?did=16 . You need to compile for RPI

shag3doo
Posts: 1
Joined: Fri Aug 21, 2015 5:11 pm

Re: Using LIRC to control an Irdroid IR transceiver/transmit

Sat Aug 22, 2015 8:21 am

I'm also having problem using the Irdroid IR transceiver/transmitter.

I can't seem to send the IR command even after compiling the lirc version above.

I can confirm that the irtoy driver is installed since initially it was compiled in debug mode. I can see the debug messages when doing the irrecord.

I'm not sure if there's anything else i missed:

note that i'm using a raspberry pi 2 with the x300 module. The x300 has an IR sensor but can only be used as a receiver.
dmesg:
IRdroid detected:

Code: Select all

[    3.728006] usb 1-1.5: new full-speed USB device number 5 using dwc_otg
[    3.893049] usb 1-1.5: New USB device found, idVendor=04d8, idProduct=f58b
[    3.902206] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.911840] usb 1-1.5: Manufacturer: Irdroid\xffffffcc\xffffff92CDC Test\xffffffcc\xffffff92000
ttyACM0 created:

Code: Select all

[    4.279639] cdc_acm 1-1.5:1.0: This device cannot do calls on its own. It is not a modem.
[    4.306470] lirc_dev: IR Remote Control driver registered, major 246 
[    4.357233] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    4.378840] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device
[    4.389360] usbcore: registered new interface driver cdc_acm
[    4.397148] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
This is the part where i am not sure. I followed a guide to add the usbserial vendor=xxx product=xxxx but for some reason the ttyUSB0 is not being created.

Code: Select all

[    8.702331] usbcore: registered new interface driver usbserial
[    8.710933] usbcore: registered new interface driver usbserial_generic
[    8.722049] usbserial: USB Serial support registered for generic
[    8.834507] i2c /dev entries driver
lirc hardware.conf

Code: Select all

[email protected] /etc/lirc $ cat hardware.conf
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--uinput"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="irman"
# usually /dev/lirc0 is the correct setting for systems using udev 
DEVICE="/dev/ttyACM0"
#DEVICE="/dev/lirc0"
MODULES="lirc_rpi"

# Default configuration files for your hardware if any
LIRCD_CONF="/etc/lirc/licd.conf"
LIRCMD_CONF=""
lsusb:

Code: Select all

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 005: ID 04d8:f58b Microchip Technology, Inc. 
Bus 001 Device 006: ID 0d8c:013a C-Media Electronics, Inc. 
Bus 001 Device 007: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 008: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
/etc/modules

Code: Select all

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

usbserial vendor=0x04d8 product=0xf58b
snd-bcm2835
i2c-dev
i2c-bcm2708
rtc-ds1307
lirc_dev
lirc_rpi gpio_in_pin=8

irsend

Code: Select all

sudo irsend -d /dev/ttyACM0SEND_ONCE tv_remote.conf TV_MUTE
irsend: could not connect to socket
irsend: No such file or directory

shagnar
Posts: 1
Joined: Mon Sep 21, 2015 5:50 am

Re: Using LIRC to control an Irdroid IR transceiver/transmit

Mon Sep 21, 2015 5:51 am

your device in hardware.conf should be usb_irtoy not irman if i'm correct

Return to “Advanced users”