logo elektroda
logo elektroda
X
logo elektroda

BL602 IoT Lamp Breakout Board: Pinout Layout & Flashing Tips

bl602newbie 6681 34
ADVERTISEMENT
  • #1 20102082
    bl602newbie
    Level 2  
    Hello.

    I got a new IOT device and it came with a BL602 on a breakout board. I am not sure what the layout of this board is and how I would connect to get it flashed. If anyone can provide me with some tips that would be great.
    BL602 IoT Lamp Breakout Board: Pinout Layout & Flashing Tips BL602 IoT Lamp Breakout Board: Pinout Layout & Flashing Tips
  • ADVERTISEMENT
  • #2 20102439
    p.kaczmarek2
    Moderator Smart Home
    It should be very simple. It has all required pins on the back side of the board. See:
    - 3.3V
    - BT (bootloader)
    - RX1
    - TX1
    - GND
    It's all that's needed. You should follow my guide at:
    https://www.elektroda.pl/rtvforum/topic3889041.html
    or an english version at:
    https://www.elektroda.com/rtvforum/topic3889041.html

    By the way, where did you get that device? Can you please provide more information, I would like to buy one for testing.
    Helpful post? Buy me a coffee.
  • #3 20102791
    bl602newbie
    Level 2  
    Thank you for the reply. Maybe you could highlight which pins correspond to which.

    3 volts is obvious but the rest may not be. Also for future reference of anyone else. Especially which pin is boot on the picture.
  • #4 20102808
    p.kaczmarek2
    Moderator Smart Home
    BT = BooT = Bootloader.
    RX from board should be connected to TX from UART to USB converter, and TX from board should be connected to RX from USB to UART converter.
    (UNLESS someone is using non-standard naming on board, then please switch RX and TX).

    Are you aware that you should use 3.3V power supply for that? 5V connected to 3.3V pin would burn BL602.
    Helpful post? Buy me a coffee.
  • #5 20102827
    bl602newbie
    Level 2  
    thank you very much for your answer and your tip.

    What I meant was which pin corresponds to which pin on the board.

    so 3v3 pin is obvious the 3 volt pin
    Gnd is obviously ground
    but then it's only written as 22 17 C W
    maybe if you could specify
    22 = ?
    17 = ?
    C = ?
    W=?
    and I'm not sure if we need the pins on the back of the board.
  • #6 20102890
    p.kaczmarek2
    Moderator Smart Home
    Well, if it's a RGBCW bulb, then C is a cool white channel, W is warm white, R is red, G is Green, B is Blue.

    I don''t know about L and A, can you show the whole device you have?

    also, have you tried looking at this image? You can see where the dot mark is on your photo: BL602 IoT Lamp Breakout Board: Pinout Layout & Flashing Tips
    Helpful post? Buy me a coffee.
  • #7 20103039
    bl602newbie
    Level 2  
    Well that is the issue. Figuring out the pinout from the chip diagram to the actual board.
    So we know we need for example TX and RX and the BOOT pin but which pins are those on the actual PCB board that are labeled using that combination of letters.
    I am really not good at following the traces on the board. I suspect that these letters and numbers mean something but I'm not experienced enough either to know what they are referring to.

    I can't post a link to the product but it's just a lamp holder. It's a socket for a light bulb nothing else. It should just turn a bulb on or off.
  • ADVERTISEMENT
  • #8 20103128
    p.kaczmarek2
    Moderator Smart Home
    This is very simple. You align the pinout image just so it matches the dot mark (first pin) and then look at pins.

    See:
    BL602 IoT Lamp Breakout Board: Pinout Layout & Flashing Tips
    Your photo is a bit blurry, so I am not able to tell 100% which pin goes where, but as you can see, I marked pins with colors....

    This is what I do to find out the pins of unknown module. I have never seen your module before.
    Helpful post? Buy me a coffee.
  • #9 20360422
    p.kaczmarek2
    Moderator Smart Home
    Here is a related topic, also discusses the SM-028_V1.3 module
    Polish link: https://www.elektroda.pl/rtvforum/topic3945435.html
    English link: https://www.elektroda.com/rtvforum/topic3945435.html
    Helpful post? Buy me a coffee.
  • #10 21304294
    divadiow
    Level 37  
    I believe the topic of the thread is this device, which does indeed come with an SM-028_V1.3 module

    Packaging of a smart lamp holder E27.

    If correct I'll flesh this post and its profile out.
  • #11 21305303
    divadiow
    Level 37  
    bl602newbie wrote:
    but it's just a lamp holder


    95% sure I have the device in question. The template on devicelist doesn't contain any pin assignments so I suggest it be changed to:

    Code: JSON
    Log in, to see the code


    Orange box with a smart E27 lamp holder. View of Smart Lamp Holder on a table with box and instructions.

    Close-up of an E27 lamp socket showing metal contact elements. Close-up of a circuit board with electronic components. Close-up view of the circuit board for an E27 smart lamp. Close-up view of a circuit board with several electronic components. SM-028 V1.3 PCB with electronic components. Interior of an E27 smart lamp holder showing electronic components. View of a circuit board with electronic components and markings. Circuit board with electronic components mounted in an E27 lamp holder. Device circuit board with visible electronic components on a blue background. Smart Wi-Fi Lamp Holder by eWeLink with visible technical specifications.

    boot log:
    Code: Text
    Log in, to see the code


    the assignments at the end of the log seem to suggest the red LED (wifi status is blue - P22) is GPIO0 but this doesn't appear controllable, PWM, LED, REL etc

    So the behaviour with this template is the blue LED is flashing until wireless is connected, then it's off
    the red LED comes ON with the bulb ON - ie the relay closed. perhaps it serves as a warning that the socket is live, rather than a signal the bulb is off.

    Factory firmware backup attached

    https://github.com/OpenBekenIOT/webapp/pull/162
  • ADVERTISEMENT
  • #12 21776447
    tadeu1
    Level 5  
    Question, there's another way to get the bootloader pin instead the microchip and that test point?
  • #13 21783911
    divadiow
    Level 37  
    not entirely sure what you mean but the BT pin only goes to that test point, so no.
  • #14 21783926
    p.kaczmarek2
    Moderator Smart Home
    Well, I'm not sure what he means either, but if there is no test point, he could, theoretically, solder directly to QFN pad...
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 21789408
    tadeu1
    Level 5  
    Is it possible to replace the BL602 with an ESP-02S with Tasmota?
  • #16 21790076
    p.kaczmarek2
    Moderator Smart Home
    OpenBeken provides a good level of compatibility with Tasmota, it can work with Tasmota API calls (cmnd format is the same and returned JSON matches), it can pair with Tasmota Device Groups directly, and it can run with ioBroker just like Tasmota does, so it's the simplest and most recommended choice there.

    Still, if you really want to replace BL602 module with ESP8266 (ESP-02S) then you need to check if GPIOs are matching.
    RFID module with labeled front and back connection pins
    It seems that two most important pads, name 3V3 and GND are matched well. So, then we only have to check if remaining pins can fit. I think that RST may be problematic, if your device expects a control signal there. Also AD can also be an input, not an about, etc.

    So, it fits, more or less, but specifics may vary. In worst case you'll have to manually solder a small wire to use different GPIO for some signal.

    Why do you want to replace BL602 with ESP-02S and which BL602 device do you have exactly?
    Helpful post? Buy me a coffee.
  • #17 21790088
    tadeu1
    Level 5  
    I broke the boot pinout on BL602 and I have 10 ESP-02s. It's a power outlet. I tried a lot of stuff to figure out mine; it's the SM-028 1.3. It's already soldered with Tasmota. But I can't figure out the GPIO to fix it.
  • #18 21790090
    p.kaczmarek2
    Moderator Smart Home
    I would need to see the photos, but you certainly can give it a go. Even with our OpenESP8266. Flash the module with chosen firmware first. Then solder it into socket. You'll then be able to see if it still boots and shows on your WiFi.

    As I said, the most important "fingerprint" of module - power lines (3.3V and GND) are matching, so it should be relatively easy to get this running.
    Helpful post? Buy me a coffee.
  • #19 21790096
    tadeu1
    Level 5  
    Actually I can access it, configure to connect to my network, and it's already soldered in the PCB Side view of electronic module with soldered blue PCB sticking out
    It's the back part; the front is only. Option to solder D13, D4, D5
  • #20 21791442
    tadeu1
    Level 5  
    With this config for now, I can turn on and off, LED blue still on when is on and nothing when is off.
    I'm trying to figure out to fix the button first then the energy controller.

    Any guess?

    Tasmota web interface showing GPIO settings for BL602 ESP MOD device
  • #21 21791521
    p.kaczmarek2
    Moderator Smart Home
    I would need to know more about your device. I don't even see the information what kind of power metering IC do you have? I guess it's either BL0942 or BL0937, but who knows...

    You don't have much GPIO options, but using multimeter to check how it's all connected is safest bet.
    Helpful post? Buy me a coffee.
  • #22 21791527
    tadeu1
    Level 5  
    Is there an easy way to guess what's in the solder point? Like D4 is a button, etc?

    I'll open it to check the chip for energy.
  • #23 21791757
    p.kaczmarek2
    Moderator Smart Home
    Well, we have GPIODoctor, which can be used to quickly sample pins:
    https://www.elektroda.com/rtvforum/topic3976371.html

    We also have Tuya config extraction, but not for BL602.... but @divadiow did some experiments with BL602 as well, do you have original 2MB flash backup from BL602 chip>?
    Helpful post? Buy me a coffee.
  • #25 21792009
    tadeu1
    Level 5  
    Some pics Circuit board SM-028_V1.3 with electronic components and clamp connectorsSide view of PCB with ESP-02s module and electronic components solderedElectronic module with QRELAY relay and L-IN/N-IN connectors on a green PCBClose-up of PCB with QJRELAY BRD-SS-105LMF relay and electronic componentsClose-up of a PCB with a push-button, BL0937 and BL60220 chips, and SMD components

    Added after 1 [minutes]:

    >>21791979 Thanks, man, have 2 of those
    One, I broke the IC0 pin; that's why I soldered the ESP-02s
    I'll do the backup in the other one.
  • #26 21792083
    p.kaczmarek2
    Moderator Smart Home
    BL602 backup guide:
    https://www.elektroda.com/rtvforum/topic4051649.html
    But, now you can also use our flasher:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    So maybe try out flasher first and let us know how it works.
    Helpful post? Buy me a coffee.
  • #27 21792093
    tadeu1
    Level 5  
    >>21791979 I try to use the python

    I read from 0x000000 to 0x1FFFFF
    B:Sonoff_Devices_DIY_Tools-masterBouffaloLabDevCube-v1.9.0>ler.py flash.bin
    Found 1 DTB candidate(s).
    
    == DTB #1 @ file offset 0x001FC000, size 0x1BA2 (7074 bytes) ==
      Failed to parse DTB: 'int' object has no attribute 'decode'
    
    ######################## SUMMARY: Extracted DT properties ########################
    No extractable /config_gpio or /gpio DT subtree found in any DTB candidate.
    
    
    attached the flash.bin
    
    thats the log from boufalou
    [13:57:45.416] - ========= Interface is uart =========
    [13:57:45.416] - com speed: 2000000
    [13:57:45.416] - Eflash load helper file: B:Sonoff_Devices_DIY_Tools-masterBouffaloLabDevCube-v1.9.0chipsbl602eflash_loader/eflash_loader_40m.bin
    [13:57:45.416] - ========= load eflash_loader.bin =========
    [13:57:45.416] - Load eflash_loader.bin via uart
    [13:57:45.417] - ========= image load =========
    [13:57:45.698] - Not ack OK
    [13:57:45.699] - FL
    [13:57:45.701] - result: FL
    [13:57:45.978] - tx rx and power off, press the machine!
    [13:57:45.978] - cutoff time is 0.1
    [13:57:46.088] - power on tx and rx
    [13:57:46.899] - reset cnt: 0, reset hold: 0.005, shake hand delay: 0.1
    [13:57:46.900] - clean buf
    [13:57:46.909] - send sync
    [13:57:47.129] - ack is 4f4b
    [13:57:47.175] - shake hand success
    [13:57:47.191] - get_boot_info
    [13:57:47.193] - data read is b'010000000000000003000400b5923d0286241d00'
    [13:57:47.193] - ========= chipid: 2486023d92b5 =========
    [13:57:47.193] - last boot info: None
    [13:57:47.193] - sign is 0 encrypt is 0
    [13:57:47.193] - segcnt is 1
    [13:57:47.200] - segdata_len is 38592
    [13:57:47.284] - 4080/38592
    [13:57:47.368] - 8160/38592
    [13:57:47.452] - 12240/38592
    [13:57:47.535] - 16320/38592
    [13:57:47.619] - 20400/38592
    [13:57:47.703] - 24480/38592
    [13:57:47.789] - 28560/38592
    [13:57:47.874] - 32640/38592
    [13:57:47.957] - 36720/38592
    [13:57:47.997] - 38592/38592
    [13:57:47.999] - Run img
    [13:57:48.106] - Load helper bin time cost(ms): 2688.489501953125
    [13:57:48.213] - Flash load shake hand
    [13:57:48.231] - default set DTR high
    [13:57:48.337] - clean buf
    [13:57:48.347] - send sync
    [13:57:48.574] - ack is 4f4b
    [13:57:48.620] - Read mac addr
    [13:57:48.622] - macaddr: b5923d028624
    [13:57:48.622] - flash set para
    [13:57:48.623] - ========= flash read jedec ID =========
    [13:57:48.624] - Read flash jedec ID
    [13:57:48.624] - flash jedec id: c8401580
    [13:57:48.624] - Finished
    [13:57:48.631] - get flash size: 0x00200000
    [13:57:48.631] - ========= flash read jedec ID =========
    [13:57:48.633] - Read flash jedec ID
    [13:57:48.633] - flash jedec id: c8401580
    [13:57:48.633] - Finished
  • #28 21792161
    divadiow
    Level 37  
    I'm not entirely sure how much of this is relevant or of use, but here's the result of the script on your backup file.

    Code: Text
    Log in, to see the code


    Code: Text
    Log in, to see the code


    so, maybe...?


    Code: Text
    Log in, to see the code


    (GPT summary - away from home/low on time at the mo)
  • #29 21792167
    tadeu1
    Level 5  
    The problem is: Tasmota only. Have BL0973 CF, not CF1 or SEL.

    Thanks
    I'll try to get it. Works on ESP-02S
  • #30 21792293
    p.kaczmarek2
    Moderator Smart Home
    This has different name in Tasmota, but works the same as in OBK.
    See a random Tasmota template:
    https://templates.blakadder.com/refoss_R10.html
    I have underscored the roles you need to set.
    Refoss R10 power switch with GPIO pin mapping and voice assistant compatibility
    Of course, for your device, pin indexes will be different!
    Helpful post? Buy me a coffee.

Topic summary

The discussion focuses on identifying the pinout layout and flashing procedure for a BL602-based IoT lamp breakout board, specifically an E27 smart lamp holder using the SM-028_V1.3 module. Key pins required for flashing include 3.3V power, GND, Boot (BT), RX, and TX. The RX and TX pins on the board must be cross-connected to the TX and RX of a USB-to-UART converter, respectively, with caution to use a 3.3V power supply to avoid damaging the BL602 chip. The board’s pin labels such as 22, 17, C, and W correspond to RGB and white LED channels (C = cool white, W = warm white), while other pins like 14 and 20 are associated with button and relay functions. Pin identification can be aided by aligning the chip’s pinout diagram with the board’s dot mark and using reference images. Additional resources and guides are available in linked forum topics for detailed flashing instructions and device information.
Summary generated by the language model.
ADVERTISEMENT