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.
Attachments:
IMG_2042.JPG(2.96 MB)
You must be logged in to download this attachment.
IMG_2040.JPG(2.71 MB)
You must be logged in to download this attachment.
IMG_2036.JPG(2.85 MB)
You must be logged in to download this attachment.
IMG_2035.JPG(2.74 MB)
You must be logged in to download this attachment.
IMG_2033.JPG(3.16 MB)
You must be logged in to download this attachment.
20250202_191316.jpg(1.42 MB)
You must be logged in to download this attachment.
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
>>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.
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
>>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
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.
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
"
✨ 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. Generated by the language model.
TL;DR: 4 GPIOs are mapped for this NAS-IR02W6; "nothing special in the end." Flash OpenBeken, import the Tuya JSON, then use P7 (IRSend) and P8 (IRRecv). BK7231N environment appears in logs; pins: P6 Btn, P9 WiFi LED. For tinkerers flashing AliExpress BK7231M IR blasters, this FAQ covers pinout, flashing mode, and IR testing. [Elektroda, divadiow, post #21438462]
Why it matters: It helps you flash, map pins, and capture/send IR quickly without guesswork.
Quick Facts
Device: Shenzhen Neo NAS-IR02W6 (schema 000004u60c); BK7231M silicon with BK7231N environment observed in logs. [Elektroda, divadiow, post #21438462]
What are the GPIO pin assignments for this BK7231M IR remote?
Button is on P6, IR Transmitter on P7, IR Receiver on P8, and WiāFi LED on P9. The config also sets LED activeāhigh, reset level high, and a 5āsecond longāpress. These values came from the Tuya configuration extracted from the device. [Elektroda, MuriFlavo, post #21423535]
Which flashing mode and binary should I use for this unit?
Use BK7231N mode and flash the N binary. The device exposes Tuya encryption keys, and the advice was to "treat it like a BK7231N and flash N binary." Always make a backup before writing. [Elektroda, insmod, post #21423083]
How do I enter flashing mode and get the flasher to connect?
Open the flasher and start the session. When prompted, reboot the device either by toggling CEN or power cycling. The tool log shows āGetting bus success!ā after the reboot and proceeds at 921600 baud when configured. [Elektroda, MuriFlavo, post #21423080]
Where do I connect RX/TX on the PCB?
Use the clearly labeled test points on the board for RX and TX. The photos show easy access pads, making a UART hookup straightforward. Solder thin wires or pogo pins, and keep leads short for reliability. [Elektroda, divadiow, post #21422401]
I forgot to back upācan I still recover the Tuya pin map?
Yes. From the Tuya web app, you can extract the deviceās configuration data. Feed that file into Easy Flasherās Config Extractor to recover the pin assignments and related parameters for setup. [Elektroda, divadiow, post #21423504]
How do I import the Tuya JSON into OpenBeken?
Obtain the JSON text produced from your device/config extractor.
Open the OpenBeken web application on the device.
Use the JSON import feature, apply settings, and save. As noted, the āJSON text is what youād import into the web application.ā [Elektroda, divadiow, post #21441835]
What exact device and schema are we dealing with?
Shenzhen Neo IR Sender and Receiver (USBāC), model NASāIR02W6, schema ID 000004u60c. The logs identify BK7231M hardware and a BK7231N runtime environment. DPs include 201 (string, max 3072 bytes) and 202 (raw). [Elektroda, divadiow, post #21438462]
What does the flasher reveal about the SPI flash?
The session reports Flash MID 0x1560EB with icName TH25Q16HB. The tool set baud to 921600 and successfully adjusted protection state. It also printed a nonāstandard encryption key, indicating Tuya encryption presence. [Elektroda, MuriFlavo, post #21423080]
How can I send raw IR captured by Flipper or from the firmware logs?
Match the protocol and bit length the logs report. Here, the decoder shows PulseDistance with 31ā or 35ābit frames and pairs like 0xD21/0xD0B. Configure your sender for PulseDistance, correct bit width, and the captured code values. [Elektroda, MuriFlavo, post #21443967]
Why did the tool show āNonāstandard encryption key,ā and what should I do?
It indicates a Tuya encryption key on flash. The guidance was clear: "treat it like a BK7231N and flash N binary." Back up first to avoid losing OEM firmware or calibration data. [Elektroda, insmod, post #21423083]
What if the encryption key reads all zeros?
The flasher warns that an allāzero key may mean readout is disabled. In that edge case, a full dump can be blocked. Use the Tuya app route to recover configuration as a fallback. [Elektroda, MuriFlavo, post #21423080]
Does this unit include BLE or RF features?
Logs show the BLE stack initializes and starts advertising. The device is presented and configured as an IR sender/receiver; no separate RF transmitter is documented in the threadās findings. [Elektroda, divadiow, post #21438462]
Where can I get a knownāgood reference dump or config for NASāIR02W6?
A reference binary named Tuya_NeoIR(NAS-IR02W6-schemaID-000004u60c)_xxxxx.bin is linked, along with images and JSON mapping. Use it for comparison or analysis, not as a blind flash. [Elektroda, divadiow, post #21438462]
Any lastāminute cautions before flashing?
Back up before writing anything. Several users emphasized backing up right away to avoid losing OEM firmware or keys. "Make sure you do a backup!" is sound, repeated advice here. [Elektroda, divadiow, post #21423093]