please choosego to mobile | Continue to access the PC version
View: 13184|Reply: 4

IR Receiver

[Copy link]

2

threads

8

posts

74

credits

Registered member

Rank: 2

credits
74
Published in 2015-12-23 11:45:12 | Show all floors |Read mode
I purchased one Orange PI PC.

Write Fedora 22 to SD card, boot up the machine, login via SSH
insmod sunxi_ir_rx,
installed LIRC and evtest.

I see /dev/input/event2 is sunxi_ir, but no /dev/lirc0

When playing with three different IR remote, evtest never gives any output.

Any clue?
Tried Ubuntu too.
Maybe the IR receiver only supported by Android/Orange OS (http://www.orangepi.org/orangepi ... wthread&tid=541)?

2

threads

8

posts

74

credits

Registered member

Rank: 2

credits
74
 Author| Published in 2015-12-24 09:40:06 | Show all floors
seems it works if using official Fedora distros

http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=80&extra=page%3D5

2

threads

8

posts

74

credits

Registered member

Rank: 2

credits
74
 Author| Published in 2016-1-3 22:13:13 | Show all floors
Edited by joe1203 at 2016-1-3 22:16

After many sleepless night, it seems that the sunxi-ir-rx modules will NOT pass the raw IR signal if it cannot decode the signal.
https://github.com/matzrh/sunxi-lirc/wiki

According to this post, I can get the raw ir output. It proves that my board is working.
http://forum.banana-pi.org/t/how ... bpi-m3-linux-os/940

Maybe the easiest (but ugly) way is writing a script and keep polling and parsing the var/log/messages, or mod + recompile the sunxi-ir-rx module based on the output of my remote
https://github.com/allwinner-zh/ ... ers/input/keyboard/

2

threads

8

posts

74

credits

Registered member

Rank: 2

credits
74
 Author| Published in 2016-1-20 15:31:54 | Show all floors
Edited by joe1203 at 2016-1-20 15:35

Just install Ubuntu 12.04 in virtualbox, clone the source of linux-3.4-sunxi from github, exposed a few more paramteres and compile the modules. But when playing around on Fedora 22, I cannot load the modules and receive "Invalid module format". Here is the output of modinfo, file and readelf -h, any clues?

output of modinfo of bundled sunxi-ir-rx.ko
  1. filename:       /lib/modules/3.4.39/kernel/drivers/input/keyboard/sunxi-ir-rx.ko
  2. license:        GPL
  3. author:         DanielWang
  4. description:    Remote IR driver
  5. depends:
  6. intree:         Y
  7. vermagic:       3.4.39 SMP preempt mod_unload modversions ARMv7 p2v8
  8. parm:           debug_mask:int
Copy code
output of modinfo of my built, named sunxi-ir-rx-hf.ko
  1. filename:       /lib/modules/3.4.39/kernel/drivers/input/keyboard/sunxi-ir-rx-hf.ko
  2. license:        GPL
  3. author:         DanielWang
  4. description:    Remote IR driver
  5. srcversion:     2CEDB65025BE20B385A4605
  6. depends:
  7. vermagic:       3.4.39 SMP preempt mod_unload modversions ARMv7 p2v8
  8. parm:           debug_mask:int
  9. parm:           IR_RXFILT_VAL:int
  10. parm:           IR_RXIDLE_VAL:int
  11. parm:           IR_ACTIVE_T:int
  12. parm:           IR_ACTIVE_T_C:int
  13. parm:           IR_L1_MIN:int
  14. parm:           IR_L0_MIN:int
  15. parm:           IR_PMAX:int
  16. parm:           IR_DMID:int
  17. parm:           IR_DMAX:int
Copy code
output of file of bundled sunxi-ir-rx.ko
  1. sunxi-ir-rx.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=32e092d5e778c85bdc07d5e8e54038d53f574f0a, not stripped
Copy code
output of file of my built, named sunxi-ir-rx-hf.ko
  1. sunxi-ir-rx-hf.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=40b3f4abf5c4d2f38aa599a52c126adaee6ed1ee, not stripped
Copy code
output of readelf -h of bundled sunxi-ir-rx.ko
  1. ELF Header:
  2.   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  3.   Class:                             ELF32
  4.   Data:                              2's complement, little endian
  5.   Version:                           1 (current)
  6.   OS/ABI:                            UNIX - System V
  7.   ABI Version:                       0
  8.   Type:                              REL (Relocatable file)
  9.   Machine:                           ARM
  10.   Version:                           0x1
  11.   Entry point address:               0x0
  12.   Start of program headers:          0 (bytes into file)
  13.   Start of section headers:          80916 (bytes into file)
  14.   Flags:                             0x5000000, Version5 EABI
  15.   Size of this header:               52 (bytes)
  16.   Size of program headers:           0 (bytes)
  17.   Number of program headers:         0
  18.   Size of section headers:           40 (bytes)
  19.   Number of section headers:         54
  20.   Section header string table index: 51
Copy code

output of readelf -h of my built, named sunxi-ir-rx-hf.ko

  1. ELF Header:
  2.   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  3.   Class:                             ELF32
  4.   Data:                              2's complement, little endian
  5.   Version:                           1 (current)
  6.   OS/ABI:                            UNIX - System V
  7.   ABI Version:                       0
  8.   Type:                              REL (Relocatable file)
  9.   Machine:                           ARM
  10.   Version:                           0x1
  11.   Entry point address:               0x0
  12.   Start of program headers:          0 (bytes into file)
  13.   Start of section headers:          80860 (bytes into file)
  14.   Flags:                             0x5000000, Version5 EABI
  15.   Size of this header:               52 (bytes)
  16.   Size of program headers:           0 (bytes)
  17.   Number of program headers:         0
  18.   Size of section headers:           40 (bytes)
  19.   Number of section headers:         54
  20.   Section header string table index: 51
Copy code

output of insmod of my built
  1. insmod: ERROR: could not insert module sunxi-ir-rx-hf.ko: Invalid module format
Copy code
*No output for bundled sunxi-ir-rx.ko, since it is loaded successfully

4

threads

1118

posts

9178

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9178
Published in 2016-2-9 02:10:02 | Show all floors
Not sure about your issue, but I backported sunxi IR LIRC driver from mainline kernel:

https://github.com/jernejsk/Open ... -sunxi-driver.patch

That way you can use whatever protocol you want.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list