whoops, better retract those +reps..
ok,try replacing the loop with:
& you may want to addPHP Code:
repeat
i=i+1
char1 = codes:read(1)
if char1 then Byte[i]=string.byte(char1) end
until not char1
PHP Code:
numberOfCodes = i-1
cheers dude. If there was rep i would give you +5
edit: lua says
line 7 is "Byte[i]=string.byte(codes:read(1))"error: index.lua:7: bad argument #1 to `byte` (string expected, got nil)
whoops, better retract those +reps..
ok,try replacing the loop with:
& you may want to addPHP Code:
repeat
i=i+1
char1 = codes:read(1)
if char1 then Byte[i]=string.byte(char1) end
until not char1
PHP Code:
numberOfCodes = i-1
ah i give up. its too hard. whenever i use irdacapture to capture it, it always changes. i cant get it to go up because my capture doesnt change. thanks for the help though.
ah well , it was a good idea, but it sounds like
the helicopter has some kind of recieve/transmit protocol, meaning
you'd have the small matter of a full scale driver to script.
I guess your best bet may be -Xandu-'s (possible) ir learner...
epp a full scale driver >_< too much work me thinks
So after doing some researching, it seems no one has made an irda capture and transmit application. The most I can find is at the ps2dev forums where it was talked about but standard ir signals for remote signals are spaced out. The ID signal and function signal are separated so simply grabbing the ir data isn't good enough.
apsd wrote an ir emit app along with his ir capture app but because of the signal spacing, it wouldn't work for ir remotes.
Can someone clue me in on how to implement irda timing capture in a lua app? There's already a lua app to capture but how easy would it be or is it possible to implement that feature in the lua app?
I've googled for hours and can hardly find much irda functions for lua. I haven't started any kind of lua programming other than the hello world bit but I just want to make sure it's possible with that language before I go on.
EDIT: Sorry, wrong thread. I suppose it will still fit the topic in this thread anyhow. I've got a dozen tabs open googling around.
Hey,Respect & +rep. I like the way your going about this.
What you found may explain why the helicopter didnt take off.
Luaplayer has millisecond Timer functions; should be
accurate enough for signal Spacing, so no probs. there.
It may be ok just to transmit Bytes at some slow speed -say
10 per second,at least for a simple device
ID/function separation: Not sure about this. Think its to
distinguish signals in a multi-Irda device environment, and
handled automatically in the PSP F/wares' Irda module..
By the way, there's a lot of possibilities for the ir port but no licensed software by Sony that makes use of it? So what was Sony's intention with this?
Anyhow, I'm sure you're right about the ID/function signals being mainly for electronically noisy environments. Although, I do believe the PSP's ID/function data is not sent in an ir signal. I believe when capturing the ir packets, the original device ID is recorded and sent to the receiving device, at least, my take on it.
The problem, from what I read, is that all signal spacing in ir transmissions are different on a couple levels. I thought of making a program that would detect the device ID from the ir data and call on pre-fabbed codes based on that, but the number of codes would be too great, come to find out due to all the variations between models and manufacturers.
I'm obviously a noob at coding but would it be feasible to count every break in the ir signal with lua, as in, keep the timer running so we can record true-to-timing signals?
There's been others that have sort of delved into this and before I waste my time, I'm just wondering if it's all possible since I haven't heard of this kind of app before for the psp. And with all the talented coders, I may be just spinning my wheels if I found out it's been done before or just unfeasible to implement.
I've heard of devices being able to be used as remotes by converting ir signals to audio and then back to ir for mobile PC's and even ipods, so the PSP definitely seems capable one way or another. I just want ultimately to take ir data and spit it back out as perfectly as it received it, that way I could duplicate pretty much any remote or remotely control my car radio if I so wish or possibly duplicate my PS2 wireless controller so the PSP is now a PS2 controller. Yes, there's less buttons but proof of concept and boredom reign superior to needs sometime. Also, to record that data into .rdf code for use in irshell or ircommander for all other PSP owners to use if so wished.
Irda data transfer is slow,even compared
to a Lua program(interpreter,garbage collector,FW overheads
& all),so to accurately record every Byte detected by System.irdaRead(),
along with its time of transmission, and to replay the same
data,with the same timing, with System.irdaWrite(), appears feasible,
assuming that System.irdaInit() sets any ID correctly.
Luaplayer Timers can be started,stopped,read,or reset as
required.
At this stage a simple test script would be useful to find
any possible problems.
So was anyone able to get the data to transmit back to the device?
Since the app gets/dumps RAW data, RAW data changes everytime. So it will never be the same.
But we need something to dump PRONTO codes to a file on the memory card.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks