logo elektroda
logo elektroda
X
logo elektroda

[Solved] BK7231 flashing sensor via tuya-cloudcutter, not connecting to network

minchutu 9756 26
ADVERTISEMENT
  • #1 20515745
    minchutu
    Level 5  
    Hello.
    Has anyone managed to successfully inject the firmware using cloudcutter?
    I've tried and everything seems to be fine, but I can't get the sensor to connect to my network and therefore I can't configure or access BK7231 flashing sensor via tuya-cloudcutter, not connecting to network it. It doesn't show up in the DHCP list anywhere.
    On the other hand, I have created a box to integrate a DC converter, and forgot about batteries and deep_sleep. You can download it from https://www.thingiverse.com/thing:5940603/files
  • ADVERTISEMENT
  • #2 20515772
    dheenhasty
    Level 13  
    Yes, i have done it.

    But on cloud cutter you had 2 version cause there's a new firmware on it.
  • #3 20515795
    minchutu
    Level 5  
    Excuse me!
    What 2 versions are you talking about? I can just find one. I'm afraid I know even less than I thought...
  • #4 20515812
    dheenhasty
    Level 13  
    It's the same device listed on obk webapp, but on cloud cutter you will find two version. The key is different. So you had to try both version.

    If the flash is succesfull, you need to connect to the opbk wifi ap access, to configure your wifi after.
  • #5 20515888
    p.kaczmarek2
    Moderator Smart Home
    Make sure you are choosing proper binary, the BK7231T build for BK7231T, and BK7231N build for BK7231N.
    Helpful post? Buy me a coffee.
  • #6 20515907
    minchutu
    Level 5  
    Now I see what you mean.

    This is what I did:

    - I set -r parameter
    - I chose 2) Flash 3rd party firmware
    - I chose OpenBK7231N_UG_1.15.635.bin
    - I selected 1.1.17 firmware version (as shown in Tuya app)

    Everything was ok until the point when the sensor has to connect to 'cloudcutterflash'. Then I'm stuck
  • #7 20515996
    dheenhasty
    Level 13  
    So it might be the firmware version you can try the other one ?
  • #8 20516016
    minchutu
    Level 5  
    Same result. It got stuck and no connect to cloudcutterflash.
    I've tried without the -r as well.
  • ADVERTISEMENT
  • #9 20517703
    dheenhasty
    Level 13  
    You can post a printscreen or the output of cloudcutter please ? to know where it stuck exactly.
  • #10 20517744
    minchutu
    Level 5  
    First, thank you all for your help

    This is the sequence:



    sudo ./tuya-cloudcutter.sh
    [sudo] password for minchutu:
    Building cloudcutter docker image
    Sending build context to Docker daemon 23.18MB
    Step 1/10 : FROM python:3.9-slim-buster AS base
    ---> 954110adf96f
    Step 2/10 : RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 mosquitto
    ---> Using cache
    ---> b3dcd8221715
    Step 3/10 : FROM base AS python-deps
    ---> b3dcd8221715
    Step 4/10 : RUN pip install --upgrade pipenv
    ---> Using cache
    ---> bcdb7816cdf0
    Step 5/10 : COPY src/Pipfile /src/
    ---> Using cache
    ---> e5b258010cfc
    Step 6/10 : COPY src/Pipfile.lock /src/
    ---> Using cache
    ---> 52da6d1b41e2
    Step 7/10 : RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
    ---> Using cache
    ---> e45e9a626ade
    Step 8/10 : FROM python-deps AS cloudcutter
    ---> e45e9a626ade
    Step 9/10 : COPY src /src
    ---> Using cache
    ---> 6a3be18d0fa6
    Step 10/10 : WORKDIR /src
    ---> Using cache
    ---> 73a318802cb0
    Successfully built 73a318802cb0
    Successfully tagged cloudcutter:latest
    Successfully built docker image
    1) Detach from the cloud and run Tuya firmware locally
    2) Flash 3rd Party Firmware
    [?] Select your desired operation [1/2]: 2
    Loading options, please wait...
    [?] Select your custom firmware file: OpenBK7231N_UG_1.15.635.bin
    > OpenBK7231N_UG_1.15.635.bin

    [?] How do you want to choose the device?: By firmware version and name
    By manufacturer/device name
    > By firmware version and name
    From device-profiles (i.e. custom profile)

    [?] Select the firmware version and name: 1.1.17 - BK7231N / oem_bk7231n_temp_hum_sensor
    1.1.0 - BK7231T / oem_bk7231s_curtain_switch_nuohua
    1.1.0 - BK7231T / oem_bk7231s_light5_sleepwake_random_globe
    1.1.0 - BK7231T / oem_bk7231s_rnd_switch
    1.1.1 - BK7231T / HYS_03_018_bk7231t_a4y9plclmzpct6ol
    1.1.1 - BK7231T / oem_bk7231s_light_ty_oldDp
    1.1.11 - BK7231N / oem_bk7231n_temp_hum_sensor
    > 1.1.17 - BK7231N / oem_bk7231n_temp_hum_sensor
    1.1.2 - BK7231N / oem_bk7231n_control_switch
    1.1.2 - BK7231T / oem_bk7231s_control_switch
    1.1.2 - BK7231T / oem_bk7231s_hailai_1_plug
    1.1.2 - BK7231T / oem_bk7231s_light_db
    1.1.2 - BK7231T / oem_bk7231s_light_ty
    1.1.2 - BK7231T / oem_bk7231s_rnd_switch

    [?] Select the brand of your device: Tuya Generic
    > Tuya Generic

    [?] Select the article number of your device: Temperature and Humidity Sensor v1.1.17
    > Temperature and Humidity Sensor v1.1.17

    Selected Device Slug: tuya-generic-temperature-and-humidity-sensor-v1.1.17
    Selected Profile: oem-bk7231n-temp-hum-sensor-1.1.17-sdk-2.3.1-40.00
    Selected Firmware: /work/custom-firmware/OpenBK7231N_UG_1.15.635.bin

    ================================================================================
    Place your device in AP (slow blink) mode. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    .............................
    Found access point name: "A-A1BC", trying to connect...
    Device 'wlp2s0' successfully activated with '14cb3162-ba10-402c-8a70-89ef237829df'.
    Connected to access point.
    Waiting 1 sec to allow device to set itself up...
    Running initial exploit toolchain...
    Exploit run, saved device config too!
    output=/work/configured-devices/obzM4Umou2nr.deviceconfig
    Saved device config in /work/configured-devices/obzM4Umou2nr.deviceconfig

    ================================================================================
    Power cycle and place your device in AP (slow blink) mode again. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    ...............................................
    Found access point name: "A-A1BC", trying to connect...
    Device 'wlp2s0' successfully activated with '14cb3162-ba10-402c-8a70-89ef237829df'.
    Connected to access point.
    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Checking UDP port 53... Occupied by dnsmasq with PID 2362.
    Port 53 is needed to resolve DNS queries
    Do you wish to terminate dnsmasq? [y/N] y
    Attempting to stop dnsmasq.service
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Occupied by mosquitto with PID 2293.
    Port 1883 is needed to run MQTT
    Do you wish to terminate mosquitto? [y/N] y
    Attempting to stop mosquitto.service
    Checking TCP port 8886... Available.
    Flashing custom firmware...

    ================================================================================
    Wait for up to 10-120 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    ================================================================================

    Using WLAN adapter: wlp2s0
    Configuration file: /dev/stdin
    Using interface wlp2s0 with hwaddr ec:55:f9:53:d1:aa and ssid "cloudcutterflash"
    wlp2s0: interface state UNINITIALIZED->ENABLED
    wlp2s0: AP-ENABLED

    After that I got nothing else. I've tried:

    - wait for half an hour
    - EZ mode (quick blick)
    - AP mode (slow blink)
    - Use Tuya App trying to connect with the sensor

    I do not know what else to do.
  • #11 20518736
    dheenhasty
    Level 13  
    You see the cloudcutter ap with a smartphone for example ?

    Be sure to configure your wifi card to 2,4ghz for the ap mode. If it's a 5g endpoint it will not work.
  • #12 20521885
    minchutu
    Level 5  
    @dheenhasty it's confirmed: cloudcutterflash is a 2.4GHz network

    BK7231 flashing sensor via tuya-cloudcutter, not connecting to network
  • ADVERTISEMENT
  • #13 20528519
    dheenhasty
    Level 13  
    Sorry for the delay in anwser. it's really strange. seems like your sensor don't want to connect to the AP you expose .....

    i'll have a couple of sensor to patch this week end. so i see if i encounter the same error. you have the possibility to patch it thru serial port ?
  • #14 20528762
    minchutu
    Level 5  
    Thanks a lot for your interest.
    Yes, I've ordered a CH340 module. I'll try as soon as I receive the item.
  • ADVERTISEMENT
  • #15 20529181
    p.kaczmarek2
    Moderator Smart Home
    I have split this into separate topic, because it doesn't have much to do with the sensor itself. Parent topic is here:
    https://www.elektroda.com/rtvforum/topic3945688-120.html

    Regarding WiFi issue - I saw few times something strange with N platform. It was not able to connect to WIFi and the only fix was to use the web app "clear rf partition" button or the same button from our flash tool. I am not sure why it happens. Maybe it's because Tuya updated their RF calibration structure and it's now not compatible with our SDK. It does not happen often, though.
    Helpful post? Buy me a coffee.
  • #16 20530807
    dheenhasty
    Level 13  
    >>20528519


    Ok i've just flash 2 in a row with no issue :

    Quote:

    Flashing custom firmware...

    ================================================================================
    Wait for up to 10-120 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    ================================================================================

    Using WLAN adapter: wlp3s0
    Configuration file: /dev/stdin
    Using interface wlp3s0 with hwaddr 60:67:20:d7:be:74 and ssid "cloudcutterflash"
    wlp3s0: interface state UNINITIALIZED->ENABLED
    wlp3s0: AP-ENABLED
    Using PSK v1 - Received PSK ID version 01
    Processing endpoint /v2/url_config
    Processing endpoint tuya.device.active
    Processing endpoint tuya.device.dynamic.config.get
    Processing endpoint tuya.device.dev.dp.get
    !!! Endpoint response not found, using default response - tuya.device.dev.dp.get (This is usually okay and safe to ignore unless something isn't working)
    Processing endpoint tuya.device.uuid.pskkey.get
    [MQTT Sending] Triggering firmware update message.
    Processing endpoint tuya.device.upgrade.get
    Processing endpoint tuya.device.upgrade.status.update
    Processing endpoint /files/OpenBK7231N_App_UG_1.11.33.bin
    Firmware update progress: 26%
    Processing endpoint atop.online.debug.log
    Processing endpoint tuya.device.dynamic.config.get
    Processing endpoint tuya.device.dynamic.config.ack
    Firmware update progress: 56%
    Firmware update progress: 86%
    [Firmware Upload] /files/OpenBK7231N_App_UG_1.11.33.bin send complete, request range: bytes=0-626831/626832
    Firmware update progress: 98%
    Firmware file has been sent and MQTT reported a progress of nearly complete. Waiting 15 seconds to ensure flashing completes.
    Flashing should be complete. It takes about 15 seconds for the device to reboot and verify the flash was valid.
    Please wait about 30 seconds then look for signs of activity from the firmware you supplied (either watch for AP mode or check if it joined your network).


    So first connection put the sensor in slow blinking ( hold button => fast blinking => Release => hold again => Slow blinking)
    then when it asked for the other connection : => remove battery => put them back in => Hold button => Fast blinking => Release => hold again => Slow blinking

    then it stuck to cloudcutterflash line for One minutes at least. and then it flash the firmware.
  • #17 20543660
    minchutu
    Level 5  
    Hi!

    The CH340 module finally arrived and I have been able to flash the latest firmware with no problems. I don't know exactly why this module has resisted cloudcutter. You never know..

    Now that I have the module working again (although I have a small problem that I mentioned in the original chat), I'm going to try cloudcutter in two other modules still with original Tuya software. This time I hope everything goes well.

    Greetings.
  • #19 20547017
    minchutu
    Level 5  
    Hello.
    I have been able to flash two sensors with cloudcutter without "barely" problems. And I say this because I had to try twice in both cases. The only difference I found is that while in the first one the mqtt port was busy:

    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Checking UDP port 53... Occupied by dnsmasq with PID 2697.
    Port 53 is needed to resolve DNS queries
    Do you wish to terminate dnsmasq? [y/N] and
    Attempting to stop dnsmasq.service
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Occupied by mosquito with PID 2645.
    Port 1883 is needed to run MQTT
    Do you wish to terminate mosquito? [y/N] y
    Attempting to stop mosquito.service
    Checking TCP port 8886... Available.
    Flashing custom firmware...

    The second time the port was free and the procedure was managed without incident:

    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Checking UDP port 53... Occupied by systemd-resolve with PID 2209.
    Port 53 is needed to resolve DNS queries
    Do you wish to terminate systemd-resolve? [y/N] y
    Attempting to stop systemd-resolved.service
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Available.
    Checking TCP port 8886... Available.
    Flashing custom firmware...

    I say this not as a complaint, but in case any of you might find some more useful information.

    ¡Saludos!
  • #20 20590117
    BennyB44
    Level 1  
    >>20529181
    Would you be able to elaborate on what you need to do here?

    My downlights have an N chip and are displaying the same behavior.

    Cheers
  • #21 20590477
    p.kaczmarek2
    Moderator Smart Home
    BennyB44 wrote:

    My downlights have an N chip and are displaying the same behavior.

    What kind of behaviour?
    You can clear/Restore RF partition via Web App in OBK or via button in BK7231 Easy Gui flasher.
    Please provide more information and we can try to come up with something.
    Helpful post? Buy me a coffee.
  • #22 20607470
    minchutu
    Level 5  
    Hello.

    It's actually quite frustrating, but I can't find a pattern that gives away what the problem is. I have tried downloading firmware to 3 other thermometers and have had problems on one of them (same as the first one for which the thread was opened). I can't say what the problem is because I have used the same system on all 6 and I have succeeded on 4 and failed on 2. The version of Tuya is the same (1.1.17), the version of cloudcutter used is the same, the ttl-usb driver is the same, ....
    At first I thought it was a MAC issue (I have 4 starting with 1c:90:ff and 2 with a8:80:55), but it doesn't match with the ones that have had problems.
    Now that I know the behavior, my method is as follows.
    1) try it with cloudcutter a couple of times.
    2) if it fails, open the thermometer and use ttl-usb driver and cables to download firmware.
    Sorry, but I can't offer any solution other than that.

    Saludos

    Added after 2 [minutes]:

    @p.kaczmarek2 , if you don't mind I will close this thread.

    Regards
  • #23 20608064
    jkwim
    Level 12  
    minchutu wrote:
    First, thank you all for your help

    This is the sequence:



    sudo ./tuya-cloudcutter.sh
    [sudo] password for minchutu:
    Building cloudcutter docker image
    Sending build context to Docker daemon 23.18MB
    Step 1/10 : FROM python:3.9-slim-buster AS base
    ---> 954110adf96f
    Step 2/10 : RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 mosquitto
    ---> Using cache
    ---> b3dcd8221715
    Step 3/10 : FROM base AS python-deps
    ---> b3dcd8221715
    Step 4/10 : RUN pip install --upgrade pipenv
    ---> Using cache
    ---> bcdb7816cdf0
    Step 5/10 : COPY src/Pipfile /src/
    ---> Using cache
    ---> e5b258010cfc
    Step 6/10 : COPY src/Pipfile.lock /src/
    ---> Using cache
    ---> 52da6d1b41e2
    Step 7/10 : RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
    ---> Using cache
    ---> e45e9a626ade
    Step 8/10 : FROM python-deps AS cloudcutter
    ---> e45e9a626ade
    Step 9/10 : COPY src /src
    ---> Using cache
    ---> 6a3be18d0fa6
    Step 10/10 : WORKDIR /src
    ---> Using cache
    ---> 73a318802cb0
    Successfully built 73a318802cb0
    Successfully tagged cloudcutter:latest
    Successfully built docker image
    1) Detach from the cloud and run Tuya firmware locally
    2) Flash 3rd Party Firmware
    [?] Select your desired operation [1/2]: 2
    Loading options, please wait...
    [?] Select your custom firmware file: OpenBK7231N_UG_1.15.635.bin
    > OpenBK7231N_UG_1.15.635.bin

    [?] How do you want to choose the device?: By firmware version and name
    By manufacturer/device name
    > By firmware version and name
    From device-profiles (i.e. custom profile)

    [?] Select the firmware version and name: 1.1.17 - BK7231N / oem_bk7231n_temp_hum_sensor
    1.1.0 - BK7231T / oem_bk7231s_curtain_switch_nuohua
    1.1.0 - BK7231T / oem_bk7231s_light5_sleepwake_random_globe
    1.1.0 - BK7231T / oem_bk7231s_rnd_switch
    1.1.1 - BK7231T / HYS_03_018_bk7231t_a4y9plclmzpct6ol
    1.1.1 - BK7231T / oem_bk7231s_light_ty_oldDp
    1.1.11 - BK7231N / oem_bk7231n_temp_hum_sensor
    > 1.1.17 - BK7231N / oem_bk7231n_temp_hum_sensor
    1.1.2 - BK7231N / oem_bk7231n_control_switch
    1.1.2 - BK7231T / oem_bk7231s_control_switch
    1.1.2 - BK7231T / oem_bk7231s_hailai_1_plug
    1.1.2 - BK7231T / oem_bk7231s_light_db
    1.1.2 - BK7231T / oem_bk7231s_light_ty
    1.1.2 - BK7231T / oem_bk7231s_rnd_switch

    [?] Select the brand of your device: Tuya Generic
    > Tuya Generic

    [?] Select the article number of your device: Temperature and Humidity Sensor v1.1.17
    > Temperature and Humidity Sensor v1.1.17

    Selected Device Slug: tuya-generic-temperature-and-humidity-sensor-v1.1.17
    Selected Profile: oem-bk7231n-temp-hum-sensor-1.1.17-sdk-2.3.1-40.00
    Selected Firmware: /work/custom-firmware/OpenBK7231N_UG_1.15.635.bin

    ================================================================================
    Place your device in AP (slow blink) mode. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    .............................
    Found access point name: "A-A1BC", trying to connect...
    Device 'wlp2s0' successfully activated with '14cb3162-ba10-402c-8a70-89ef237829df'.
    Connected to access point.
    Waiting 1 sec to allow device to set itself up...
    Running initial exploit toolchain...
    Exploit run, saved device config too!
    output=/work/configured-devices/obzM4Umou2nr.deviceconfig
    Saved device config in /work/configured-devices/obzM4Umou2nr.deviceconfig

    ================================================================================
    Power cycle and place your device in AP (slow blink) mode again. This can usually be accomplished by either:
    Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times. Some devices need 4 or 5 times on each side of the pause
    Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
    See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
    ================================================================================

    Scanning for open Tuya SmartLife AP
    ...............................................
    Found access point name: "A-A1BC", trying to connect...
    Device 'wlp2s0' successfully activated with '14cb3162-ba10-402c-8a70-89ef237829df'.
    Connected to access point.
    Configured device to connect to 'cloudcutterflash'
    Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
    Checking UDP port 53... Occupied by dnsmasq with PID 2362.
    Port 53 is needed to resolve DNS queries
    Do you wish to terminate dnsmasq? [y/N] y
    Attempting to stop dnsmasq.service
    Checking UDP port 67... Available.
    Checking TCP port 80... Available.
    Checking TCP port 443... Available.
    Checking TCP port 1883... Occupied by mosquitto with PID 2293.
    Port 1883 is needed to run MQTT
    Do you wish to terminate mosquitto? [y/N] y
    Attempting to stop mosquitto.service
    Checking TCP port 8886... Available.
    Flashing custom firmware...

    ================================================================================
    Wait for up to 10-120 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
    ================================================================================

    Using WLAN adapter: wlp2s0
    Configuration file: /dev/stdin
    Using interface wlp2s0 with hwaddr ec:55:f9:53:d1:aa and ssid "cloudcutterflash"
    wlp2s0: interface state UNINITIALIZED->ENABLED
    wlp2s0: AP-ENABLED

    After that I got nothing else. I've tried:

    - wait for half an hour
    - EZ mode (quick blick)
    - AP mode (slow blink)
    - Use Tuya App trying to connect with the sensor

    I do not know what else to do.


    The fact that you get following line indicates that the device has been already declouded:
    Found access point name: "A-A1BC", trying to connect... 


    Access point changes from SmartLife-A1BC to A-A1BC when the initial exploit is successful.

    Are you sure that your 'cloudclutterflash' accesspoint is active at the following point:
    Quote:
    Using interface wlp2s0 with hwaddr ec:55:f9:53:d1:aa and ssid "cloudcutterflash"
    wlp2s0: interface state UNINITIALIZED->ENABLED
    wlp2s0: AP-ENABLED


    Also I have a concern about not seeing the following types of messages at this point indicating that the DHCP server is running in your setup:

    Quote:
    Jun 5 15:25:58 dnsmasq[15]: started, version 2.80 cachesize 150
    Jun 5 15:25:58 dnsmasq[15]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
    Jun 5 15:25:58 dnsmasq-dhcp[15]: DHCP, IP range 10.42.42.10 -- 10.42.42.40, lease time 12h
    Jun 5 15:25:58 dnsmasq-dhcp[15]: DHCP, sockets bound exclusively to interface wlan0
    Jun 5 15:25:58 dnsmasq[15]: read /etc/hosts - 5 addresses


    The previous message about port 53 not being available also might have a dependency here.

    If the DHCP server is not running, the device would not be able to successfully connect and proceed.

    Your issue may be not in the device but the server side.
  • #24 20608524
    minchutu
    Level 5  
    Thanks a lot @jkwin for your time and help.

    -The fact that you get following line indicates that the device has been already declouded:
    Code: text Expand Select all Copy to clipboard
    Found access point name: "A-A1BC", trying to connect...
    Access point changes from SmartLife-A1BC to A-A1BC when the initial exploit is successful.

    That's what happen the first time, but not the 5 time that came later

    - Are you sure that your 'cloudclutterflash' access point is active at the following point:
    Quote:
    Using interface wlp2s0 with hwaddr ec:55:f9:53:d1:aa and ssid "cloudcutterflash"
    wlp2s0: interface state UNINITIALIZED->ENABLED
    wlp2s0: AP-ENABLED

    100% sure
    BK7231 flashing sensor via tuya-cloudcutter, not connecting to network

    -Also I have a concern about not seeing the following types of messages at this point indicating that the DHCP server is running in your setup:
    Quote:
    Jun 5 15:25:58 dnsmasq[15]: started, version 2.80 cachesize 150
    Jun 5 15:25:58 dnsmasq[15]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
    Jun 5 15:25:58 dnsmasq-dhcp[15]: DHCP, IP range 10.42.42.10 -- 10.42.42.40, lease time 12h
    Jun 5 15:25:58 dnsmasq-dhcp[15]: DHCP, sockets bound exclusively to interface wlan0
    Jun 5 15:25:58 dnsmasq[15]: read /etc/hosts - 5 addresses

    I'd never seen such messages: nor the 2 times the operation went wrong neither the 4 times it run ok. The DHCP works great at router level with no issues so far. I understand that this is the way it works, or there's something I've forgot or misunderstood? Do I have anything to do with the DHCP service for the operation to run properly?

    - Your issue may be not in the device but the server side.

    You might be right, but why sometimes works and sometimes don't? Can you suggest any kind of trial or test I can do to find the "mystery"?

    Saludos.
  • Helpful post
    #25 20658238
    MnM1
    Level 10  
    I found this topic as I did run into the exact same issue with a Tuya Globe Fairy Lights kit

    https://www.aliexpress.com/item/1005004946026...order_list.order_list_main.113.21ef1802T0lCoU

    I have found that the following process works for me (assuming your device is already cut from Tuya and it has a new AP (not the original Tuya SmartLife AP)

    1. After your device gets stuck at the AP-ENABLED step - Just leave cloudcutter at the AP-ENABLED step (do not stop it, do not CTRL-C out if it - just leave it as it)
    2. On your phone remove the location permission for the Tuya app
    3. Start the Tuya app on your mobile phone
    4. Manually add a new device selecting the device type you have
    5. Put your device back into fast blinking pairing mode
    6. In the Tuya app add your device and follow the steps (confirm that is fast blinking etc)
    7. When it gets to the WIFI step - add cloudcutterflash as the WiFi name and abcdabcd as the password
    8. Let the Tuya app try and add the device. When the device is added the fast blinking (pairing mode) stops
    9. Go to your cloudcutter window and watch the logs - within a few minutes the update process will resume and the firmware will be successfully deployed to the device

    Hope this helps someone out there and it will stop devices being opened (and maybe damaged in the process) and flashed via serial/USB
  • Helpful post
    #26 20684785
    minchutu
    Level 5  
    CLOSED: Thank MnM1

    I found this topic as I did run into the exact same issue with a Tuya Globe Fairy Lights kit

    https://www.aliexpress.com/item/1005004946026...order_list.order_list_main.113.21ef1802T0lCoU

    (quote)
    I have found that the following process works for me (assuming your device is already cut from Tuya and it has a new AP (not the original Tuya SmartLife AP)

    1. After your device gets stuck at the AP-ENABLED step - Just leave cloudcutter at the AP-ENABLED step (do not stop it, do not CTRL-C out if it - just leave it as it)
    2. On your phone remove the location permission for the Tuya app
    3. Start the Tuya app on your mobile phone
    4. Manually add a new device selecting the device type you have
    5. Put your device back into fast blinking pairing mode
    6. In the Tuya app add your device and follow the steps (confirm that is fast blinking etc)
    7. When it gets to the WIFI step - add cloudcutterflash as the WiFi name and abcdabcd as the password
    8. Let the Tuya app try and add the device. When the device is added the fast blinking (pairing mode) stops
    9. Go to your cloudcutter window and watch the logs - within a few minutes the update process will resume and the firmware will be successfully deployed to the device

    Hope this helps someone out there and it will stop devices being opened (and maybe damaged in the process) and flashed via serial/USB

Topic summary

The discussion revolves around issues faced while flashing a BK7231 sensor using Tuya Cloudcutter. The user reports difficulties in connecting the sensor to their network after flashing, despite following the correct procedures. Various responses suggest checking the firmware version, ensuring the correct binary is used for the specific BK7231 model, and confirming that the cloudcutterflash access point is active. Some users recommend using a CH340 module for direct flashing if Cloudcutter fails. A successful workaround involves leaving the Cloudcutter at the AP-ENABLED step and manually adding the device through the Tuya app. The conversation highlights the importance of network settings, firmware compatibility, and troubleshooting steps for successful device integration.
Summary generated by the language model.
ADVERTISEMENT