OS2 World.Com Forum

Subject  :  Serial-Port Remode Control
Author  :  Fudeba daniel@caetano.eng.br
Date  :  29 Sep, 2004 on 03:55
This weekend I received my new video capture board... and a remote control was bundled with it.
There is a IR sensor which is designed to be attached to the serial port. I connected it on Serial Port COM2. The control has an IR emmiter, as any common remote control.
I want to develop a program to receive information from the remote control, based in the trial-and-error approach (hit the button and verify what is the input in the serial port), using OS/2's DosDevIOctl to COM2.
But I could not understand how can I do it... Every code sample about serial port shows me a terminal program, how to comm between two computers and so on... and I do not have a clue on how to read the data sent by the remote control.
Any ideas? This could be the base for a generic OS/2 remote control application, and define a standard remote control API so other programs could benefit from the remote control.

Regards,


Subject  :  Re:Serial-Port Remode Control
Author  :  ecs1
Date  :  29 Sep, 2004 on 20:26
The serial port can transmit any character of decimal value 0 to 255. So a terminal program is useful to transmit text that is encoded in ASCII characters. For example you type an "A" and the other side receives an "A". That's the simplest way to transmit data through an RS-232. When you are dealing with devices like your remote, most developers design a protocol to transmit data. These protocols are nothing but an organized series of decimal numbers (0-255). The strings of data may include a start indicator, numbers of bytes to follow and a CRC for data integrity checks. The trick for you is to figure out this potocol before you can write any code. It's not impossible, but it can be a lot of work and the vendor (most likely) is not going to help you. You may want to search the internet to see if there is any open source available for this device. You may be able to extract the necessary info from that.

Subject  :  Re:Serial-Port Remode Control
Author  :  DavidG
Date  :  30 Sep, 2004 on 00:28

Fudeba (29 Sep, 2004 03:55):

But I could not understand how can I do it... Every code sample about serial port shows me a terminal program, how to comm between two computers and so on... and I do not have a clue on how to read the data sent by the remote control.

Regards,


Could you tell me what terminal program and where it is found?

David


Subject  :  Re:Serial-Port Remode Control
Author  :  Fudeba daniel@caetano.eng.br
Date  :  30 Sep, 2004 on 01:57
The only "comm" application which "talks" to the remote control is the one that comes with Pinnacle PCTV card...
Anyway, I already figured out how it works. Testing the Remote Control program under ODIN and using SIO serial drivers and "Poor Man's Line Monitor", I was able to view the data / connection type used for the device.
Soon I'll release something... And will try to make it extensible to other serial-port based remote controls.

Regards,


Powered by UltraBoard 2000 <www.ub2k.com>