IR blaster for an AC unit

Share here your ideas for new projects

Moderators: meveric, mdrjr, odroid

Re: IR blaster for an AC unit

Unread postby mad_ady » Thu Sep 14, 2017 8:43 pm

Sorry to revive this thread, but it seems that since a kernel update ago I am no longer able to use GPIO pin 24 for IR blaster.

Here is my lirc_odroid configuration:
Code: Select all
cat /etc/modprobe.d/lirc.conf
options lirc_odroid gpio_out_pin=24 softcarrier=1 invert=0


Here is what dmesg says when the module is loaded:
Code: Select all
[   25.322482] lirc_dev: IR Remote Control driver registered, major 245
[   25.336230] lirc_odroid: module is from the staging directory, the quality is unknown, you have been warned.
[   25.346335] lirc_odroid: cant claim gpio pin 24
[   25.350461] lirc_odroid: init port fail!
[   25.353337] lirc_odroid[lirc_odroid_exit]


lsmod doesn´t list lirc_odroid as loaded:
Code: Select all
lsmod | grep lirc
lirc_dev                7269  0


... And the gpio doesn´t seem to be in use by anything:
Code: Select all
sudo cat /sys/kernel/debug/gpio                                                                                                                                                                             
gpiochip0: GPIOs 0-7, parent: platform/13400000.pinctrl:, gpy7:

gpiochip1: GPIOs 8-15, parent: platform/13400000.pinctrl:, gpx0:
 gpio-11  (                    |power key           ) in  hi IRQ

gpiochip2: GPIOs 16-23, parent: platform/13400000.pinctrl:, gpx1:

gpiochip3: GPIOs 24-31, parent: platform/13400000.pinctrl:, gpx2:

gpiochip4: GPIOs 32-39, parent: platform/13400000.pinctrl:, gpx3:
 gpio-39  (                    |hpd                 ) in  lo IRQ

gpiochip5: GPIOs 40-47, parent: platform/13410000.pinctrl:, gpc0:
 gpio-42  (                    |cd                  ) in  lo IRQ

gpiochip6: GPIOs 48-55, parent: platform/13410000.pinctrl:, gpc1:

gpiochip7: GPIOs 56-62, parent: platform/13410000.pinctrl:, gpc2:

gpiochip8: GPIOs 63-66, parent: platform/13410000.pinctrl:, gpc3:

gpiochip9: GPIOs 67-68, parent: platform/13410000.pinctrl:, gpc4:

gpiochip10: GPIOs 69-76, parent: platform/13410000.pinctrl:, gpd1:
 gpio-69  (                    |reset               ) out hi   

gpiochip11: GPIOs 77-82, parent: platform/13410000.pinctrl:, gpy0:

gpiochip12: GPIOs 83-86, parent: platform/13410000.pinctrl:, gpy1:

gpiochip13: GPIOs 87-92, parent: platform/13410000.pinctrl:, gpy2:

gpiochip14: GPIOs 93-100, parent: platform/13410000.pinctrl:, gpy3:

gpiochip15: GPIOs 101-108, parent: platform/13410000.pinctrl:, gpy4:

gpiochip16: GPIOs 109-116, parent: platform/13410000.pinctrl:, gpy5:

gpiochip17: GPIOs 117-124, parent: platform/13410000.pinctrl:, gpy6:

gpiochip18: GPIOs 125-132, parent: platform/14000000.pinctrl:, gpe0:

gpiochip19: GPIOs 133-134, parent: platform/14000000.pinctrl:, gpe1:

gpiochip20: GPIOs 135-140, parent: platform/14000000.pinctrl:, gpf0:

gpiochip21: GPIOs 141-148, parent: platform/14000000.pinctrl:, gpf1:

gpiochip22: GPIOs 149-156, parent: platform/14000000.pinctrl:, gpg0:

gpiochip23: GPIOs 157-164, parent: platform/14000000.pinctrl:, gpg1:

gpiochip24: GPIOs 165-166, parent: platform/14000000.pinctrl:, gpg2:

gpiochip25: GPIOs 167-170, parent: platform/14000000.pinctrl:, gpj4:

gpiochip26: GPIOs 171-178, parent: platform/14010000.pinctrl:, gpa0:
 gpio-177 (                    |sda                 ) in  hi   
 gpio-178 (                    |scl                 ) in  hi   

gpiochip27: GPIOs 179-184, parent: platform/14010000.pinctrl:, gpa1:

gpiochip28: GPIOs 185-192, parent: platform/14010000.pinctrl:, gpa2:

gpiochip29: GPIOs 193-197, parent: platform/14010000.pinctrl:, gpb0:

gpiochip30: GPIOs 198-202, parent: platform/14010000.pinctrl:, gpb1:

gpiochip31: GPIOs 203-206, parent: platform/14010000.pinctrl:, gpb2:

gpiochip32: GPIOs 207-214, parent: platform/14010000.pinctrl:, gpb3:

gpiochip33: GPIOs 215-216, parent: platform/14010000.pinctrl:, gpb4:

gpiochip34: GPIOs 217-224, parent: platform/14010000.pinctrl:, gph0:

gpiochip35: GPIOs 225-231, parent: platform/3860000.pinctrl:, gpz:



I´m currently running kernel 4.9.38 and the only thing out of place is the 1-wire module which keeps spamming dmesg with:
Code: Select all
[ 8130.436739] w1_master_driver w1_bus_master1: Family 0 for 00.250000000000.1c is not registered.
[ 8167.506486] w1_master_driver w1_bus_master1: Family 0 for 00.a50000000000.90 is not registered.
[ 8228.993791] w1_master_driver w1_bus_master1: Family 0 for 00.650000000000.5a is not registered.
[ 8288.507465] w1_master_driver w1_bus_master1: Family 0 for 00.e50000000000.d6 is not registered.
[ 8325.870187] w1_master_driver w1_bus_master1: Family 0 for 00.150000000000.a2 is not registered.

One wire wasn´t enabled before. I´m working on disabling it...
User avatar
mad_ady
 
Posts: 2587
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: IR blaster for an AC unit

Unread postby mad_ady » Thu Sep 14, 2017 8:48 pm

Update: as I suspected, 1wire was probably taking over pin 24. But it´s strange that it didn´t register in the debug output...

I did this:
Code: Select all
sudo rmmod w1_gpio
sudo rmmod wire
sudo modprobe lirc_odroid


... and presto!
Code: Select all
[ 8733.008276] lirc_odroid: module is from the staging directory, the quality is unknown, you have been warned.
[ 8733.018383] lirc_odroid lirc_odroid.0: lirc_dev: driver lirc_odroid registered at minor = 0
[ 8733.027414] lirc_odroid: driver registered!


I added
Code: Select all
# 1 wire
blacklist w1_gpio
blacklist wire

to /etc/modprobe.d/blacklist-odroid.conf to prevent 1wire from loading on startup.
User avatar
mad_ady
 
Posts: 2587
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Previous

Return to The Ideas

Who is online

Users browsing this forum: No registered users and 1 guest