logo elektroda
logo elektroda
X
logo elektroda

Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering

brenard 1143 2
ADVERTISEMENT
  • #1 20562722
    brenard
    Level 2  
    Hello,

    I recently bought a smart power plug that seems to be quite similar to Tuya LSPA9, based on CBS2 with power meter based on a BL0937. I want to put OpenBK and I firstly tried using the tuya-cloudcutter method, but unfortunately, its firmware version is not vulnerable to Cloudcutter.

    So I opened the plug, soldered cables on CBS2 pins (3V3, GND, RX, TX and CEN) and tried to flash it using BK7231GUIFlashTool. I powered the device using an extra 3.3v power supply (with its GND linked to the UART GND pin). My problem is that whatever I do, I can't establish the serial link with the CBS2. I tried to power off/on many times and also tried to quickly connect the CEN to ground. I also tried with bk7231tools and with another USB UART adapter, it does not work. I have of course checked and rechecked my connections and everything seems to be good.

    Some photos:
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering

    Do you have any ideas to fix my problem ?

    Thanks !
  • ADVERTISEMENT
  • #2 20562739
    p.kaczmarek2
    Moderator Smart Home
    Hello, here are few tips:
    1. Make sure you have a good 3.3V power supply (but I can see a AMS1117-3.3V on your board)
    2. In flash tool, starting flashing, and while it's waiting for "getting bus", disconnect 3.3V wire from CB2S, then take that wire (the one connected to CB2S 3.3V), connect it to ground, wait a second, and then reconnect power again - is it working?
    3. You can easily desolder CB2S with flux and solder wick as we did here:
    [youtube]
    https://www.youtube.com/watch?v=YQdR7r6lXRY
    [/youtube]
    Failed to flash OpenBK on CBS2 in smart plug like LSPA9 with power metering
    Helpful post? Buy me a coffee.
  • #3 20562975
    brenard
    Level 2  
    I think my 3v3 power is good enough: if I measure it, I have 3.28v and the device successfully boots with Tuya firmware (I can ping it and connect it through the local API). I tried to flash it with your method (when getting bus, putting CBS2 3v3 pin to GND for some seconds before reconnecting it to 3v3 power source), but I have the same result. I finally desoldered the CB2S and solved my access problems. I would be able to dump original Tuya firmware and write OpenBK using bk7231toolsh (BK7231GUIFlashTool not working, may be because I'm on Linux...). I now have to solder the CB2S in its place to see if all works as expected.

    Thank you for help!
ADVERTISEMENT