Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread jonsm...@gmail.com
IR remotes use different protocols. These protocols are supported by
different kernel modules like NEC, RC5, etc.  You also need keymaps
for mapping the remote protocols into standard key events. Look in the
kernel source at drivers/media/rc/.. If you get things set up
right Linux can decode every IR remote on the market.

On Thu, Dec 4, 2014 at 8:42 AM, Simo Xefil xe...@xefil.com wrote:

 Hello to all!
 I'm trying to debug IR signals on a A20 based board with Arch Linux.
 I'm trying to test if I'm able to read values from a remote IR control.
 During boot I can recognise the ir as follow:


 [2.478959] input: sunxi-ir as /devices/virtual/input/input0



 Looking on the devices I get:

 # cat /proc/bus/input/devices


 I: Bus=0019 Vendor=0001 Product=0001 Version=0100
 N: Name=sunxi-ir
 P: Phys=RemoteIR/input1
 S: Sysfs=/devices/virtual/input/input0
 U: Uniq=
 H: Handlers=sysrq rfkill kbd event0
 B: PROP=0
 B: EV=3
 B: KEY=      
 fffe


 (...)



 Then, using this command I expect to see some signals:

 # evtest /dev/input/event0
 Input driver version is 1.0.1
 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
 Input device name: sunxi-ir
 Supported events:
   Event type 0 (EV_SYN)
   Event type 1 (EV_KEY)
 Event code 1 (KEY_ESC)
 Event code 2 (KEY_1)
 Event code 3 (KEY_2)
 (...)
 Event code 247 (KEY_RFKILL)
 Event code 248 (?)
 Event code 249 (?)
 Event code 250 (?)
 Event code 251 (?)
 Event code 252 (?)
 Event code 253 (?)
 Event code 254 (?)
 Event code 255 (?)
 Properties:
 Testing ... (interrupt to exit)


 I've tested a PHILIPS remote, no signal, and a SAMSUNG remote. On the
 samsung remote I get values.

 Event: time 1417698487.436218, type 1 (EV_KEY), code 2 (KEY_1), value 1
 Event: time 1417698487.436227, -- EV_SYN 
 Event: time 1417698487.959104, type 1 (EV_KEY), code 2 (KEY_1), value 0
 Event: time 1417698487.959113, -- EV_SYN 
 Event: time 1417698489.688749, type 1 (EV_KEY), code 2 (KEY_1), value 1
 Event: time 1417698489.688757, -- EV_SYN 
 Event: time 1417698489.989063, type 1 (EV_KEY), code 2 (KEY_1), value 0
 Event: time 1417698489.989070, -- EV_SYN 
 Event: time 1417698490.761935, type 1 (EV_KEY), code 2 (KEY_1), value 1
 Event: time 1417698490.761947, -- EV_SYN 
 Event: time 1417698491.069059, type 1 (EV_KEY), code 2 (KEY_1), value 0
 Event: time 1417698491.069065, -- EV_SYN 
 Event: time 1417698491.961707, type 1 (EV_KEY), code 2 (KEY_1), value 1
 Event: time 1417698491.961715, -- EV_SYN 
 Event: time 1417698492.269065, type 1 (EV_KEY), code 2 (KEY_1), value 0
 Event: time 1417698492.269072, -- EV_SYN 

 Also the device works. All remote are working used on their own devices.
 My goal is to remplicate the signal of a remote command of an automatic
 pellet stove. I would like to clone the signal. The remote works on the
 stove, also it's not a remote issue. Is there a way to debug or to know if
 the remote is incompatible? Reading the instructions it's defined as Infra
 Red. Are there different IR signals? I've read that in some cases, values
 sent above 255 are ignored. Could be the case? How in case to solve?

 Thanks!

 Simon

 --
 You received this message because you are subscribed to the Google Groups
 linux-sunxi group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to linux-sunxi+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
Jon Smirl
jonsm...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread Andreas Baierl
What's your fex like? Did you recognise 
https://github.com/linux-sunxi/sunxi-boards/commit/68acb3b1610a44b9402560623f7e35b7882585e9?


Regards

Am 04.12.2014 14:42, schrieb Simo Xefil:


Hello to all!
I'm trying to debug IR signals on a A20 based board with Arch Linux.
I'm trying to test if I'm able to read values from a remote IR control.
During boot I can recognise the ir as follow:

|

[2.478959]input:sunxi-ir as/devices/virtual/input/input0

|


Looking on the devices I get:

|
# cat /proc/bus/input/devices


I:Bus=0019Vendor=0001Product=0001Version=0100
N:Name=sunxi-ir
P:Phys=RemoteIR/input1
S:Sysfs=/devices/virtual/input/input0
U:Uniq=
H:Handlers=sysrq rfkill kbd event0
B:PROP=0
B:EV=3
B:KEY=       
fffe



(...)
|



Then, using this command I expect to see some signals:

|
# evtest /dev/input/event0
Inputdriver version is1.0.1
Inputdevice ID:bus 0x19vendor 0x1product 0x1version 0x100
Inputdevice name:sunxi-ir
Supportedevents:
Eventtype 0(EV_SYN)
Eventtype 1(EV_KEY)
Eventcode 1(KEY_ESC)
Eventcode 2(KEY_1)
Eventcode 3(KEY_2)
(...)
Eventcode 247(KEY_RFKILL)
Eventcode 248(?)
Eventcode 249(?)
Eventcode 250(?)
Eventcode 251(?)
Eventcode 252(?)
Eventcode 253(?)
Eventcode 254(?)
Eventcode 255(?)
Properties:
Testing...(interrupt to exit)
|


I've tested a PHILIPS remote, no signal, and a SAMSUNG remote. On the 
samsung remote I get values.


|
Event:time 1417698487.436218,type 1(EV_KEY),code 2(KEY_1),value 1
Event:time 1417698487.436227,--EV_SYN 
Event:time 1417698487.959104,type 1(EV_KEY),code 2(KEY_1),value 0
Event:time 1417698487.959113,--EV_SYN 
Event:time 1417698489.688749,type 1(EV_KEY),code 2(KEY_1),value 1
Event:time 1417698489.688757,--EV_SYN 
Event:time 1417698489.989063,type 1(EV_KEY),code 2(KEY_1),value 0
Event:time 1417698489.989070,--EV_SYN 
Event:time 1417698490.761935,type 1(EV_KEY),code 2(KEY_1),value 1
Event:time 1417698490.761947,--EV_SYN 
Event:time 1417698491.069059,type 1(EV_KEY),code 2(KEY_1),value 0
Event:time 1417698491.069065,--EV_SYN 
Event:time 1417698491.961707,type 1(EV_KEY),code 2(KEY_1),value 1
Event:time 1417698491.961715,--EV_SYN 
Event:time 1417698492.269065,type 1(EV_KEY),code 2(KEY_1),value 0
Event:time 1417698492.269072,--EV_SYN 
|

Also the device works. All remote are working used on their own devices.
My goal is to remplicate the signal of a remote command of an 
automatic pellet stove. I would like to clone the signal. The remote 
works on the stove, also it's not a remote issue. Is there a way to 
debug or to know if the remote is incompatible? Reading the 
instructions it's defined as Infra Red. Are there different IR 
signals? I've read that in some cases, values sent above 255 are 
ignored. Could be the case? How in case to solve?


Thanks!

Simon

--
You received this message because you are subscribed to the Google 
Groups linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to linux-sunxi+unsubscr...@googlegroups.com 
mailto:linux-sunxi+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread Simo Xefil


Il giorno giovedì 4 dicembre 2014 14:51:57 UTC+1, Jon Smirl ha scritto:

 IR remotes use different protocols. These protocols are supported by 
 different kernel modules like NEC, RC5, etc.  You also need keymaps 
 for mapping the remote protocols into standard key events. Look in the 
 kernel source at drivers/media/rc/.. If you get things set up 
 right Linux can decode every IR remote on the market. 


Ok, good to know there are different protocols. The content of my folder is:

#pwd
/usr/lib/modules/3.4.90/kernel/drivers/media/rc
# ls
ati_remote.ko  ir-jvc-decoder.ko  ir-mce_kbd-decoder.ko  ir-rc5-decoder.ko 
ir-rc6-decoder.koir-sony-decoder.ko  lirc_dev.ko  rc-core.ko 
 streamzap.koimon.koir-lirc-codec.ko   ir-nec-decoder.ko  ir-rc5
-sz-decoder.ko  ir-sanyo-decoder.ko  keymaps mceusb.ko   
 redrat3.ko 

I was expecting to be able get a kind of raw string to simply resend if 
needed, even if not recognized.
Is there a way to get raw values and simply resend them? Like using an 
arduino, with a sketch I got the raw data and then I use them to resend the 
signal.
i.e.: http://www.instructables.com/id/Arduino-Infrared-Remote-tutorial/#step5
I would then an IR led to send out signals, if the build in receiver cannot 
send as well. I've no idea if the build in ir sensor can only receive.

Thanks

Simon



-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread Simo Xefil


Il giorno giovedì 4 dicembre 2014 14:57:37 UTC+1, Andreas Baierl ha scritto:

 What's your fex like? Did you recognise 
 https://github.com/linux-sunxi/sunxi-boards/commit/68acb3b1610a44b9402560623f7e35b7882585e9
 ?

 Regards


How to identify if it's applied? A little bit out of my known ranges :-) 

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread Simo Xefil


