InfraRed On Com2 ??

Hi,

i have a MA-600 (mobileaction.com) infrared device connected to my COM2 port, well, i want to make a simple program that will detect IrDA signals from other devices other that the mobile phone itself !!

I mean, when i point the TV-Remote, and send a signal, i want a MEMO1 on the form to get the transmitted signal .

To do this, i think we need some code to make the MA-600 IrDA start waiting for signals then detect them .

Any Ideas ??
LVL 3
neostudioAsked:
Who is Participating?
 
MindphaserCommented:
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0
 
neostudioAuthor Commented:
again,
a C++ file is here, it might help you get something fore me....

http://www.durrow.com/main_file.php/Geek+Stuff/5/


0
 
neostudioAuthor Commented:
what about this code found on a russian site ??

// O?oaiiaea e?iieuco?ii?i ii?oa
procedure Setup_PORT;
begin
case Port_use of
1 : AdrCom:=$3f8; aa??? ?ii1
2 : AdrCom:=$2f8; ?ii2
3 : AdrCom:=$3e8;
4 : AdrCom:=$2e8;
end;
end;
// Eieoeaeecaoey ii?oa
procedure InitPort;
asm
// mov dx,0
mov ah,0
mov al,11101010b
int $14
end;
// i???aa?a aaiiu? a ii?o
procedure TxCom;
asm
mov al,outport
mov dx,AdrCom
out dx,al
end;
// ?o?ie? aaiiu? ec ii?oa
procedure RxCom;
Label waits;
asm
waits: MOV DX,AdrCom
ADD DX,5
in Al,Dx
test al,00000001b //i?eaaie? iieo??iey iiai?i aeoa
Jz waits
MOV DX,AdrCom
in al,dx
mov inport,al
end;
// I?io?ao?a auiieiy?iay a ieoe
procedure Rxpas;
var
count:integer;
begin
for count:=1 to size_bl do begin // io?e ???o?eea aaeo
RXCom;
inport_str:=Concat(inport_str,Chr(inport)); //caie?u ??eoaiii?i aaeoa a ?o?ieo
end;
end;






any ideas??
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
intheCommented:
hi,
the code above is just standard port code but youll need a bit more for irda like the irda consts etc.

this may help:

http://17slon.com/gp/gp/twircommsocket.htm




0
 
neostudioAuthor Commented:
Hi inthe,

i got a component that opens the port and send and gets data from it, and i am now into a new problem, is how to capture the recieved data, it says when i puch any button on my TV-remote control that 14Bytes has bees recieved, but how can i get them into binary or a string or anything that i can see ??


any more ideas ??
0
 
neostudioAuthor Commented:
Inthe,

i downloaded the component you told me about but this was using the port installed on the system to communicate, what i am behind is to try to make an application that will for example play with the system sound settings when i press Vol+ | Vol- on my TV-Remote Control !!

i am trying to remot-ize my PC !!
will 1000 points be enough !!!??????

thanks anyway inthe .


PS everybodt>
i reserve the right to delete the question if no answer within 72 hours from now .
0
 
gemartiCommented:
Listening....
0
 
intheCommented:
hi neostudio,
sorry cant help more but i never done nothing with irda ,and looking at your ma-600 it looks like it uses a driver to talk to its software with.
i dont know how you tell which key was pressed on remote control maybe the signal sent is different therefore you'd need to know what signal meant what button..i dunno..
i have a infrared port on my laptop for using with my 6210 but it seems it different to use than with your unit.

0
 
gemartiCommented:
Just a comment...since I am more interested in this than I am a contributor.

A long time ago I ran across this program for my PalmV that allowed me to change channels etc. So I went looking for the code. No luck, but I did find a comment made by the PalmOS people that may be of interest to you...It's probably discouraging but here:

    --------Excerpt from PalmOS site -------
Officially, the answer is No. The Palm handheld's IR capability is IrDA compliant, which means we support the SIR physical layer of IrDA. IR remote controllers use a different modulation frequency than IrDA, and our hardware does not permit us to change the modulation frequency from software.

