Possible IR application

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

Moderators: cheriff, TyRaNiD

Post Reply
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Possible IR application

Post by isles487 »

Hello all. I've had an idea for a psp program I'd like to try to write. The program would make use of the IR port to send AT commands to and receive feedback from a phone. I would appreciate it if somebody would answer some questions for me.

For this idea to work, would one need to write a serial terminal application? Otherwise, is my proposed idea possible? How difficult would such an application be to write? Thanks in advance for the responses.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

First you have to establish whether or not the device uses IRDA or SIRCS. Examples of both concepts are in the "Samples" folder of the PSPSDK.

You may find AhMan's IR Learner useful in IRShell.

I may be able to give you a hand with IRDA, however I belive that the PSP cannot send IRDA data, only SIRCS.

I know I haven't fully answered your question, but I hope my brief details lead you in the correct direction.

Angelo
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Hey, thanks for the info. The phone is a sony ericsson z520a. From searching around, most listings classify it as simply an "IR" port, but where this is any more detail, it is listed as IrDA. As far as sending IrDA data, unless I'm mistaken, I believe this app does that:

IrDA File Transfer Program

I did a quick test using the IR capture program. I tried the "send file" function on the phone, and the PSP screen showed random characters, repeatedly, and in a pattern, at regular intervals. In the midst of the jumble there is "Sony Ericssvi" in there.
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

Oh ok... this definatly means that your phone is IRDA. Those "random characters" you speak of are infact HEX values. Use a HEX editor to view them if you choose to spend hours interperating HEX data!

You could find out what kind of IRDA data is needed to run a command on your phone and attempt to send it via your PSP. You'll need to convert the HEX data into decimal for your PSP to send it.

Good luck with your project!

Angelo
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Hey angelo, thanks for the tips. I think I will purchase a IR usb dongle to interface my PC with the phone and see how that works. I could possibly capture some of the AT commands sent from the pc, and see if the PSP is capable at the least of re-sending these commands to the cell phone.

Minimal functionality would still be ok, for instance, receiving data from the phone on the PSP. I guess where I need to go from here is to read up (a lot) on the IrDA protocol. I want to try to figure out what to do once the phone has sent the data to the psp, for instance, I know that the phone will output some data upon message receipt, the trick is to convert this (using a hex editor, first, like you mentioned), for use with the PSP.
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Hey everybody, sorry to double post, just updating on where this is going. So i'm sure this isn't news to a lot of you, but I've ascertained that to send AT commands to a cell phone over IrDA, an IrComm connection will need to be established. The good news is that PSPIrda application already implements most of the IrDA stack that IrComm sits on top of. Can somebody clarify for me how the psp sends and receives IR data by default- is it just raw data, sent without any protocol?

This is a learning experience and it's going to take me time but I'm looking forward to tackling this head on. Thanks in advance!
angelo
Posts: 168
Joined: Wed Aug 29, 2007 9:34 pm

Post by angelo »

I think it's raw... In it's HEX form infact. No need to convert!

Angelo
isles487
Posts: 10
Joined: Tue Nov 18, 2008 4:42 pm

Post by isles487 »

Hey guys, so thanks again for the responses. I now have another question... For testing purposes I came up with the idea yesterday... what if I were to be using a serial cable for psp directly connected to the phone? I know others have done projects using "psp serial" so can anyone tell me how difficult it would be to simply be able to type AT commands thru serial and receive responses on the PSP from the phone?

I see that LUA has some really simple looking functions for reading and writing strings to "Serial." Will this be good enough for sending AT commands (Strings) and receiving them from the phone? All that's really needed here is basic serial terminal functionality.

EDIT-So it seems I've answered my own questions. I gather that there are samples that come standard with LUA and PSP-DEV that show basic terminal functionality. The issue now is that I've read that people have run into trouble using LUA for serial functionality, namely, it's too slow. But in a use like this, where the phone is not sending data continuously back and forth, would LUA be quick enough?
Post Reply