Author Topic: Reverse Engineering a Theme Park Interactive Lantern  (Read 1687 times)

0 Members and 1 Guest are viewing this topic.

Offline TT3DTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Reverse Engineering a Theme Park Interactive Lantern
« on: October 29, 2026, 03:35:25 pm »
Six Flags / Cedar Fair interactive lantern (LightUpToys) - IR + 2.4 GHz

I've been taking apart one of the interactive light-up lanterns sold at the parks (made by LightUpToys Com LLC). In the park it changes color/patterns near shows and certain areas. At first I thought it was all IR based as there is a pair or emitters and receivers. I brought a flipper to Carowinds to capture these but it was a weekend before Fright Fest and there was no way to test. This past weekend I bought a lantern and my flipper hoping to capture the IR signals from around the park but it turned out to be RF instead. I found two of the RF beacons used to send roller coaster themed effects within a roughly 25-50' radius.

Photos of the beacons and my modded lantern: https://imgur.com/a/CgWpZDd

  • Lantern-to-lantern effects are IR (fast NEC-like frames, 38 kHz).
  • Park effects come in over 2.4 GHz via an XN297LBW radio (not BLE, not sub-GHz). The lantern only receives.
  • Radio config: channels 27/52/71 (2427/2452/2471 MHz) hopping every 16 ms, 1 Mbps, 5-byte address CC CC CC CC CC, fixed 32-byte payload, CRC16, no auto-ack, scrambling on.
  • The radio is only on in interactive mode; game/tag mode powers it down.
  • Still need: an actual beacon payload. I built two tools for capturing at my upcoming Cedar Point visit this weekend.


Hardware



  • Main MCU: unmarked TSSOP-20 (markings removed). Pinout may match STM8S003 or N76E003, not confirmed.
  • 5-pad header next to the MCU: GFSCK, GFSDA, WSSDA, +3.3V, GND (probably the programming port).
  • Radio: Panchip XN297LBW (SOP-8) with a 16.000 MHz crystal and a printed meander antenna.
  • XN297LBW pinout (datasheet): 1 CSN, 2 SCK, 3 DATA (3-wire SPI, shared data line), 4 VDD, 5 XC1, 6 XC2, 7 GND, 8 ANT.
  • SPI lines go to the MCU through 100 ohm series resistors. SPI is bit-banged, about 530 kHz.
  • Also on the board: 7533 3.3 V LDO, boost converter, two vibration motor connectors, power switch connector, mode switch, separate IR TX/RX + LED board.



IR (captured with a Flipper Zero)

Fast NEC-style frame: about 4480 us mark / 2200 us space header, ~300 us bit marks, ~300 us space = 0, ~900 us space = 1, 32 bits LSB first, about 21 ms between frames, 6 repeats per button press, 38 kHz.

Bytes as sent (B0 B1 B2 B3):
  • Interactive mode button: 01 E0 0D F2 -> another interactive lantern flashes white for a few seconds.
  • Game/tag mode button: 55 E0 0D F2 -> another game-mode lantern flashes red, then stays red until reset.
B0 looks like a mode selector (0x01 interactive, 0x55 game). B2/B3 is command + inverse (0x0D = flash). I swept B0 00-FF and B2 00-FF (B3 = inverse) with a Flipper app: only these exact frames get a reaction.

The white-flash capture is followed by a standard-NEC-timing frame 4B 42 46 31 ("KBF1" in ASCII, NEC address 0x424B, cmd 0x46, 4th byte 0x31, not the inverse). This is sent about every 300 ms in a "prop" mode to trigger the interactive sites around parks from your lantern.

The park beacons are not IR as far as I can tell: raw IR reads next to the beacon boxes captured nothing.


2.4 GHz radio (logic analyzer on the XN297L SPI bus)

Init sequence at power-up (command byte, then data):

