The conclusive evidence for this isn't actually in the spreadsheet, it is in the raw timings that IR shows up. The leadout time is far shorter for four of these signals than for all the others, down by a factor of 20. The alternate signal style in 0161 does use an alternate leadout, down by this factor of 20. The two other strange signals in fact have a third leadout time that UEI hasn't bothered to handle, but otherwise they fit the alternate profile.
I've studied what UEI does with this alternate signal style, combining that with the examples we have from the Sejin NightHawk signals, and light has finally dawned. I've called the normal style Sejin-1 and this unusual style Sejin-2 (which I think is the other way round from Rob's notes). Both styles have a common structure with two frequency variants:
Sejin-M-38 {38.8k,310,msb}<-1|1>(<8:4|4:4|2:4|1:4>(3,3:2,Dx:8,Fx:8,Fy:8,E:4,C:4,-L))+
Sejin-M-56 {56.3k,310,msb}<-1|1>(<8:4|4:4|2:4|1:4>(3,3:2,Dx:8,Fx:8,Fy:8,E:4,C:4,-L))+
where E is a checksum seed (0 in all known examples) and C is the checksum given by
C = (Dx:4 + Dx:4:4 + Fx:4 + Fx:4:4 + Fy:4 + Fy:4:4 + E) & 15.
The styles differ in the interpretation of the signal parameters Dx, Fx and Fy. Dx should be considered as an 8-bit signed integer, ie range -128 to +127. If Dx >= 0 the style is Sejin-1 and the leadout time L is 77m. This style is used for normal remote-control buttons. If Dx < 0 the style is Sejin-2 and the leadout time L is the much shorter 3.6m. This style is used for signals corresponding to a pointing device with up to 3 buttons. The short leadout allows for much faster repeat action.
The data parameters in Sejin-1 are 7-bit device and subdevice codes D and S, an 8-bit function code F and a toggle bit T. The signal repeats as long as the key is held, with T=0 for all frames except the last, T=1 for the last frame. The corresponding signal parameters are:
Dx = D, Fx:1:7 = T, Fx:7 = S, Fy = F.
Sejin-2 has a 5-bit device code D and no subdevice code. It further divides into two sub-styles, 2A corresponding to movement of the pointing device, and 2B corresponding to movement of its buttons. In Sejin-2A the data parameters are the coordinates (X,Y) of the displacement of a cursor and the signal parameters are:
Dx:6:2 = (-D):6, Dx:2 = 0, Fx = X:8, Fy = Y:8.
Note that X and Y can be negative, so Fx and Fy are signed 8-bit integers. The signal repeats indefinitely.
Sejin-2B corresponds to down and up movements of the buttons of the pointing device. A "down" signal is sent exactly once on button down (distinct for each button) and an "up" signal is sent exactly once on button up (same for each button). There is one data parameter, B. When B = 1, 2 or 3 it denotes button B down, when B = 0 it denotes button up. The signal parameters are:
Dx:6:2 = (-D):6, Dx:2 = B:2, Fx = 0, Fy = 0.
There are two differences, one of which may not be real, between the behavior of the UEI executor and the signal samples we have. The definitely real one is that Sejin-2B should have an extra-long leadout of 130m rather than the extra-short one of 3.6m, but presumably the UEI executor works anyway. The other is that the UEI Sejin-1 style always has a toggle that is 0 until the last frame, when it is 1. We have seen this toggle in the ADB signals in this thread but not in the Sejin NightHawk or Telefonica signals. Either they didn't get learned or they don't do any harm if they are not required, because again I presume the UEI executor works for these cases.
The UEI 0161 Rob has studied is present in RM as 0161:5. It can generate Sejin-1 and Sejin-2 signals in a common upgrade, but only Sejin-2 signals in which either Fx or Fy is zero (which is the case in the NightHawk learnings). For Sejin-2 it uses (-D)*4 as a device byte and has two function bytes. The first is the nonzero one of Fx and Fy (or 0 if both are 0). The second has B in bits 0 and 1 (0 for Sejin-2A), bit 4 is set for Sejin-2A and clear for Sejin-2B and bit 3 flags which of X or Y is nonzero in Sejin-2A (set for X, clear for Y).
I have put together two "front ends" for the existing 0161:3 and 0161:5 protocols in RM. You can find it in a file called Sejin.ini which you need to paste to the end of protocols.ini. The 0161:3 front end is called Sejin-1-N and can only generate Sejin-1 signals. The 0161:5 front end is called Sejin-M-N and can generate both styles in the same upgrade. The choice of Sejin-1 or Sejin-2 is made separately for each signal on the Function page. For Sejin-2 the Misc field in the DecodeIR output includes a 13-byte integer RMOBC which you enter into the column of the same name on the Function page. It is the two-byte function code in decimal form. For Sejin-1, RMOBC is just the usual OBC, the second function byte being 0.
I've put this new Sejin interpretation into DecodeIR and the output for the Sejin NightHawk signals is now
Code: Select all
LEARNED SIGNALS:
LEARNED CODE DATA
# Btn Key Protocol Dev Sub OBC Hex EFC Misc
1 CBL Power Sejin-1-38 16 0 8 08 082 E=0
2 CBL Up Sejin-2-38 2 0 delta = (0,6); E=0, RMOBC=4102
3 CBL Down Sejin-2-38 2 0 delta = (0,-6); E=0, RMOBC=4346
4 CBL Left Sejin-2-38 2 0 delta = (-6,0); E=0, RMOBC=6394
5 CBL Right Sejin-2-38 2 0 delta = (6,0); E=0, RMOBC=6150
6 CBL Select Sejin-2-38 2 1 Btn down (OBC=Btn nbr); E=0, RMOBC=256
7 CBL Menu Sejin-2-38 2 2 Btn down (OBC=Btn nbr); E=0, RMOBC=512
8 CBL VOL+ Sejin-1-38 16 0 88 58 208 E=0
9 CBL VOL- Sejin-1-38 16 0 104 68 081 E=0
10 CBL CH+ Sejin-1-38 16 0 56 38 211 E=0
11 CBL CH- Sejin-1-38 16 0 72 48 080 E=0
12 CBL 1 Sejin-1-38 16 0 89 59 200 E=0
13 CBL 2 Sejin-1-38 16 0 105 69 073 E=0
14 CBL 3 Sejin-1-38 16 0 121 79 201 E=0
15 CBL 4 Sejin-1-38 16 0 28 1C 178 E=0
16 CBL 5 Sejin-1-38 16 0 44 2C 051 E=0
17 CBL 6 Sejin-1-38 16 0 60 3C 179 E=0
18 CBL 7 Sejin-1-38 16 0 76 4C 048 E=0
19 CBL 8 Sejin-1-38 16 0 92 5C 176 E=0
20 CBL 9 Sejin-1-38 16 0 108 6C 049 E=0
21 CBL Mute Sejin-1-38 16 0 27 1B 218 E=0
I've tested the RM re-creation of these signals on my URC-7781 (HCS08 based) and all seems well. DecodeIR gives the same decode for the re-created signals as the above data from the original NightHawk. We don't have a "button up" learned signal, but it does show up when the RM re-created signals are used with Tommy's IR Widget.
____________________
Graham