Author: bir8339e

How to: setup wakeup with your IR remote control

[Copy link]

0

threads

1

posts

6

credits

Novice

Rank: 1

credits
6
Published in 2016-11-4 04:56:46 | Show all floors
Working great on Openelec. Just one little problem, could it be that script.bin got overwritten with an automatic update?
Suddenly my wake up with the remote was not working anymore. When I checked my script.bin, everything changed back like before?

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2016-11-4 05:12:30 | Show all floors
Yes, this is explicitly stated on dowload page.

This behaviour is forced, because some bugs in the past were solved simply by changing script.bin. My goal is to provide sane defaults and anyone could change them afterwards.

0

threads

2

posts

24

credits

Novice

Rank: 1

credits
24
Published in 2017-1-10 03:42:52 | Show all floors
Edited by C_3AXAPOB at 2017-1-10 03:48

Not working for me too

My lircd.conf

  1. begin remote

  2.   name  /storage/.config/lircd.conf
  3.   bits           16
  4.   flags SPACE_ENC|CONST_LENGTH
  5.   eps            30
  6.   aeps          100

  7.   header       8940  4441
  8.   one           586  1644
  9.   zero          586   527
  10.   ptrail        582
  11.   repeat       8934  2236
  12.   pre_data_bits   16
  13.   pre_data       0xBF
  14.   gap          140322
  15.   toggle_bit_mask 0x0

  16.       begin codes
  17.           KEY_SLEEP                0x48B7
Copy code


My pre-data and KEY_SLEEP conversion
  1. pre_data = 0xBF = 1011 1111 => (bit-reversed) => 1111 1101 = 0xFD = Y
  2. KEY_SLEEP = 0x48B7 => code = 0x48 => 0100 1000 => (bit-reversed) => 0001 0010 = 0x12 = X
Copy code


and my script.fex

  1. [s_cir0]
  2. ir_used = 1
  3. ir_rx = port:PL11<2><1><default><default>
  4. ir_power_key_code0 = 0x12
Copy code


and...no magic on my Orange pi pc plus. Maybe i made wrong conversion?

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2017-1-10 05:14:37 | Show all floors
Your conversion is ok, except one slight detail. pre_data_bits is 16, which meanst you have to take into account 16 bit value not 8 bit.
Try with this conversion:
0x00BF => 0xFD00

  1. [s_cir0]
  2. ir_used = 1
  3. ir_power_key_code0  = 0x12
  4. ir_addr_code0       = 0xFD00
Copy code

0

threads

2

posts

24

credits

Novice

Rank: 1

credits
24
Published in 2017-1-11 03:06:26 | Show all floors
Thank you jernej! Now it is working perfect!

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2017-1-11 04:38:35 | Show all floors
Edited by jernej at 2017-1-24 21:36
giaur500 replied at 2016-10-19 17:14
Not working for me. My pre_data from lircd.conf = 0x202, so:

I know I'm bit late, but I think you made a mistake for one bit. Try this:
EDIT: Miscalculated, original values are correctly calculated.

0

threads

3

posts

16

credits

Novice

Rank: 1

credits
16
Published in 2017-1-21 07:03:09 | Show all floors
Edited by Teo666 at 2017-1-21 07:21

Hi everyone, I'm trying to add the wakeup function to my OrangePi PC Plus, but I found something strange..
Here's a portion of my lircd.conf:

  1. begin remote

  2.   name  /storage/.config/test-lircd.conf
  3.   bits           16
  4.   flags SPACE_ENC|CONST_LENGTH
  5.   eps            30
  6.   aeps          100

  7.   header       8997  4482
  8.   one           595  1665
  9.   zero          595   546
  10.   ptrail        586
  11.   repeat       8980  4415
  12.   pre_data_bits   26
  13.   pre_data       0x1A1F2F
  14.   gap          144358
  15.   toggle_bit_mask 0x0

  16.       begin codes
  17.           KEY_ZOOM                 0x807F
  18.           KEY_POWER                0x00FF
  19.           KEY_1                    0xC03F
  20.           KEY_2                    0x20DF
Copy code

It shows "pre_data_bit 26", so how could I convert "pre_data 0x1A1F2F" ??
I've tried this:

  1. 0001 1010 0001 1111 => 1111 1000 0101 1000 = 0xF858 = Y = 63576
Copy code

and:

  1. KEY_POWER        0x00FF

  2. 0000 0000 => 0000 0000 = 0x00 = X = 0
Copy code

but nothing happens..

Could anyone help me?
Thanx a lot!

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2017-1-21 20:19:32 | Show all floors
That is certainly strange. Did you try to delete lirc config and run setup again?

0

threads

3

posts

16

credits

Novice

Rank: 1

credits
16
Published in 2017-1-21 21:11:36 | Show all floors
I tried to reconfigure lircd.conf many times with same results!
This lircd.conf and remote work well with Openelec/OSMC installed on a RaspberryPi with GPIO IR receiver..
lircd.conf files generated with different hardware are identical.
Another problem I have sometime is the infinite repeat of keypress, I've tried with min_repeat and suppress_repeat option and also with advancedsettings.xml but nothing changed, the problem seems randomly present, there's no _UP event (see irw below).
  1. 6c 0 KEY_DOWN_UP devinput
  2. 6c 0 KEY_DOWN devinput
  3. 6c 1 KEY_DOWN devinput
  4. 6c 2 KEY_DOWN devinput
  5. 6c 3 KEY_DOWN devinput
  6. 6c 4 KEY_DOWN devinput
  7. 6c 5 KEY_DOWN devinput
  8. 6c 6 KEY_DOWN devinput
  9. 6c 7 KEY_DOWN devinput
  10. 6c 8 KEY_DOWN devinput
  11. 6c 9 KEY_DOWN devinput
  12. 6c a KEY_DOWN devinput
  13. 6c b KEY_DOWN devinput
  14. 6c c KEY_DOWN devinput
  15. 6c d KEY_DOWN devinput
Copy code

Is that possible to use external IR receiver from RaspberryPi for debug?
Thank you for your help!!

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2017-1-22 01:30:45 | Show all floors
I don't know if anyone managed to make GPIO IR driver working. If you say that it produces the same results, that's it. You can't use it for waking it from sleep. Try converting exactly 26 bits as it is said. But 26 is really strange number, 24 would be more reasonable. Do you have any other NEC remote at your disposal?
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list