Code: [Select]
53 5A / 53 A5          XN297L reset hold / release
E1 00 / E2 00          flush TX / RX
27 70                  clear STATUS
22 01                  EN_RXADDR = pipe 0
23 03                  SETUP_AW = 5-byte address
25 1B                  RF_CH = 27
31 20                  RX_PW_P0 = 32 bytes
30 CC CC CC CC CC      TX_ADDR
2A CC CC CC CC CC      RX_ADDR_P0
3F 12 ED 67 9C 46      BB_CAL   (XN297L calibration)
39 01                  DEM_CAL
3B 0B DF 02            RF_CAL2
3E F6 3F 5D            DEM_CAL2
3A 45 21 EF 2C 5A 42   RF_CAL
3C 00                  DYNPD off
26 0C                  RF_SETUP: 1 Mbps
24 00                  no retransmit
50 73                  ACTIVATE
21 00                  no auto-ack
3D 20                  FEATURE: CE controlled over SPI, 32-byte data mode
20 8F                  CONFIG: 2-byte CRC, power up, receive
FD 00                  CE on (SPI command)

At runtime in interactive mode it reads STATUS every 2 ms (always 0E at home = nothing received) and hops RF_CH 27 -> 52 -> 71, 16 ms each (48 ms cycle). A received packet would show up as 61 + 32 bytes.

Other behavior:
  • The full init always runs twice, about 0.29 s apart, at power-on and on every mode switch (the mode switch looks like a full restart).
  • Game/tag mode: the second init ends with 20 0C + FC 00, so the radio is powered down and nothing else happens on the bus. Game mode is IR only.
  • No settings change at runtime except the channel hops.

I found a reddit post of someone working on this same lantern where they transmitted correctly framed packets with a HackRF and saw the MCU read them out of the FIFO, but no payload they tried (byte sweeps, RGB/DMX-style guesses) caused any reaction. My guess is the firmware checks a multi-byte header/ID/checksum before acting, which makes guessing impractical. Hopefully my captured packets work properly

XN297 notes (for anyone building tools)
  • On air: preamble 71 0F 55, address (5), payload (32), CRC (2).
  • Scrambling LFSR x^7 + x^3 + 1, seed 0x71, MSB first:
E3 B1 4B EA 85 BC E5 66 0D AE 8C 88 12 69 EE 1F C7 62 97 D5 0B 79 CA CC 1B 5D 19 10 24 D3 DC 3F 8E C5 2F AA 16 F3 95 98
  • Address is sent last byte first, XORed with scramble bytes 0-4. For CC x5 that gives on-air 2F 7D 87 26 49 (nRF24 RX_ADDR_P0 write order 49 26 87 7D 2F).
  • Payload byte on air = bitreverse(byte) XOR scramble[5+i].
  • CRC: CRC-16/CCITT (poly 0x1021, init 0xFFFF) over unscrambled address (send order) + bit-reversed payload, then inverted and XORed with the next 16 scramble bits.
  • An nRF24L01+ can RECEIVE these packets (match the scrambled address, read 32 bytes, CRC not checkable). It can't TRANSMIT them: 32-byte payload + XN297 framing doesn't fit, and the nRF24's own CRC can't be made to match. To transmit you need a real XN297L (or an SDR).
(Scrambling/CRC details are from the DIY-Multiprotocol-TX-Module XN297 emulation code.)


Capture tools for the park trip



  • Flipper Zero + nRF24L01+ PA/LNA module: a sniffer app that mimics the lantern (hops 27/52/71, listens on both the scrambled and plain address), logs every 32-byte payload raw + decoded to SD with timestamps, a mark button, and per-channel carrier-detect counters.
  • Feather RP2040 internally wired with it's own battery and external controls. It is wired passively to the lantern's XN297L SPI (CSN/SCK/DATA + GND): logs every packet the lantern's own radio actually receives (already CRC-checked by the XN297L), merges repeats, records radio on/off and restarts, has a mark button and status LEDs, and stores to onboard flash. Verified at home: it decodes the lantern's init byte-for-byte with zero bad transactions.

Plan: carry the lantern in interactive mode through shows/zones, press mark whenever it changes color, then compare payloads to figure out the header vs. color/effect fields. After that, try replaying with a real XN297L module.


I will update after the park visit, I hope it works
 

Offline jwet

  • Super Contributor
  • ***
  • Posts: 1172
  • Country: us
Re: Reverse Engineering a Theme Park Interactive Lantern
« Reply #1 on: October 31, 2026, 05:00:52 am »
I hope it works too.  You've done a lot of good work.

The downfall of a lot of these reverse engineering quests is encryption, I hope you don't run into this is or anything too difficult.

