Skip to main content
Topic: Problems with IR command replay from command prompt (winows) (Read 1570 times) previous topic - next topic

Problems with IR command replay from command prompt (winows)

Hello,

I purchased the USB Infrared Toy v2 to turn on and off my beamer. My Computer (Win 7 x64) should be able to send the corresponding IR commands via batch files run by time scheduler.

The USB device itself seems to work well. I updated the firmware to v22, the self test works and I am able to record and send data produced with my Philips remote control with irtoy.exe.

Unfortunately, the data patterns of my Optoma remote control are not correctly recorded or send. My beamer is not recognizing the replayed data. I think it has something to do with the carrier frequency.

I tried it with the more powerful winlirc software which was successful. With winlirc and the program Transmit.exe I am able to send commands via command prompt. Unfortunately, this is only possible, when I start the command prompt and click one time with the mouse at the WinLIRC Window. If not, the Transmit.exe program is not able to access the hardware.

Is there any straightforward way to replay the data pattern via command prompt?

Attached is the record from the off button with irtoy and winlirc

Code: [Select]
IR Toy said:
00  A0  00  D5  00  16  00  1E  00  15  00  51  00  16  00  1E  00  16  00  1D
00  16  00  51  00  16  00  51  00  16  00  1D  00  16  00  1D  00  16  00  51
00  16  00  1D  00  16  00  51  00  16  00  51  00  16  00  1D  00  16  00  1D
00  16  00  51  00  16  00  51  00  16  00  1D  00  16  00  51  00  16  00  51
00  16  00  51  00  16  00  1D  00  16  00  51  00  16  00  1D  00  16  00  1D
00  16  00  51  00  16  00  1D  00  16  00  1D  00  16  00  1D  00  16  00  51
00  16  00  1D  00  16  00  51  00  16  00  51  00  16  07  54  00  A1  00  6C
00  16
IR Toy said:
FF  FF

Code: [Select]
begin remote

  name  ..optoma.cf
  bits          16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header      8893  4541
  one          476  1726
  zero          476  613
  ptrail        478
  repeat      8893  2300
  pre_data_bits  16
  pre_data      0x4CB3
  gap          107510
  toggle_bit_mask 0x0

      begin codes
          on                      0x40BF
          off                      0x748B
      end codes

end remote

Re: Problems with IR command replay from command prompt (win

Reply #1
The LIRC con file look like a standard NEC 32 bit signal, ut with the timings a bit off. If I am correct the timings should be 9000,4500,560,1690. Changes these may deliver better performance.

The raw IRtoy output does not seem to correlate to the same signal, as the header values are incorrect

A0 hex = 160 decimal * 21.3333 = 3413. This looks incorrect or at least one of the signals you posted is incorrect. The other values seem correct.

try changing the first 2 hex values from
00 A0

to

01 A6
.... to get you 9000/21.3333 or 0x01A6

you may have to use a hex editor or write a script

 

Re: Problems with IR command replay from command prompt (win

Reply #2
Alternatively, keep recording until you get a signal that starts wit 01 A6....

Re: Problems with IR command replay from command prompt (win

Reply #3
Thank you very much! Editing the IR Toy file solved my problem!

In terms of my WinLIRC problem I also found a solution. Instead of running WinLIRC in background and starting Transmit.exe to transmit, I created a batch file which starts WinLIRC and than Transmit.exe. After transmission is completed WinLIRC is closed. Because the processes are run from the same console environment, there are no problems with inter process communication. The batch file locks like this:

Code: [Select]
start %WINLIRC%winlirc.exe
timeout /T 1
%WINLIRC%Transmit.exe ..optoma.cf on 0
timeout /T 1
taskkill /IM winlirc.exe

I decided to add an timeout just to be sure the main program is fully loaded and the com port is opened before I start the transmit attempt. The second timeout is just to be sure the transmission is completed before I kill the process. Maybe both timeouts are not necessary...

Re: Problems with IR command replay from command prompt (win

Reply #4
super!