logo elektroda
logo elektroda
X
logo elektroda

[BK7231M] Configuring GPIO Pins on BK7231M Smart Wi-Fi IR Remote from Aliexpress

MuriFlavo 765 18
ADVERTISEMENT
  • #1 21421966
    MuriFlavo
    Level 3  
    I received this IR/(maybe RF) remote as a "gift" with a tuya smart plug and can't find the exact same one in the teardown list so I am posting it here. I am stepping into a new territory with this and have no idea how to go about checking which GPIO pins are for what and exactly how to structure the config. Any help and tips are appreciated.
  • ADVERTISEMENT
  • #4 21423080
    MuriFlavo
    Level 3  
    Starting flash new (no backup)!
    Now is: Monday, February 3, 2025 3:36:57 PM.
    Flasher mode: BK7231M
    Going to open port: COM3.
    Serial port open!
    Getting bus... (now, please do reboot by CEN or by power off/on)
    Getting bus success!
    Going to set baud rate setting (921600)!
    Will try to read device flash MID (for unprotect N):
    Flash MID loaded: 1560EB
    Will now search for Flash def in our database...
    Flash def found! For: 1560EB
    Flash information: mid: 1560EB, icName: TH25Q16HB, manufacturer: TH, szMem: 1000000, szSR: 2, cwUnp: 0, cwEnp: 7, cwMsk: 407C, sb: 2, lb: 5, cwdRd: 05-35-FF-FF, cwdWr: 01-FF-FF-FF
    Entering SetProtectState(True)...
    sr: 7c
    sr: 7c
    final sr: 7c
    msk: 407c
    cw: 0, sb: 2, lb: 5
    bfd: 0
    sr: 0
    sr: 0
    final sr: 0
    msk: 407c
    cw: 0, sb: 2, lb: 5
    bfd: 0
    SetProtectState(True) success!
    Going to read encryption key...
    Encryption key read done!
    Encryption key: 510fb093 a3cbeadc 5993a17e c7adeb03
    ^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^
    WARNING! Non-standard encryption key!
    If it's all zero, it may also mean that read is disabled.
    Please report to forum https://www.elektroda.com/rtvforum/forum51.html
  • #5 21423083
    insmod
    Level 22  
    >>21423080 This is tuya encryption key, treat it like a BK7231N and flash N binary too.
    First time i've seen a BK7231M with non-zero keys.
    Take backup too, please.
  • ADVERTISEMENT
  • #6 21423085
    MuriFlavo
    Level 3  
    Switched flasher mode to BK7231N and it went through...

    Added after 2 [minutes]:

    >>21423083 My bad, I was too hasty and didn't press the backup when trying the second time with BK7231N. There is no way to dump the firmware, right?
  • #7 21423093
    divadiow
    Level 34  
    was about to say make sure you do a backup!


    Screenshot of BK7231 Easy UART Flasher software with backup options highlighted.
  • #8 21423096
    MuriFlavo
    Level 3  
    >>21423093 😭
  • ADVERTISEMENT
  • #9 21423099
    divadiow
    Level 34  
    😭😭

    where did you buy from?
  • ADVERTISEMENT
  • #10 21423106
    MuriFlavo
    Level 3  
    >>21423099 Aliexpress but was included as a kind of gift will try to find the listing for the original product that it arrived with.

    Added after 3 [hours] 59 [minutes]:

    >>21423099 https://a.aliexpress.com/_EJzE312 found the exact thing, it was part of a "choice" deal.
  • #11 21423504
    divadiow
    Level 34  
    yup, thanks. assumed it was one of those. a few are on there..

    Added after 1 [minutes]:

    from the web app you can still get *some* of the original info - the Tuya config data. you can then run that file into the config extractor in Easy Flasher
    Web interface of OpenBK_BK7231N_CB2S_USB_PLUG showing connection status and configuration.
  • #13 21423535
    MuriFlavo
    Level 3  
    >>21423504 {
    "reset_pin":"6",
    "wfst_pin":"9",
    "owm":"1",
    "reset_lv":"1",
    "rsthold":"5",
    "wfst_lv":"1",
    "netyc":"1",
    "infrr":"8",
    "netnc":"0",
    "infre":"7",
    "crc":"59"
    }
    Device configuration, as extracted from Tuya:
    - Button is on P6
    - WiFi LED on P9
    - IR Receiver is on P8
    - IR Transmitter is on P7
    No module information found.
    And the Tuya section starts at UNCOMMON POSITION 0
  • #14 21423951
    divadiow
    Level 34  
    more info

    Universal Remote Control (wnykq)
    NAS-IR02W6 - schema ID: 000004u60c
    Code: JSON
    Log in, to see the code
  • #17 21440360
    MuriFlavo
    Level 3  
    Damn, I was gone for work and didn't check my emails. That's awesome. Thank you. At this point how do I go about using your configuration? Also what is that app? I probably plan on using Home Assistant if I can figure out how :), but still.
  • #19 21443967
    MuriFlavo
    Level 3  
    Yo quick question do you perhaps know how I could go about sending raw data I got from a remote with flipper or alternatively how to get data from remote with this firmware? And how to send that data? I'm super confused while looking all this up.

    Added after 3 [minutes]:

    "
    Debug:IR:IR decode returned true, protocol 1
    Debug:IR: Raw-Data=0x10000000
    Debug:IR: 31 bits
    Debug:IR: LSB first
    Debug:IR:IR decode returned true, protocol PulseDistance (1)
    Info:IR:IR IR_PulseDistance 0xD20 0xD0B 0 (31 bits)
    Debug:IR:IR fire event took 0ms
    Debug:IR:IR decode returned true, protocol 1
    Debug:IR: Raw-Data=0x2
    Debug:IR: 35 bits
    Debug:IR: LSB first
    Debug:IR:IR decode returned true, protocol PulseDistance (1)
    Info:IR:IR IR_PulseDistance 0xD21 0xD0B 0 (35 bits)
    Debug:IR:IR fire event took 0ms
    Debug:IR:IR decode returned true, protocol 1
    Debug:IR: Raw-Data=0x38280000
    Debug:IR: 31 bits
    Debug:IR: LSB first
    Debug:IR:IR decode returned true, protocol PulseDistance (1)
    Info:IR:IR IR_PulseDistance 0xD21 0xD0B 0 (31 bits)
    Debug:IR:IR fire event took 0ms
    "

Topic summary

The discussion revolves around a BK7231M IR remote received as a gift with a Tuya smart plug. The user seeks assistance in identifying GPIO pin configurations and flashing the device. Participants suggest treating the BK7231M similarly to the BK7231N, referencing various guides and resources for flashing. The user shares their flashing process, including reading the encryption key and device configuration, which reveals pin assignments for the button, WiFi LED, IR receiver, and transmitter. The conversation also touches on extracting configuration data from the Tuya app and using it with OpenBeken. Additionally, there are inquiries about sending raw data from a remote and decoding IR signals.
Summary generated by the language model.
ADVERTISEMENT