Good luck.
 

Offline TT3DTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Reverse Engineering a Theme Park Interactive Lantern
« Reply #2 on: November 02, 2026, 02:16:36 pm »
I spent a day in the park carrying two receivers at once, and now have real beacon traffic from morning to close. It was fairly easy getting them in the park, funny enough the security checker picked up the flipper and looked at it for a second before putting it back in my mostly empty bag. Short version: the beacons send small, well-structured 32-byte frames of two kinds. One kind picks a built-in effect, and the other sends plain RGB color values, like a lighting-console feed.


Frame layout

Code: [Select]
byte  0      C0 = effect frame, BF = color frame
byte  1-2    counter (16-bit, big-endian, ~10/s, per beacon)
byte  3      F8 in effect frames; F8 / F0 / E0 / 78 / 60 in color frames (layout?)
byte 31      ~byte 0  (3F or 40)

Effect frame   C0 [cnt] F8 PP 00 00 QQ (b8) (b9) 00 00 (b12) 00 ... 00 3F
               PP = byte 4, QQ = byte 7; bytes 8, 9, 12 occasionally non-zero

Color frame   BF [cnt] b3 RR GG BB ... 40
               RR GG BB = red, green, blue; the rest depends on the layout below

Counter. It rises by about 10 per second with no backward steps inside a continuous stretch. Each value is sent many times (median 6, up to 50) across all three channels. Moving between beacons makes it jump to an unrelated value, so it's per beacon. It isn't tied to payload changes: during one fade the RGB changed about six times under a single counter value.

Effect presets (C0 frames), byte 4 / byte 7:
  • 0A / 06 - fast fade between three colors including pink and light blue. Long stretch, several marks inside, seen by both devices.
  • 03 / 00 and 0F / 02 - long stretches with marks inside. I believe these are a light blue and a dark blue, but I'm not sure which is which.
  • 25 / 01 (with byte 9 = 11 once, byte 12 = 04 another time), 19 / 05 (byte 12 = 06), 1B / 0C (byte 8 = 01) - short or weak, behavior not identified.
These frames contain no color data, so the colors must be in the lantern's firmware and the frame just picks a preset.

Color frames (BF frames). Bytes 4-6 are plain RGB in every layout I've seen. The layouts differ in byte 3 and in the rest of the payload:
Code: [Select]
b3=F8 "A"   RR GG BB 07 B0 1F 00 ... 00            cyan 06FFFF only (seen 3 times during the day)
b3=F8 "B"   RR GG BB xx B0 1F 00 00 00 00 BB 00 00 00 00 00 yy F7 00 00 FC FF 00 00 00 FF 00
            pink FF3E81 -> light blue 68FFFB -> fade -> mint 15FF65; byte 20 (yy) ramps 0..17 every 10-15 s
            (one lime 95FF05 frame had a different set of tail bytes)
b3=F0       61 11 FF 10 B0 1F ... B0 FF ... 0B ... FF ... FF     purple-blue
b3=78       RR GG BB 00 00 00 10 00 ... 00         the rainbow show (below)
b3=E0       RR GG BB 00 00 00 17 BB BB 00 BB BB B0 FF 00 FF 17 FF F0 BB FF FF 0F FF FF F0 FF
            blues and teal, a 0000BF -> 006DBD fade, near-white F2FFEF
b3=60       00 00 01 00 0B 10 + the same 17 BB BB ... tail, constant

Example from the validated log, one continuous sequence: pink FF3E81 held for about 13 s, a switch to light blue 68FFFB, then a fade through teal to mint 15FF65 in under a second, sent as dozens of intermediate values (60FFED, 5CFFE6, 58FFDE ...), faster than the counter ticks.

A six-color rainbow that matched the stage lighting (Flipper only, voted) decodes as green 00FF00, orange FF2D00, red FF0000, blue 0000FF, repeating about every 1.2 s. The extra colors I saw by eye (yellow, purple, cyan) are the fades between those four. Later it went solid violet 6C00FF, then alternated red/violet, red/orange and red/violet/orange.

