forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSP IR Remote Sample (RoboSapien & ICybie, Media Center)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Fri Aug 26, 2005 2:30 am    Post subject: PSP IR Remote Sample (RoboSapien & ICybie, Media Center) Reply with quote

FYI: IR sample shows ways of using the RAW IR capabilities of the PSP hardware.
Can be used to control many "Consumer IR" devices that use regular IR remote controls
[not limited to "SIRCS"; nothing to do with IRDA]

http://www.aibohack.com/psp/roboir.htm

This is not meant as a "universal remote". The technology provided here can be used to write/port other IR programs.

The 3 examples I picked are: RoboSapien Robot, ICybie Robot and the RC6 remote control commonly used for Windows Media Center.
The way IR signals are encoded are not standardized. Typically each device manufacturer makes up their own encoding scheme.

See "FANCY" source code version if you want to change the features of the full version of the app. For incorporating into your own program see the "SIMPLE" source code version (minimal UI).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pspkrazy



Joined: 04 Jul 2005
Posts: 49

PostPosted: Fri Aug 26, 2005 5:35 am    Post subject: wow Reply with quote

wow.

Amazing job.

Very low level tricks here !

Hope someone will take time to make a fancy gui and add reading (universal remote) capabilities.

Do you think reading is possible ?


----

I can't wait for your wifi sample .03 with sceUtilityNetconf in it and real handler for connection (dhcp ?).
I took time to disasm wipeout but get bored...

Thanks for all your work for the PSP community psppet.
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Fri Aug 26, 2005 5:56 am    Post subject: Reply with quote

Very impressive! Thanks for sharing the code ...
Back to top
View user's profile Send private message
KaL



Joined: 03 Apr 2005
Posts: 41

PostPosted: Fri Aug 26, 2005 6:19 am    Post subject: Reply with quote

RC6 is also used in Philips TV remotes... (reminiscence of old electronic-related readings)

EDIT: Maybe was used.. not working on my 1yo Philips TV
Back to top
View user's profile Send private message
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Fri Aug 26, 2005 10:17 am    Post subject: Reply with quote

> Do you think reading is possible ?
Don't know. IRDA reading technology can be sometimes tricked to read "Consumer IR" signals - but that is rare depending on the hardware (and whether hardware pre-filters the IR input). Transmitting IR is usually more general.
FWIW: I use a CLIE for recording/analysing IR signals.

If someone were to make a CCF reader and interpreter (ie. an emulator for a Pronto remote), that would cover many of the needs for a "Universal remote" without hardware recording. If someone want to give that a shot, that would be cool.

NOTE: similar to the "Perfect Remote" on certain CLIE models. It handles many CCF files with the weakness of not being able to record non-standard ones.
http://www.geocities.com/sonyirclib/perfect.htm
---
> RC6 is also used in Philips TV remotes ... not working on my 1yo Philips TV
The "RC6" protocol describes the top level encoding.
It can be used in several ways. I am using the "mode 6A" as described here: http://www.xs4all.nl/~sbp/knowledge/ir/rc6.htm
Inside that format are Media Center specific remote control codes.
A Philips TV will probably use "mode 0" and Philips specific control codes.
---
That's why it is impossible to write a truely "universal" remote control. The challenge is to find all the different encodings and include them all, for every IR remote controlled device on the planet...
Most open source implementations fall short. Commercial products typically have their own database of remote code.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
LiquidIce



Joined: 04 Apr 2005
Posts: 55

PostPosted: Fri Aug 26, 2005 12:16 pm    Post subject: Reply with quote

A Pronto hex code reader would be perfect.

There are codes (discreets too!) for most brands on remotecentral:
http://www.remotecentral.com/cgi-bin/files/rcfiles.cgi?area=pronto&db=discrete&br=&fc=

I was attempting to use some of these utilitys to convert the pronto codes to an RC6A bitstream, but have not had much luck. There is a ton of information about the pronto format and conversions on this site (all the way at the bottom) http://home.tiscali.nl/m.majoor/projects__remote_control.htm
Back to top
View user's profile Send private message Visit poster's website
qiqiji



Joined: 26 Aug 2005
Posts: 2

PostPosted: Fri Aug 26, 2005 10:56 pm    Post subject: Reply with quote

Nice idea! PspPet

but it seems not work to me

i use this Media Center Remote (OEM by Philps)
it's usual ,isn't it? Some microsoft's document says it use RC6(not very sure.)


the led on my Remote's IR receiver will flash when i press some key on my PSP, but not work

is there anything i miss to get it work?

my psp is ver 1.50, test on Windows XP Media Center edition 2005
Back to top
View user's profile Send private message
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Sat Aug 27, 2005 1:09 am    Post subject: Reply with quote

> ...but it seems not work to me
Try turning off the "debounce" feature of Media Center.
As described here: http://blogs.msdn.com/mswanson/archive/2004/12/01/272766.aspx
[change registry setting, reboot]
This is a common problem for "universal remotes" (the PSP version tries to emulate the real remote, but obviously isn't working well enough)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
qiqiji



Joined: 26 Aug 2005
Posts: 2

PostPosted: Sat Aug 27, 2005 1:41 am    Post subject: Reply with quote

PspPet wrote:
> ...but it seems not work to me
>...Try turning off the "debounce" feature of Media Center.


thanks

but i get nothing changed after i modfiy the registry setting and reboot

i changed not only
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\idIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da

but aslo
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da

still not work

is there anything wrong with my registry setting?




picture here



thanks again
Back to top
View user's profile Send private message
LiquidIce



Joined: 04 Apr 2005
Posts: 55

PostPosted: Mon Aug 29, 2005 7:29 am    Post subject: Reply with quote

I've been doing some more research on the Pronto Code format, and trying to find ways to convert pronto codes to bitstream format that the PSP can understand. Then by using PSPPet's IR_SIGNAL_ON() and IR_SIGNAL_OFF() generate the correct pulses to control some of the IR gear.

I don't know too much about C, but I know enough about Pronto codes to be dangerous, so I'm posting what I do know so maybe someone else with the C coding skills can use it to make PSP compatible pronto codes a reality...

Quote:


Using the example Pronto learned volume up code for my Panasonic HDTV as refrence:

0000 0070 0000 0032 0080 0041 0011 000f 0011 0030 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 0030 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030
0011 000f 0011 0030 0011 0ac4

Concentrating on the actual 'data':
0080 0041 0011 000f 0011 0030 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 0030 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030 0011 000f
0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 000f 0011 0030
0011 000f 0011 0030 0011 0ac4

this can be translated directly in 'cycles'
0080 0041 -> $80 cycles of the carrier frequency (frequency set by 0070)
-> $41 'cycles' no signal
0011 000f -> $11 cycles of the carrier frequency
-> $0f 'cycles' no signal
etc.

which converts to (as a 'real' bitstream, each 'bit' being as long as half (?)
the carrier frequency) for the '0011 000f' part):
0011 000f -> $11 cycles of the carrier frequency (set by 0070)
1010101010101010101010101010101010
-> $0f 'cycles' no signal
000000000000000000000000000000

thus a bitstream of
1010101010101010101010101010101010000000000000000000000000000000


The general 'idea' is that, if you have the learned code, that generating
a bitstream for any hardware is relatively easy. The source code from PSPPet should not be too difficult to modify to accept the learned code
format. Something like this:


void send_IRbitstream(u16 cmd)
{
Pairs = cmd[3]
Timing = cmd[1] * SomeConversion
iL = 4
for (i = 0; i < Pairs; i++)
{
for (j = 0; j < cmd[iL]; j++)
{
IR_SIGNAL_ON (Timing)
IR_SIGNAL_OFF(Timing)
}
iL++;
for (j = 0; j < cmd[iL]; j++)
{
IR_SIGNAL_OFF(Timing)
IR_SIGNAL_OFF(Timing)
}
iL++;
}
}

where 'cmd' points to the learned code values (as values, not as ASCII...)




Huge thanks to Marcel Majoor for the help with this. If anyone has more info on this feel free to PM me.

I'm very curious to know what kind of range the PSP's IR emitter gets with normal consumer electronics to see if this is even work persuing.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group