logo elektroda
logo elektroda
X
logo elektroda

[Solved] Flashing and Configuring Micro IR Blaster (Ali 1005006823624599) with BK7231N

bkespoke 1554 9
ADVERTISEMENT
  • BK7231N pinout and flashing notes for micro IR blaster

    #1 21573835
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    Similar to many others, here is a small IR receiver/transmitter courtesy of atc1441 (though the one he posted about looks different).
    I bought this one in late 2024, seems to be still available for $7 on Ali, 1005006823624599
    The whole device is just 38 mm diameter, 15 mm thick.

    It has a BK7231N on the common CBU board. Four IR leds on top, and a receiver. Blue status LED and a button on the bottom.
    Trivial to flash with a USB-serial device, the pins are labelled underneath the board. I usually solder some 30 gauge wires to them.

    A black, round electronic gadget connected by cable lies on a ruler with a millimeter scale.
    Close-up of a circuit board with a Bekin BK7231N chip and 26 MHz quartz resonator.
    PCB with LED electronics and a controlling module in a round housing.

    Config:
    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • AC remote still decodes as unknown pulse-distance code

    #2 21574510
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    >>21573835
    Now I'd like to ask for some help... the remote blaster above is working fine for my TV remote decoding various codes. But for my AC remote it simply doesn't work.
    Summary of my frustrating questions in this AI discussion though I think the AI is dreaming up the build v1.18.130 and probably some other things.

    I've tried turning on all the IR flags. Commands like set IRdebug 1 are not supported. Roughly the same messages come out on MQTT. All the forum posts on IR are quite old. I would be happy with some sort of RAW capture - I only want to send three commands for the AC (on-cool-lowfan-16C ; on-fan-lowfan ; off)

    Is the (raw) buffer too small for this remote? Is there a nightly/alpha build that has the latest IR in it, or can you recommend a modification that I can build, that will receive this remote control?

    Thank you!

    With v1.18.110 the remote produces codes like this in the log:
    Debug:IR:IR decode returned true, protocol 1
    Debug:IR: Raw-Data=0x0
    Debug:IR: 48 bits
    Debug:IR: LSB first
    Debug:IR:IR decode returned true, protocol PulseDistance (1)
    Info:IR:IR IR_PulseDistance 0xD20 0xD0A 0 (48 bits)
    Debug:IR:IR fire event took 0ms
    Debug:IR:IR decode returned true, protocol 0
    Debug:IR: Hash=0x0
    Debug:IR:0 bits (incl. gap and start) received
    Debug:IR:IR decode returned true, protocol UNKNOWN (0)
    Info:IR:IR IR_UNKNOWN 0x0 0


    My autoexec.bat:
    startDriver SSDP
    startDriver NTP
    startDriver IR


    My config:
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "32768",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "7": "IRSend;0",
        "8": "IRRecv;0",
        "24": "WifiLED;0",
        "26": "Btn;0"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
  • ADVERTISEMENT
  • Intermittent KELON168 decode with bad CRC

    #4 21574572
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    Thanks - that is quite different.
    Now I get something on every remote press.

    Unfortunately the data is different every time:
    info:ir:ir unknown ffffffff,0xf3963672,172
    info:ir:ir unknown ffffffff,0x8301fb23,172
    info:ir:ir unknown ffffffff,0x928f624f,172
    info:ir:ir unknown ffffffff,0xbeb94b2f,172
    info:ir:ir unknown ffffffff,0xc21ea93,172
    info:ir:ir unknown ffffffff,0xa620bed1,172
    info:ir:ir unknown ffffffff,0xc0311423,172
    info:ir:ir unknown ffffffff,0xf187fb6b,172
    info:ir:ir unknown ffffffff,0x981bd6be,172
    info:ir:ir unknown ffffffff,0x5019b230,172
    info:ir:ir unknown ffffffff,0xea55b743,172
    info:ir:ir unknown ffffffff,0xf561a712,172
    info:ir:ir unknown ffffffff,0x9b520955,172
    info:ir:ir unknown ffffffff,0x821ba9ff,172

    Occasionally when the signal is strong it will decode it as KELON168? but then the debug doesn't print out the decoded result (bad CRC?).


    Info:IR:Received AC code:KELON168
    Debug:IR:IR fire event took 0ms
    Info:IR:IR Unknown ffffffff,0x6CA9AFD2,172
    Info:IR:Received AC code:KELON168
    Debug:IR:IR fire event took 0ms
    Info:IR:IR Unknown ffffffff,0x41E59780,172
    Info:IR:Received AC code:KELON168
    Debug:IR:IR fire event took 0ms
    Info:IR:Received AC code:KELON168
    Debug:IR:IR fire event took 0ms
    Info:IR:IR Unknown ffffffff,0x7771B42A,172

    Turning on flag 14, I get this on MQTT
    70,0x83060302000080000000000000810002000008000A
    Corresponding to this in the log:
    Info:IR:Received AC code:KELON168
    Info:IR:IR MQTT publish �A took 2ms
    Debug:IR:IR fire event took 0ms

    Could you suggest the next steps please?
  • ADVERTISEMENT
  • #5 21580579
    divadiow
    Level 38  
    Posts: 5220
    Help: 449
    Rate: 918
    bkespoke wrote:
    Could you suggest the next steps please?

    hmm, not really sure what next. I have not had any experience with the irRemoteESP version.

    I wonder if powersave can have an effect on it like with standard ir version. Do you have powersave 1 set?
  • Occasional KELON168 decodes suggest accidental IR detection

    #6 21581354
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    Thanks again. Powersave does seem to have an impact but it was off.

    I have powersave 0 (I tried powersave 1, then the powersave messages appear everywhere in the logs, which I haven't seen before. Powersave 1 also causes a known-good remote to read garbage, while powersave 0 it decodes something most of the time.

    Interesting, the odd times it fails to decode the working remote, the hex values are just garbage.

    Hex values from my AC remote are always garbage, no pattern.

    But asking about the very occasional successful decodes, they all say:
    Info:IR:Received AC code:KELON168
    for any button on the remote. Whereas with the working TV remote I get various codes.
    Does this mean it's just an accidental decode?
  • #7 21581356
    divadiow
    Level 38  
    Posts: 5220
    Help: 449
    Rate: 918
    hmm. not sure.
    poking @p.kaczmarek2 and @DeDaMrAz who I think co-authored the irESP variant
  • ADVERTISEMENT
  • Decoded LG AC protocol and working IR commands

    #9 21951286
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    So I solved it, at least for my current application, with the help of an IR receiver diode, logic analyzer and Gemini AI.
    The "LG" is using a TCL type IR control board which sends three 56-bit NEC-style PDM codes, separated by 8 ms gaps.
    Openbeken buffer is too small for such a long code, which is why I couldn't receive it. It also can't send all three in a row, but it turns out only the first code is really needed!

    Here are some codes that work for my LG portable unit, model number LP0731WSB remote control part number DG11J1-99
    * Cooling, Low Fan, 16 C setpoint: IRSend NEC,48,0xC160C0400000    (unit only goes down to 18)
    * Cooling, High Fan, 20 C setpoint: IRSend NEC,48,0xC16080440000
    * Fan only, Low fan: IRSend NEC,48,0xC160C02E0000
    * Power toggle: IRSend NEC,48,0xC160E0440000
    ( the last one will turn it off, but also turn it on with settings Cool, Low fan, 20 C, so to be sure of turning it off, you'd have to send another code and then the power toggle)

    More from Gemini:
    Key Observations on How Your AC's Protocol Works
    Byte 3 (0x80 vs. 0xC0): With Low Fan, Byte 3 was 0xC0 (11000000). With High Fan, it changed to 0x80 (10000000). This confirms that the second bit of Byte 3 controls the Fan Speed.
    Byte 4 (0x44 vs. 0x40): Your base 16°C Cooling command used 0x40. Adding 2°C to get 18°C incremented Byte 4 by 0x04 ($0\text{x}40 + 0\text{x}04 = 0\text{x}44$). This means you can likely calculate other temperatures mathematically (e.g., 20°C would be 0x48, 22°C would be 0x4C, etc.).
    This last part turns out to be wrong, but byte 4 does control the temperature setting.

    A few raw decodes are attached.
    Attachments:
    • Cool_16_Low.txt (5.67 KB) You must be logged in to download this attachment.
    • Cool_17_Low.txt (5.47 KB) You must be logged in to download this attachment.
    • Cool_16_Hi.txt (5.79 KB) You must be logged in to download this attachment.
    • Fan_X_Low.txt (5.83 KB) You must be logged in to download this attachment.
    • Power_Toggle.txt (5.79 KB) You must be logged in to download this attachment.
    • Cool_18_Hi.txt (5.79 KB) You must be logged in to download this attachment.
  • #10 21951287
    bkespoke
    Level 5  
    Posts: 16
    Help: 1
    Rate: 4
    Solved for my air conditioner.

Topic summary

LABEL_AI_GENERATED
A small AliExpress IR blaster/receiver module based on BK7231N and a CBU board was flashed over UART and configured with IRSend, IRRecv, WifiLED, and Btn pins. It worked well for TV remote decoding, but AC remote decoding was unreliable: standard firmware produced mostly garbage or empty IR data, while the irRemoteESP firmware enabled reception of some signals but often decoded them as random unknown values. Occasional successful decodes reported KELON168, suggesting either protocol mismatch, CRC issues, or limitations in the IR capture/decoding implementation. Powersave settings affected IR behavior, and a forum link was provided for additional IR context and known issues.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT