Solved

InfraRed On Com2 ??

Posted on 2001-07-29
18
357 Views
Last Modified: 2010-04-04
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 ??
0
Comment
Question by:neostudio
  • 7
  • 4
  • 2
  • +4
18 Comments
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 17

Expert Comment

by:inthe
Comment Utility
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
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
Listening....
0
 
LVL 17

Expert Comment

by:inthe
Comment Utility
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
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
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
 
LVL 5

Expert Comment

by:Gwena
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 5

Expert Comment

by:Gwena
Comment Utility
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
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
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
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
I finally got to the site.

Kewl.
0
 
LVL 3

Author Comment

by:neostudio
Comment Utility
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
 
LVL 3

Expert Comment

by:SteveWaite
Comment Utility
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
 
LVL 2

Expert Comment

by:craig_capel
Comment Utility
Listening...
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
Comment Utility
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now