InfraRed On Com2 ??


i have a MA-600 ( 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 ??
Who is Participating?
Points refunded and moved to PAQ

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

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

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

any ideas??
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.

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

this may help:

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 ??
neostudioAuthor Commented:

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

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.

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!

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 would be very cool to be able to get the codes using delphi on windows :-)
neostudioAuthor Commented:
Hi everybody,

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

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..
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 !!
I finally got to the site.

neostudioAuthor Commented:

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