Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Lua IR?

                  
   
  1. #11
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    70

    Default

    cheers dude. If there was rep i would give you +5

    edit: lua says
    error: index.lua:7: bad argument #1 to `byte` (string expected, got nil)
    line 7 is "Byte[i]=string.byte(codes:read(1))"

  2. #12
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    69

    Red face

    whoops, better retract those +reps..
    ok,try replacing the loop with:
    PHP Code:
    repeat
    i
    =i+1
    char1 
    codes:read(1)
    if 
    char1 then Byte[i]=string.byte(char1end
    until not char1 
    & you may want to add
    PHP Code:
    numberOfCodes i-

  3. #13
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    70

    Default

    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.

  4. #14
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    69

    Default

    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...

  5. #15
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    70

    Default

    epp a full scale driver >_< too much work me thinks

  6. #16
    DCEmu Newbie
    Join Date
    May 2007
    Posts
    91
    Rep Power
    0

    Default

    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.

  7. #17
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    69

    Arrow

    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..

  8. #18
    DCEmu Newbie
    Join Date
    May 2007
    Posts
    91
    Rep Power
    0

    Default

    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.

  9. #19
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    69

    Default

    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.

  10. #20
    DCEmu Newbie
    Join Date
    Mar 2007
    Posts
    29
    Rep Power
    0

    Default

    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.

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •