logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool

callipejian 2925 21
Best answers

How can I fix the "unable to get bus" error when flashing this NAS-IR02W6-PRO V3 from Linux with the Mono GUI or HID tool?

Try hid_download_py on Linux instead of the GUI tool; the GUI was reported unstable on Linux, and the most likely causes were overly long programming wires, a weak USB-UART adapter, or RX/TX being used by other circuitry on the board [#20658247][#20658298][#20667886] If the UART method keeps failing, the poster eventually succeeded by switching to Cloudcutter and doing an OTA flash instead [#20669566]
Generated by the language model.
ADVERTISEMENT
  • #1 20656459
    callipejian
    Level 3  
    Posts: 8

    I am using Linux. I tried both GUI tool using Mono and HID tool. But I keep getting an "unable to get bus" message. I tried the power disconnect method as well as shorting Cen to ground. Any help is appreciated.
    Attachments:
    • Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool PXL_20230713_072152665.jpg (2.43 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 20656927
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647

    Hello, can you provide a more detailed photo of the device? Are TX/RX lines used in any way in this device, maybe for a button or for TuyaMCU?
    Helpful post? Buy me a coffee.
  • #3 20657734
    callipejian
    Level 3  
    Posts: 8

    Here are the photos Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool

    I am not sure if rx/tx lines are used in any way.

    Added after 1 [minutes]:

    I actually was able to go further with Hid tool by setting baudrate to 115200, but now unprotect fails. So again got stuck
  • #4 20657764
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647

    Hello, is it BK7231N or BK7231T? Are you choosing the proper chip type in the dropdown list?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20657806
    callipejian
    Level 3  
    Posts: 8

    It is BK7321N, I did select the right chip type in the drop-down.

    Added after 6 [minutes]:

    This is the output from the HID tool.

    ❯ python uartprogram ~/Downloads/OpenBK7231N_QIO_1.17.181.bin -b 115200 -u -d /dev/ttyUSB0 -w --startaddr 0x0
    UartDownloader....
    program....
    Unprotect Failed: | |[ ?k/s]
  • #6 20657850
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647

    Really? Can you try the BK7231T mode, just to be sure?

    BK7231T mode used on N will not brick the chip.
    Helpful post? Buy me a coffee.
  • #7 20658175
    callipejian
    Level 3  
    Posts: 8

    Tried that, I got the same error message, unable to set baudrate.
  • #8 20658247
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647

    There have been some reports about the GUI tool not being stable on Linux, but hid_download_py (Python tool) was always reported to work. What kind of USB to UART converter do you have? How long are the programming wires?
    Helpful post? Buy me a coffee.
  • #9 20658290
    callipejian
    Level 3  
    Posts: 8

    I am using FT232, wires are normal breadboard jumper cables.
  • #10 20658298
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647
    The wires may be too long.

    Or there is something on the board connected to RX or TX pin, like a button, a resistor, a sensor.

    Or a bad (or should I say, not enough stable) FT232.

    Have you successfully flashed other devices that way?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 20658828
    callipejian
    Level 3  
    Posts: 8

    Hmmm, possible, though I have flashed tons of ESP8266-based devices using this method and it has worked all the time. My USB cable is a bit long, but that has never caused me any issues as I said with ESP devices before. I did order myself a CH340G chip to validate. Let's see how that fares.
  • #12 20667855
    callipejian
    Level 3  
    Posts: 8

    Well CH340G also produced the same results. Running out of ideas here.

    Added after 11 [minutes]:

    Here is a sample output from uartprogram with some debug information

    Code: Bash
    Log in, to see the code

  • #13 20667886
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647
    The RX or TX line may be used for some other purpose, for example, for a button and it may interfere with flashing.

    See our Qiachip video, we had a similar situation there: https://www.youtube.com/watch?v=PKkiqDNFIx8
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #14 20668374
    spin55
    Level 17  
    Posts: 209
    Help: 17
    Rate: 42

    Hi,

    Locate pins 26 and 27 of the BK7231N.

    Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool

    Take two pins, cut off their heads and insert them into the Rx and Tx connections of the Dupont cables of the USB converter.

    Unable to Get Bus Message: Flashing NAS-IR02W6-PRO V3 on Linux Using Mono and HID Tool

    Click directly on the chip terminals and test. You can hold both with one hand and with the other don't forget to short CEN to ground quickly. If it fails, keep trying.

    Greetings
  • #15 20669566
    callipejian
    Level 3  
    Posts: 8
    Oh well, Went down cloudcutter route and success!!!!

    For posterity here's what I did.

    Code: Bash
    Log in, to see the code


    after this OTA upgraded to latest. IRSend -> Pin7 IRRecv -> Pin8 Wifi Status -> Pin9
    Tested everything worked
    ???
    Profit!
  • #16 20677990
    wak5670
    Level 2  
    Posts: 2
    Any idea which pins correspond to RF send/recv?
  • #17 20678705
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647
    Maybe doing Tuya extraction via OpenBeken can help:


    Helpful post? Buy me a coffee.
  • #18 20703143
    deschmit
    Level 3  
    Posts: 7
    Rate: 1

    @wak5670 Do you have the version of this board with the RF chip? That's the one I have. I'm interested in the RF too. However, I was wondering if IRSend -> Pin7 works for you? I could be doing something wrong, but I have not been able to get it working yet.

    I don't have any issue with
    IRRecv -> Pin8
    Wifi Status -> Pin9

    Also wondering, has anyone gotten the pin figured out for the button?
  • #19 20703193
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647
    Please do the template extraction from link above and we can check if there is a button pin specified in the JSON.
    Helpful post? Buy me a coffee.
  • #20 20704504
    deschmit
    Level 3  
    Posts: 7
    Rate: 1

    I'll see if I can get my hands on a MS Windows computer. I only have Linux. I had tried the process in the link yesterday with Mono, but the drag and drop of the bin file didn't work. It said, "failed to extract keys." Maybe drag and drop just doesn't work correctly with Mono.
  • #21 20704603
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14632
    Help: 655
    Rate: 12647
    This method works on Linux:


    Helpful post? Buy me a coffee.
  • #22 20705858
    deschmit
    Level 3  
    Posts: 7
    Rate: 1

    I'm not sure if the last video link was correct or not. It was flashing instructions.

    But, maybe the link doesn't matter. I got the Windows app installed in a virtual machine. Unfortunately, I got the same error message as I got in Linux. Now, I'm thinking Linux wasn't my problem.

    If I open the openbeken app and click the "read tuya gpio config from 0x1EE000" I see that only the first 32 addresses have a unique byte pattern (f1 de 03 8b f4 2d d9 2b d3 44 5f 31 cd 92 20 2f 36 c6 a4 54 7e 6e 56 cc 13 50 a5 f7 60 ff b1 5d). Starting on the second line (address 0020 in hex) there is a 16-byte pattern (46 dc ed 0e 67 2f 3b 70 ae 12 76 a3 f8 71 2e 03) that repeats to the end of the file. Is it possible I could have wiped out the tuya gpio config when I initially flashed the device? Some of the stuff I tried when originally flashing is documented in this post https://www.elektroda.com/rtvforum/topic3963918.html

    Added after 1 [hours] 46 [minutes]:

    Found another tool to read the bin file. I guess there was some info in the file after all. Just not very much. I used itchiptool. It gave this output.

    E: No actual components were added! This means that the type of your device is not yet supported by this program. This includes, for example, thermometers, water leak sensors, or fan controllers.
    W: No module type found! You have to set the board manually.
    I: UPK: Status LED: pin P9, inverted False

    Not much, but it does correctly spec the Status LED on pin P9.

    Added after 13 [minutes]:

    Just found the itchiptool had a "device configuration" tab with more info!

    {
    "crc": 88,
    "infre": 7,
    "infrr": 8,
    "netnc": 0,
    "netyc": 1,
    "owm": 0,
    "rf_study_feq": 0,
    "rsthold": 3,
    "wfst_lv": 1,
    "wfst_pin": 9
    }

    Figured out my IRSEND problem too. I incorrectly had "IR_" in front of the protocol.
    IRSEND NEC 0x80 0x12 0
    not
    IRSEND IR_NEC 0x80 0x12 0

Topic summary

✨ The discussion revolves around the difficulties faced while flashing the NAS-IR02W6-PRO V3 device on Linux using Mono and HID tools. The user encounters an "unable to get bus" error despite trying various methods, including power disconnects and shorting connections. Subsequent troubleshooting reveals that the device is based on the BK7231N chip, and attempts to set the baud rate to 115200 lead to an "unprotect failed" message. Suggestions include verifying the correct chip type, checking the stability of the USB to UART converter (FT232), and ensuring that no other components are interfering with the RX/TX lines. The user eventually finds success using the cloudcutter method, indicating that the initial flashing attempts may have been hindered by hardware or configuration issues.
Generated by the language model.

FAQ

TL;DR: At 115200 baud, the fix was not Mono tuning but changing method: "RX or TX line may be used for some other purpose" explains why UART flashing stalled on this Linux setup. This FAQ helps Linux users flashing a NAS-IR02W6-PRO V3 by showing when to stop fighting unable to get bus or Unprotect Failed and switch to Tuya Cloudcutter. [#20667886]

Why it matters: This thread shows that a BK7231N device can reject normal UART flashing on Linux yet still accept OpenBeken cleanly through Tuya Cloudcutter.

Method Linux result in thread Main failure or outcome Best use
Mono GUI tool Unstable / failed "unable to get bus" and later key-extraction issues Only for quick tests
hid_download_py / uartprogram Partly works Bus access at 115200 baud, then Unprotect Failed Use if RX/TX are clean
Tuya Cloudcutter Successful OpenBeken flashed, then OTA updated Best fallback when UART fails

Key insight: If both FT232 and CH340G fail the same way, the board wiring is the stronger suspect than Linux itself. On this device, shared or loaded RX/TX lines were the most credible root cause, and Cloudcutter bypassed that whole path. [#20669566]

Quick Facts

  • The UART attempt that progressed furthest used -b 115200, --startaddr 0x0, and a BK7231N image, but it still stopped at Unprotect Failed. [#20657806]
  • Cloudcutter flashed OpenBeken-v1.17.130_bk7231n.ug.bin and reported firmware progress at 8%, 27%, 57%, 87%, and 98% before completion. [#20669566]
  • The working OpenBeken mapping reported in the thread was IRSend → Pin7, IRRecv → Pin8, and WiFi Status → Pin9. [#20669566]
  • A later config dump showed infre: 7, infrr: 8, and wfst_pin: 9, confirming the IR receive and Wi-Fi status pins from device data. [#20705858]
  • One extraction read at 0x1EE000 showed only the first 32 addresses changing uniquely, followed by a repeating 16-byte pattern, which made the stored Tuya config look sparse or partly overwritten. [#20705858]

1. Why does the BK7231 flashing tool show "unable to get bus" on Linux when using Mono or hid_download_py with a NAS-IR02W6-PRO V3?

It usually means the BK7231N bootloader is not getting a clean UART session, not that Linux alone is broken. In this thread, the GUI tool on Linux was described as unstable, while the Python HID tool was usually reliable unless RX or TX was shared with a button, resistor, or sensor on the board. The strongest clue is that two adapters, FT232 and CH340G, both failed similarly, which points to board-side interference more than OS-side failure. [#20667886]

2. How do I fix an "Unprotect Failed" error when flashing a BK7231N device with uartprogram at 115200 baud?

First reduce electrical interference on UART, then retry at 115200 baud. The thread reached the bootloader with python uartprogram ... -b 115200 -u -d /dev/ttyUSB0 -w --startaddr 0x0, but Unprotect Failed still occurred. The most practical fixes suggested were shorter wires, checking whether RX/TX are used elsewhere on the board, and testing directly on the BK7231N chip pins instead of through the header. If that still fails, switch to Tuya Cloudcutter. [#20657806]

3. What is the difference between BK7231N and BK7231T when selecting chip type in the Tuya HID flashing tools?

You should select the actual chip, but testing BK7231T mode on a BK7231N was reported safe in this case. The device owner identified the chip as BK7231N, and the advice was to try BK7231T mode anyway because using T mode on an N chip would not brick it. In this thread, changing to BK7231T mode did not solve the baud-rate problem, so chip selection was not the real blocker. [#20657850]

4. Which GPIO pins are used for IR send, IR receive, WiFi status, and RF send/receive on the NAS-IR02W6-PRO V3 board?

The confirmed pins were IRSend on Pin7, IRRecv on Pin8, and WiFi Status on Pin9. A later JSON-style config dump matched that with infre: 7, infrr: 8, and wfst_pin: 9. RF send and RF receive were not resolved in the thread, so there is no verified RF GPIO mapping here. That makes RF the main remaining unknown on this board version. [#20705858]

5. How can RX and TX line conflicts on a BK7231N board interfere with flashing, and how do I test for that?

Shared RX/TX lines can corrupt the bootloader conversation and trigger bus or unprotect errors. The thread explicitly warned that a button, resistor, or sensor on RX or TX may interfere. Test it this way: 1. Locate BK7231N pins 26 and 27. 2. Touch your USB-UART leads directly to those chip legs. 3. Briefly short CEN to ground and retry several times. Direct-to-chip contact helps bypass problematic board traces or attached parts. [#20668374]

6. What is Tuya Cloudcutter, and how does it work as an alternative to UART flashing for BK7231N devices?

"Tuya Cloudcutter" is a Linux-based flashing workflow that delivers custom firmware over the device's Tuya Wi-Fi update path, avoiding the UART bootloader path entirely. In this thread, it built a Docker image, connected to the device's SmartLife AP, ran an exploit, then served OpenBeken-v1.17.130_bk7231n.ug.bin over a local access point named cloudcutterflash. It succeeded after repeated UART failures with both FT232 and CH340G adapters. [#20669566]

7. How do I flash OpenBeken onto a NAS-IR02W6-PRO V3 using Tuya Cloudcutter on Linux step by step?

Use Tuya Cloudcutter and select the matching BK7231N profile. 1. Run sudo ./tuya-cloudcutter.sh, choose Flash 3rd Party Firmware, then select 2.0.0 - BK7231N / oem_bk7231n_irbox_mol_ty. 2. Choose OpenBeken-v1.17.130_bk7231n.ug.bin and put the device into AP slow-blink mode twice when prompted. 3. Wait for upload progress to reach 98%, then let it reboot about 30 seconds and verify OpenBeken activity. [#20669566]

8. What is CEN on the BK7231N chip, and how is shorting CEN to ground used during flashing?

"CEN" is a BK7231N control pin that resets or enables the chip, making it useful for forcing a fresh bootloader start during flashing. In this thread, the recommended technique was to hold UART contacts in place and briefly short CEN to ground while retrying. That quick reset helps the chip enter a state where the flashing tool can catch it before normal firmware takes over. [#20668374]

9. Mono GUI tool vs hid_download_py vs Tuya Cloudcutter: which method is most reliable for flashing BK7231N devices on Linux?

In this thread, Tuya Cloudcutter was the most reliable Linux method for this board. The GUI tool under Mono was reported unstable, hid_download_py was usually said to work but still failed here with Unprotect Failed, and Cloudcutter completed the flash successfully. If your board shows bus or unprotect errors after basic UART cleanup, Cloudcutter is the fastest practical fallback on Linux. [#20669566]

10. How much do USB-to-UART adapters, wire length, and cable quality matter when flashing BK7231N modules with FT232 or CH340G?

They matter, but this thread shows they are not always the root cause. The first setup used an FT232 with normal breadboard jumpers and a somewhat long USB cable; later a CH340G produced the same failure. That result weakens the case against the adapter alone and strengthens the case for loaded RX/TX lines or board-level interference. Shorter, more direct wiring still remains the first hardware check. [#20669566]

11. What is Tuya GPIO config at address 0x1EE000, and how can I extract it after flashing a device?

"Tuya GPIO config" is a small data block that stores board-specific pin assignments, including functions like IR receive and Wi-Fi LED behavior, in flash memory. In this thread, the OpenBeken app's read function targeted address 0x1EE000. The extracted data looked sparse, but reading that region still exposed enough information to confirm Pin9 as the status LED and later helped validate the device configuration. [#20705858]

12. How can I read and interpret a BK7231N device configuration JSON with itchiptool or OpenBeken tools on Linux?

Use a dump reader, then map the keys to functions. In this thread, itchiptool first showed only Status LED: pin P9, then its device-configuration view revealed JSON fields such as infre: 7, infrr: 8, wfst_pin: 9, and rsthold: 3. Those values let you confirm IR receive, Wi-Fi status, and reset timing even when the full board type is not detected. [#20705858]

13. Why would drag-and-drop key extraction fail under Mono when using the OpenBeken app on Linux?

Because the failure may come from Mono compatibility or from the device data itself, not from your bin file alone. In this thread, drag-and-drop under Mono returned failed to extract keys, and the user later saw the same extraction problem pattern outside that exact Linux workflow. That made the board data look incomplete or unsupported, rather than proving a simple GUI mistake. [#20705858]

14. What is the correct OpenBeken IRSEND command syntax for this IR blaster, and why would using IR_NEC instead of NEC fail?

The correct syntax used here was IRSEND NEC 0x80 0x12 0. The user confirmed that IRSEND IR_NEC 0x80 0x12 0 failed because the protocol name should be NEC, not IR_NEC. On this board, the command started working after the user fixed that one token, which makes syntax accuracy as important as the correct GPIO pin. [#20705858]

15. If UART flashing keeps failing on a Tuya IR/RF remote, what alternative recovery or extraction methods should I try next?

Switch to non-UART recovery first, then extract config after the device boots. 1. Try Tuya Cloudcutter if the device still enters Tuya AP mode. 2. If flashing succeeds, OTA-update to a newer OpenBeken build. 3. Use OpenBeken or itchiptool to read config data, such as 0x1EE000, and recover GPIO assignments. In this thread, that path succeeded after repeated UART failures and confirmed working IRReceive and Wi-Fi status pins. [#20669566]
Generated by the language model.
ADVERTISEMENT