logo elektroda
logo elektroda
X
logo elektroda

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

callipejian 2004 21
ADVERTISEMENT
  • #1 20656459
    callipejian
    Level 3  

    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.
  • ADVERTISEMENT
  • #2 20656927
    p.kaczmarek2
    Moderator Smart Home

    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.
  • ADVERTISEMENT
  • #3 20657734
    callipejian
    Level 3  

    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

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

    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

    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  

    Tried that, I got the same error message, unable to set baudrate.
  • #8 20658247
    p.kaczmarek2
    Moderator Smart Home

    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  

    I am using FT232, wires are normal breadboard jumper cables.
  • #10 20658298
    p.kaczmarek2
    Moderator Smart Home
    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  

    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  

    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
    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.
  • #14 20668374
    spin55
    Level 17  

    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  
    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  
    Any idea which pins correspond to RF send/recv?
  • ADVERTISEMENT
  • #17 20678705
    p.kaczmarek2
    Moderator Smart Home
    Maybe doing Tuya extraction via OpenBeken can help:


    Helpful post? Buy me a coffee.
  • #18 20703143
    deschmit
    Level 3  

    @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
    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  

    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.
  • #22 20705858
    deschmit
    Level 3  

    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.
Summary generated by the language model.
ADVERTISEMENT