However, some enterprising developers have developed IR remote control applications, so it is technically possible. They probably don't use the IrDA protocol stack; instead, they open the serial port and read data, ignoring errors like parity. The captured information can then be played back.

You'll probably need to experiment with settings such as baud rate and parity until you come to an optimal setting.

   ----------------END-------------------------
So basically what I read is that it can be done with an IRDA device, but it will probably be buggy as you know what.
I'm interested in seeing how this thread develops!

0
 
GwenaCommented:
This is an interesting question neostudio :-)

I have played with getting ir remote control data using the printer port... using a phototransistor across one of the ports input lines and ground.... but that was using asm on the bare machine... I hope someone comes up with a solution for you..it would be very cool to be able to get the codes using delphi on windows :-)
0
 
neostudioAuthor Commented:
Hi everybody,

Inthe>>
as i told you i managed to get the unit to recieve my TV-Remote signals, but i am know having a problem translating them to text, i know that each signal is 14 bytes, and that the break chr is #0 and some more info, but i need to translate these 14 bytes to a string, lets say a hex string !!


gemarti >>
as ana answer to your commentm thanks for being interested in first place, and in second take a look at http://fsinfo.cs.uni-sb.de/~columbus/lirc/ , Linux manages to translate the signals of a wide range of remote controls, would have been great if we'll manage to do so !!

Gwena >>
Mybe you will be the one :-)


Thanx everybody....
Listening for more...
0
 
GwenaCommented:
It's not very hard to use asm to record the timing of the IR signals from a remote using a simple phototransistor on the lpt port... then you simply send the same sequence of pulses back out the port to an IR led (using a current limiting resistor) and it will control a TV or whatever... but since the signal is not modulated at 38khz it is many DB down in strength so you nearly have to tape the led to the IR transparent window thats over the sensor on the TV to get it to work... If you wanted to send a strong modulated signal you could simply key a 555 timer that was set to oscillate at 38khz... and use it to drive a few IR LED's ... you could use a bunch of IR LED's if you added an npn transistor to the 555 to drive them....
I never could find a way to get WinDoze to control the port and send the signals...the timing was not accurate enough :-(  I had an idea to try and create small wav files that matched the IR signal pattern of a remote and drive LED's from the output of the sound card...but I never tried it... it was soooo Rube goldberg...

If I really wanted to send remote control signals to my computer (like maybe for making a DivX Jukebox) I would get one of those tiny little circuit boards that has an IR sensor in it that reacts only to 38khz IR... I think they are about 4$ ... then I would use the computer to create some -S L O W- IR patterns and I would use those patterns to set some buttons on one of those 'learning remotes' you know, the ones where you hold one remote next to it and it can record the signal patterns..
Maybe windows would be fast enough to allow you to write a delphi app that watches the lpt port for these slow signals... hook the 38khz IR decoder board to an lpt port in line and ground....these things are really sensitive so it would pick up a remote signal from at least 20ft or so...

0
 
gemartiCommented:
Still watching this thread..

I couldn't get to the link you posted. But went hunting around and found some info that may or may not be useful to you..

http://www.cswl.com/whiteppr/white/infrared.html
http://www.livesoundengineer.com/?/win2kirda.html
0
 
neostudioAuthor Commented:
thanks gemarti,

i will try to ask you to look here..
this person did exctly what i want, and he is gibing the C++ source code !!

try to look !!
0
 
gemartiCommented:
I finally got to the site.

Kewl.
0
 
neostudioAuthor Commented:
Hi

as i said on my comment at 29/7/2001 on 2:25 !!


i reserve the right to delete the question if no answer within 72 hours from now .


So, i want to delete it because i need the points anfd no answer was as great as expected
0
 
SteveWaiteCommented:
As in the palmOS excerpt, I think they just do standard serial comms as in CreateFile() then read/write the file and code your own command set.
0
 
craig_capelCommented:
Listening...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.