Jump to content
Flirc Forums

sending IR commands on ubuntu


tirtho
 Share

Recommended Posts

I got the debug output from your app, 

 

how would I send this out using ir_transmit.c

 

 

0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626

:e:40

0,9041,2181,621

 

Link to comment
Share on other sites

This is an NEC code:

This is the timing marker for the button:

0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626 

This is the elapsed time in between the next signal it receives: e40 <-- 40ms

This is specific to the NEC specification which stands for repeat the last thing you saw: 0,9041,2181,621

Here is the commandline:

sendir --pattern=0,153,1231,131 --repeat=3 --ik=32000

So the first is the pattern, how many times we want to repeat the pattern, and the time between the signals. In the case above, it is 

0,153,1231,131 (wait 32ms) 0,153,1231,131 (wait 32ms) 0,153,1231,131

But for NEC, it gets tricky, because the follow-up pattern is simply no the first. So for this, we have a few options.

Send the first packet only once:

flirc_util sendir --pattern=0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626

Send the first packet a few times:

flirc_util sendir --pattern=0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626 --ik=40000 --repeat=3

Or alter the signal so that the first includes the repeat signal. The initial 0 is the timing marker, we remove that, so it becomes:

0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626 + 400000,9041,2181,621 ->

flirc_util sendir --pattern=0,9043,4430,652,1563,651,439,622,465,625,465,622,465,621,465,626,465,621,465,621,469,622,1589,625,1589,626,1589,644,1571,648,1563,626,1590,626,1589,647,1563,652,439,621,465,622,469,621,465,621,465,626,465,622,465,621,469,622,1589,626,1589,622,1589,652,1563,626,1590,621,1590,651,1564,626,40000,9041,2181,621,40000,9041,2181,621,40000,9041,2181,621

Link to comment
Share on other sites

  • 2 weeks later...

I ended up getting this working, on my own just realised you posted this thx for the info. Whats interesting is the  --pattern= syntax is not liked by the latest git debug compilation not sure if something changed. in anycase I figured it out and posted a how to on how to turn on my heater, I have a few other applications. thx

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...