Speculation: the constant bytes after the RGB (B0 1F, BB, F7, FC FF ...) change from scene to scene, so they may just be other channels from the same DMX universe (other fixtures' settings) that the lantern ignores. Byte 3 might then be a flag or layout field. I haven't tested either idea.


The day, in order (both devices unless noted)
Code: [Select]
10:43        effect 1B/0C (weak, Flipper only)
10:54-10:56  cyan 06FFFF (layout A)                 marks inside
10:57        effect 19/05
16:28-16:30  b3=60 constant frame
18:15-18:17  b3=60 constant frame
18:30-18:35  effect 03/00 (25/01 mixed in briefly)  marks inside
18:38-18:40  b3=E0 blues
19:15-19:16  pink -> light blue -> mint (layout B)
19:18-19:21  cyan 06FFFF (Flipper only)
19:29-19:31  lime 95FF05 (layout B, other tail)
19:35-20:02  effect 0F/02                            marks inside
20:12-20:16  effect 0A/06 (three-color fade)         marks inside
20:16-20:17  effect 25/01
20:19, 21:13 effect 0F/02 (Flipper only)
21:18-21:24  mint, cyan, purple-blue (Flipper only)
22:00-22:04  rainbow / violet show (Flipper only)     marks inside


Still unknown
  • What the other bytes do, and what byte 3 means.
  • The full preset list, and which of 03/00 and 0F/02 is which blue.
  • Whether the lantern checks the counter, or anything beyond the CRC.


Next steps
My XN297L is on its way and it should be here with a week. I plan to replay captured frames on my own lantern at home, starting with a fixed-counter 03/00 frame and then 0F/02, to see whether the lantern changes color and whether the counter matters at all. After that, color frames with changed RGB bytes. I'll post results either way.

Lantern RP2040 captures attached below
 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 4626
  • Country: gb
Re: Reverse Engineering a Theme Park Interactive Lantern
« Reply #3 on: November 02, 2026, 03:46:05 pm »
bloody coldpay and the xylobands  get everywhere
 

Offline TT3DTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Reverse Engineering a Theme Park Interactive Lantern
« Reply #4 on: November 09, 2026, 03:15:58 am »
I have done a ton of testing now that I can send RF commands. Now that I have (hopefully) all of the animations and effects, I am going to make a flipper app that can both emulate a beacon and a lantern.

The receiver plays 37 color palettes × 20 effect modes, plus 24 single-color modes in any RGB color, all chosen by two or four bytes of a 32-byte radio frame. Every animation is deterministic: each one repeats exactly or ends in a fixed state, so all of them can be rebuilt from the recordings.

Everything here was recovered by watching the receiver: a tester Pico sent frames, and a Feather RP2040 logged both the payload the receiver read from its radio and every frame it sent to the LEDs. No original source code or notes were used.

Frame format
The receiver only acts on byte 0, byte 4 (or bytes 4–6) and byte 7; the counter and trailer frame the message, and the rest is ignored as far as tests show.
Byte
Effect frame
Color frame
0
C0
BF
1–2
counter, big-endian, +1 about every 100 ms
same
3
F8 (ignored: 00, 60, 78, E0, F0 all work the same)
layout id: F8 (layout A and B)
4
palette (PP), 00–25
red
5
keep 00: other values make fade modes freeze or go dark, unpredictably
green
6
keep 00, same as byte 5
blue
7
effect mode (QQ), 00–13
color mode, 00–17
8–9
00 (the chase ignores them; keep 00)
B0 1F: byte 8 is ignored; byte 9 = 10–20 worked, while 00, 01, 08, 3F and FF made the receiver ignore the frame
10–30
00 (keep 00)
00, or the layout-B tail (ignored)
31
3F (= NOT byte 0)
40 (= NOT byte 0)
A new frame takes effect within about 20–60 ms. Other layout ids seen in the original capture (60, E0, 78, F0) are covered under Color frames.
Effect frames and palettes
Byte 4 picks one of 37 palettes (00–25, with 12 unused) and byte 7 picks how it animates; slots 26–FF are empty and turn the LEDs off.
• Solid (00–08): one color on all 10 LEDs.
• Color lists (0A–25): 2 or 3 colors. When static they repeat along LEDs 0–8; 2-color lists leave LED 8 dark. Color-cycling modes step through the list one color at a time.
• Fixed pattern (09): a one-entry palette whose entry is a whole 5-color pattern. Position modes (02, 06, 08, 13) show it like any pattern; color-stepping modes treat it as one color, so their loops run about 3× shorter than on a 3-color palette.
• LED 9 always copies LED 0, so patterns behave like 9 LEDs plus one duplicate.
PP
Type
Colors (RRGGBB)
00
solid
ffffff
01
solid
ff0000
02
solid
008000
03
solid
0000ff
04
solid
ffff00
05
solid
ff3800
06
solid
800080
07
solid
ff1030
08
solid
00ffff
09
fixed pattern
ff3030 · 80ff20 · 0000ff · 6408ff · ff2000
0A
2 colors
0000ff · 04b1ff
0B
3 colors
9000d0 · 80ff20 · ffc000
0C
2 colors
ff1030 · ff0000
0D
3 colors
ff1030 · ff0000 · d040c0
0E
3 colors
a0ff10 · ff8010 · ff6002
0F
3 colors
00ffff · 800280 · ff1040
10
3 colors
ff3800 · 00c0ff · ffff00
11
2 colors
800180 · 6001f0
12
empty (all off)
—
13
3 colors
20a040 · ffffff · 00ff1a
14
2 colors
05c6ad · 2aff00
15
2 colors
ff0230 · d040c0
16
2 colors
80ff20 · ffc000
17
3 colors
ff0000 · ffffff · 0000ff
18
2 colors
ff1030 · 00ffff
19
3 colors
ff0102 · ff0000 · ff0204
1A
2 colors
ff3800 · ff9600
1B
2 colors
612ac5 · ff4300
1C
3 colors
ff0000 · ff3800 · ffff00
1D
3 colors
ff0000 · ff3800 · 800080
1E
3 colors
ff3800 · ff0204 · 04ff04
1F
2 colors
ff1040 · ffffff
20
2 colors
0000ff · ffffff
21
3 colors
0000ff · ffffff · ffc000
22
3 colors
ff0000 · 04ff04 · ffffff
23
2 colors
ff0000 · 008000
24
2 colors
0000ff · c0c0c0
25
2 colors
ff0000 · ffe000
Effect modes (byte 7 of an effect frame)
QQ 00–13 are the 20 effect modes; 14–FF turn the LEDs off. Loop lengths below were measured on palette 0F (3 colors); modes marked cycles repeat once per color, so their loop is the per-color time × the number of colors.
QQ
Behavior
Loop on palette 0F
00
static pattern
—
01
blink, cycles: whole strip in color 1, off, color 2, off… (403 ms each step)
2.42 s (6 frames)
02
chase: one LED steps along every 84 ms, keeping its pattern color
755 ms (9 frames)
03
stepped pattern
503 ms (6 frames)
04
stepped pattern
839 ms (8 frames)
05
slow smooth fade
7.93 s
06
dots stepping every 164 ms
1.47 s (9 frames)
07
breathe, cycles: each color fades up and down (415 ms each)
1.25 s
08
same visible result as 06 on this palette
1.47 s (9 frames)
09
smooth fade
4.93 s
0A
steps mixed with fades
about 9.96 s (close, not exact, repeat)
0B
long fade sequence
17.0 s
0C
long fade sequence
15.3 s
0D
503 ms step rhythm with fading
5.43 s
0E
long fade sequence
10.8 s
0F
long fade sequence
11.8 s
10
sparkle-like single LEDs, but a fixed 95-step sequence
10.8 s
11
839 ms step rhythm with fading
13.2 s
12
sparkle-like single LEDs, a fixed 59-step sequence
7.77 s
13
candle: the static pattern flickering in brightness, 64 ms steps
2.04 s (32 frames)
Modes 02 and 13 measured the same on four other palettes (solid, 5-color, two 2-color). Only 02, 06, 08 and 13 work by LED position and keep the same loop on every palette; the other modes step through the palette's colors, so their loop scales with the number of colors (on palette 09, which counts as one entry: 01 = 806 ms, 05 = 2.64 s, 07 = 415 ms).
Color frames
Bytes 4–6 set any RGB color and byte 7 picks one of 24 color modes (00–17); 18–1F turn the LEDs off. This is a separate table from the effect modes. All measurements below used orange FF8000 on all 10 LEDs.
Byte 7
Behavior
Loop
00
static
—
01
candle flicker, 128 ms steps
4.09 s (32 frames)
02
smooth breathe
2.04 s
03
fast pulse
415 ms
04
on/off blink
407 ms
05
on/off blink
168 ms
06
fade
837 ms
07
pulse; the value in every captured layout-A frame
452 ms
08
fade
882 ms
09
fast flicker
175 ms (16 frames)
0A
stepped fade
503 ms (25 frames)
0B
stepped fade
283 ms (10 frames)
0C
on/off blink
119 ms
0D
on/off blink
84 ms
0E
single-LED chase, 164 ms steps
1.47 s
0F
single-LED chase, 84 ms steps
755 ms
10
fill / wipe, 164 ms steps
1.64 s
11
on/off blink
327 ms
12
single-LED chase
1.47 s
13
single-LED chase
755 ms
14
slow breathe
4.58 s
15
breathe
2.29 s
16
one-shot: candle flicker for about 4.6 s, then fades to off and stays off
—
17
one-shot: even fade from full to off over 4.1 s, then stays off
—
Layouts (byte 3):
• F8 layout A and B: both behave the same. Layout B adds a tail from byte 14 (BB …) that the receiver ignores.
• 60: a fixed preset; the color bytes are ignored and the LEDs show 000001 (almost off).
• E0, 78, F0: the receiver ignores them and stays on the idle candle, including all 13 real E0 frames from your remotes capture. They were rare there (1–5 each), so they may never have been meant for the light.
Idle candle and shared routines
When the receiver hears no valid frames it plays an orange candle: one color on all 10 LEDs, 32 brightness steps of 64 ms, repeating every 2.04 s. It goes idle 4.0 s after the last frame it hears.
How the receiver handles frames:
• Leaving idle waits for the candle cycle to finish, so a new frame can take up to 2 s to show. Between two active frames it switches within 20–60 ms.
• A different frame restarts its animation from the first step. Re-sending the same frame does not restart it.
• The counter does not need to change. A frozen counter kept the chase running for 19 s.
• Repeat every frame. The receiver hops between 3 channels and catches about 1 in 7 frames, so a single frame was never received. Keep sending at least every 4 s to stop it going idle.
The candle is one routine used in three places, all with the same 32-step brightness table:
Where
Color
Step time
Idle
orange (red about 3× green, no blue)
64 ms
Effect mode 13
the palette pattern
64 ms
Color mode 01
the frame's color
128 ms
The 32 steps use 24 distinct red levels (brightest first, not in playing order): f9 f7 f1 ec e7 e2 e0 dc da d8 d6 d4 d2 ce cb c7 c5 c3 c1 bb b5 a8 a6 9e. Color mode 16 runs the same flicker once before fading out.
Unused bytes and things ruled out
Only bytes 0, 4–7 and 31 carry meaning, but two other bytes must keep their usual values, and there is no second-color field.
What was tested
Result
Effect bytes 8, 9 and 12, each stepped 01–FF on the 0F chase (27 variations)
identical frames, colors and 755 ms loop every time
Effect bytes 9 and 12 on palette 25 blink (from the original capture)
no visible difference
Color frame: blue placed at every position from byte 10 to byte 30, in chase and candle modes (38 tests)
no blue, no change in color or timing
Layout-B tail (bytes 10–30) with color modes 00–1F
same results as layout A without the tail
Bytes that must keep their usual value:
• Effect bytes 5–6 = 00. Non-zero values left the chase unchanged but made fade modes (05, 07) freeze at one brightness or go dark. The same value gave different results on different runs.
• Color byte 9 = 1F. Values 10, 1E, 1F and 20 worked; 00, 01, 08, 3F and FF made the receiver ignore the frame and fall back to the idle candle (one run).
• Color byte 8 and effect byte 3 are ignored: any value works.
Two-color animations come only from the 2-color palettes in effect frames, not from a color you choose.
Still open:
• Whether palette 09 was meant as a single-pattern entry; it behaves consistently as one (tested in all 20 modes).
• Whether effect bytes 8–30 also upset the fade modes; they were only swept on the chase.
• What color byte 9 is checked against; only 10–20 hex have worked so far.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->