PSP Peripheral Help - Interface to something...else?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Klimru
Posts: 34
Joined: Sat Apr 09, 2005 7:29 am

PSP Peripheral Help - Interface to something...else?

Post by Klimru »

I've been looking for a way to interface the PSP to some other customer hardware of mine. I've noticed that there is a block device (irda) for the IR port (I havent fooled with it yet). Has anyone messed with it yet?

Like, possibly bust out a web cam and aim it at the IR port while messing with it?

Or, more helpfully... has anyone tinkered with the USB or the port near the headphone jack?

I can make hardware to interface with any of these... but I need a way to make the PSP end work, software-wise.

Any help appreciated.

-Klim
User avatar
Danj
Posts: 70
Joined: Sun May 15, 2005 5:04 am
Location: Peterlee, DURHAM, UK
Contact:

Post by Danj »

There's been a considerable amount of analysis done on the remote port (the one next to the headphone jack) in this thread. I think a couple of the functions relating to IR have been found, but I don't know whether anyone has tried to put them to use yet (also, rather than a webcam I think it'd be better to use something like a pyroelectric infrared detector or a phototransistor). I have seen what is allegedly a video of someone from the Mobilehackerz group (the people who make 3GPP Converter) using an IR keyboard with a PSP, but their site doesn't give any details on how it was accomplished.
Dan Jackson
Klimru
Posts: 34
Joined: Sat Apr 09, 2005 7:29 am

Post by Klimru »

Thanks for the info. I've read that thread, but, I havent really found any way to use that port or the IR from within custom PSP software.

What would be perfect for me would be something where I could just toggle an I/O line or the IR LED. But, I suppose that may be asking for too much. lol.

I really only need to output data for the project I'm considering, but input would be nice as well. I'll be completely happy with just output, though.

Thanks again

-Klim
User avatar
Danj
Posts: 70
Joined: Sun May 15, 2005 5:04 am
Location: Peterlee, DURHAM, UK
Contact:

Post by Danj »

There's a (small) list of IR related functions in this post by Vampire, don't know if that's of any help to you?
Dan Jackson
Klimru
Posts: 34
Joined: Sat Apr 09, 2005 7:29 am

Post by Klimru »

I was actually just working on some test code to poke around at those functions. Not quite sure what I'll end up with, though.
Vampire
Posts: 138
Joined: Tue Apr 12, 2005 8:16 am

Post by Vampire »

the PSP supports two diffrent IR modes: IrDA and SIRCS

IrDA (Infrared Data Association) is used for two way communication between two devices to transfer data over a short distance (a few centimeters). IrDA operates at a wavelength of about 875 nm.

SIRCS (Sony Integrated Remote Control System) is used for one way communication over a longer distance (a few meters). it's like a IR remote control. SIRCS operates at a wavelength of about 950 nm.

to use IrDA you can open the irda-block-devie with sceIoOpen("irda0:", O_RDWR, 0) and then you can read and write to it with sceIoRead and sceIoWrite. By default it uses 9600bps, 8 data-bits, no parity-bit, and 1 stop-bit. These parameter can probably be changed with sceIoDevctl. sceIoRead return 0 when there is no data to read.

SIRCS can be used for one way communication. you can send data (SIRCS commands) with sceSircsSend.
Klimru
Posts: 34
Joined: Sat Apr 09, 2005 7:29 am

Post by Klimru »

Perfect. Exactly what i needed. Thanks!
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

I got myself a cheap irda/usb dongle for my pc.

Writing garbage to the psp irda0: and then reading the pc response gives results like these:
0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0 0xc0
0xff 0x3f 0x01 0x27 0x08 0x00 0x00 0xff 0xff 0xff 0xff
0x01 0x04 0x00 0xa7 0x8a 0xc1
This would appear to be an irlap frame, as the first 11 bytes are BOF and last byte is EOF. Irlap is similar to the data link layer of the osi network model. It, and several other layers of abstraction are required before any comms takes place (fake serial port, networking etc).

So, could someone point me in the direction of a psp implemented irda protocol stack? Perhaps there is a commercial title that can communicate via irda?

... and i found the irda works up to 1m
Nick Fury
Posts: 45
Joined: Wed Jun 22, 2005 12:14 pm

Post by Nick Fury »

I have an oscilloscope on its way to me for research purposes. I'll cobble together an IR receiver of some sort and I'm more than willing to do testing for you guys.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

what's a cro going to tell you that printf can't?
Nick Fury
Posts: 45
Joined: Wed Jun 22, 2005 12:14 pm

Post by Nick Fury »

A load more than you realize if you've never done dev with IR before. I'm not saying you haven't mind you.

Speaking from personal experience with doing development work on IR and wireless communication a scope allows us to see what the machine is outputting and not just printf statements which are what the program is outputting.

Yeah, you can probably get 90% of the same stuff but it's not always the case. Anyway, my scope should arrive in a few days and my offer is out there.

Scope is coming for some robotics projects I'm working on by the way.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

See this topic for an IrDA communication between two PSPs.
Post Reply