Il giorno giovedì 4 dicembre 2014 14:57:37 UTC+1, Andreas Baierl ha scritto:

 What's your fex like? Did you recognise 
 https://github.com/linux-sunxi/sunxi-boards/commit/68acb3b1610a44b9402560623f7e35b7882585e9
 ?

 Regards



sorry, found!
My script.fex is already so:

[ir_para]
ir_used = 1
ir0_rx = port:PB042defaultdefaultdefault

Simon

 

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread jonsm...@gmail.com
On Thu, Dec 4, 2014 at 9:23 AM, Simo Xefil xe...@xefil.com wrote:


 Il giorno giovedì 4 dicembre 2014 14:51:57 UTC+1, Jon Smirl ha scritto:

 IR remotes use different protocols. These protocols are supported by
 different kernel modules like NEC, RC5, etc.  You also need keymaps
 for mapping the remote protocols into standard key events. Look in the
 kernel source at drivers/media/rc/.. If you get things set up
 right Linux can decode every IR remote on the market.


 Ok, good to know there are different protocols. The content of my folder is:

 #pwd
 /usr/lib/modules/3.4.90/kernel/drivers/media/rc
 # ls
 ati_remote.ko  ir-jvc-decoder.ko  ir-mce_kbd-decoder.ko  ir-rc5-decoder.ko
 ir-rc6-decoder.koir-sony-decoder.ko  lirc_dev.ko  rc-core.ko
 streamzap.koimon.koir-lirc-codec.ko   ir-nec-decoder.ko
 ir-rc5-sz-decoder.ko  ir-sanyo-decoder.ko  keymaps mceusb.ko
 redrat3.ko

 I was expecting to be able get a kind of raw string to simply resend if
 needed, even if not recognized.
 Is there a way to get raw values and simply resend them? Like using an
 arduino, with a sketch I got the raw data and then I use them to resend the
 signal.
 i.e.:
 http://www.instructables.com/id/Arduino-Infrared-Remote-tutorial/#step5
 I would then an IR led to send out signals, if the build in receiver cannot
 send as well. I've no idea if the build in ir sensor can only receive.

It is unlikely that your built-in IR can also transmit.  Your box
would need to have a jack labeled IR out.

You will probably need an external USB box like this one:
http://www.hauppauge.com/site/webstore2/webstore_remote-mckit.asp

That bundle of wire on the left is the transmitter.

Or if you are a hacker you can build your own IR transmitter for a
couple of dollars.



 Thanks

 Simon



 --
 You received this message because you are subscribed to the Google Groups
 linux-sunxi group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to linux-sunxi+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
Jon Smirl
jonsm...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread Simo Xefil


Il giorno giovedì 4 dicembre 2014 16:24:23 UTC+1, Jon Smirl ha scritto:



 It is unlikely that your built-in IR can also transmit.  Your box 
 would need to have a jack labeled IR out. 

 You will probably need an external USB box like this one: 
 http://www.hauppauge.com/site/webstore2/webstore_remote-mckit.asp 

 That bundle of wire on the left is the transmitter. 

 Or if you are a hacker you can build your own IR transmitter for a 
 couple of dollars. 



Uh, I'll try to build my own IR sender. I already have some IR leds. I'll 
try to use it on the GPIO pins of my board.
Aside this, which is a point I'll start to deal with later, I need to get 
the values from the remote IR to clone the signal.
Also I'm again on the original issue.
Is there a way to capture the raw data? I'll think how to send it out later 
:)

Simon

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Infrared Remote Control (sunxi-ir)

2014-12-04 Thread jonsm...@gmail.com
I have not tried this... but I think if you load the kernel lirc
device driver the raw data will be available on /dev/lirc. It may also
be available in sysfs as part of the base IR system.  Google around,
someone else must have tried getting to it.

http://www.lirc.org/

On Thu, Dec 4, 2014 at 10:40 AM, Simo Xefil xe...@xefil.com wrote:


 Il giorno giovedì 4 dicembre 2014 16:24:23 UTC+1, Jon Smirl ha scritto:



 It is unlikely that your built-in IR can also transmit.  Your box
 would need to have a jack labeled IR out.

 You will probably need an external USB box like this one:
 http://www.hauppauge.com/site/webstore2/webstore_remote-mckit.asp

 That bundle of wire on the left is the transmitter.

 Or if you are a hacker you can build your own IR transmitter for a
 couple of dollars.



 Uh, I'll try to build my own IR sender. I already have some IR leds. I'll
 try to use it on the GPIO pins of my board.
 Aside this, which is a point I'll start to deal with later, I need to get
 the values from the remote IR to clone the signal.
 Also I'm again on the original issue.
 Is there a way to capture the raw data? I'll think how to send it out later
 :)

 Simon

 --
 You received this message because you are subscribed to the Google Groups
 linux-sunxi group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to linux-sunxi+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
Jon Smirl
jonsm...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.