NAME

Protocol::IR::Proto::NECX1 - NECx1 protocol handler (extended NEC, half header)

VERSION

version 1.0

SYNOPSIS

use Protocol::IR::Converter;

my $converter = Protocol::IR::Converter->new();

# NECx1 ("extended NEC") uses a half 4500/4500 us header and a real
# 16-bit address: the subaddress byte is the low half, not an
# inversion of the address.
my $code = $converter->import_code('NECX1',
    { device => 162, subdevice => 162, command => 1 });

DESCRIPTION

The NECx1 protocol (MakeHex NECx1.irp) transmits the same 32-bit frame layout as Protocol::IR::Proto::NEC but with a half 4500/4500 us header and a 16-bit address: the second byte is the low half of the address (Default S=D), so it is kept as a real byte and never normalized to -1 (see Protocol::IR::Proto::NEC for the full data layout and timing). This is the framing IRDB files Samsung, Grundig, KAWA, and others label NECx1.

The repeat frame is a short header+gap "ditto" frame, like NEC1. The NECx2 variant (Protocol::IR::Proto::NECX2) repeats the whole frame instead; a single frame of either is timing-identical.

A NECx1 frame shares its 4500/4500 us header with Protocol::IR::Proto::SAMSUNG (Samsung is IRDB's most common NECx2 user), so the two cannot be told apart from timing alone. Protocol::IR::Converter registers SAMSUNG before NECX1, matching real-world Samsung captures; the NECX1 name is produced when a code is imported by name (CSV, decode_params, decode_raw), the IRDB-to-wig path. The data word is identical under either label.

METHODS

All methods are inherited from Protocol::IR::Proto::NEC; only the protocol name, header, and subaddress behavior differ.

SUPPORT

Source code: https://github.com/bwarden/perl-protocol-ir

Bug reports and feature requests: https://github.com/bwarden/perl-protocol-ir/issues

AUTHOR

Brett T. Warden <bwarden@cpan.org>

COPYRIGHT AND LICENSE

Copyright (c) 2026 Brett T. Warden

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.