Elektroda.com
Elektroda.com
X
Elektroda.com

The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab

p.kaczmarek2 2133 10
This content has been translated flag-pl » flag-en View the original version here.
  • The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Hello, I will present here how the DT-BL10 development board looks in practice, offering BL602 from Bouffalo Lab, i.e. a Wi-Fi + BLE microcontroller clocked up to 192MH.
    I became interested in BL602 because it started to appear in various types of IoT devices, such as smart LEDs, WiFi controlled relays, LED strip controllers, etc. It is not as common as ESP8266 or BK7231T / BK7231N, but still begins to appear in some smart devices. I find Bl602 somewhat more or less as often as Realtek systems (RTL8710BN, WBR2 modules and similar). My OpenBeken already supports it, but I still thought it would be worth presenting this module here.


    Purchasing the development board
    I managed to get the board from China for about 8$ (it seems that's was not possible to get that board to Poland for less). There were no problems with the customs, but I waited several weeks for the package. Here is a screenshot of the auction where I was buying:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Received kit:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    On the board, in addition to the main BL module, there is an LDO regulator that gives us 3.3V from 5V from USB and CH340N, i.e. a USB to UART converter, for which you may need to install drivers.
    The "DX" pin corresponds to "GPIOX" (where X is the pin index), so there are no pin mapping problems.

    SDL BL602, compiling, flashing firmware
    The required SDK is available for free on Github:
    https://github.com/bouffalolab/bl_iot_sdk
    The SDK also includes a program for flashing the firmware via USB (or, actually, via UART, there is CH340 on the board, which is virtual COM port controller), BLDevCube.exe.
    I have already presented the description of compiling and uploading the firmware in this topic:
    Tasmota replacement for BL602, programming, pairing with Home Assistant.
    The compilation is done in Msys from the Mingw package.
    To upload a firmware :
    1.release the UART port (if we have it open in Realterm to read logs)
    2. keep the Boot button pressed
    3. momentarily press En
    4. release the Boot button
    5. in BLDevCube.exe turn on firmware upload (our binary is firmware.bin)
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    6.After loading the firmware, to start the program normally, press the En button briefly



    In addition, for about 9 months, we also have a framework for PlatformIO and VSCode available:
    https://github.com/Community-BL-IOT/pio-bl602-boufallo-arduino-test
    This allows you to program this module similar to Arduino:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Personally, I have not tested it, but I think that it is a great alternative for beginners and it will certainly make the adventure with this platform much easier for many people.

    Examples available
    SDK includes examples of peripherals and available libraries, including ADC, DAC, Flash memory access, GPIO, I2C, PWM, RNG (pseudo-random number generation), RTC, SPI, timers, UART, watchdog), OTA, sockets, HTTP, DNS and a lot more:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab

    Working environment
    The module from DT-BL10 is easiest to set on two prototyping boards from one of them we have to disconnect one of the power / ground rails. It is very easy to do with standard prototyping boards:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    It simply will not fit on one contact plate. Therefore, it is worth remembering to buy two when we are just starting our adventure.

    BL602 in IoT devices
    BL602 is used in various 'smart' devices, for example Magic Home LED strip controllers:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    In Sonoff MINIR3:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    source: https://notenoughtech.com/home-automation-review/sonoff-minir3/
    In LED bulb smart as BL-200 (DT-BL200):
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    (by the way, in the photo you have signed BL-200 pins)
    And here is another LED lamp, completely different then previous one, featuring a mini-pcb with BL602 (here I2C protocol is used for control with RGB LED support via SM2135):
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab

    Summary and impressions
    The board is quite comfortable to use, but I think there are a few things that could be improved.
    - there is one CH340 on board,that is, one UART port, which is used both for printing (and receiving) information on the terminal and for programming. In the case of the basic SDK there is no integrated environment for BL, so I have Realterm as a terminal and I use BLDevCube.exe for flashing. For this reason, before each flashing, I have to manually release the Realterm port and open it again after programming. Apparently it's only two clicks, but always ...
    However, this problem is solved by uploading the firmware via WiFi - OTA: https://github.com/bouffalolab/bl_iot_sdk/tree/master/customer_app/system/ota/demo_ota
    Perhaps it is also solved in the framework from PlatformIO mentioned earlier, there everything is together in one IDE.
    - it's a pity that you have to press these buttons at all to upload the firmware. As if the USB to UART converter used had a GPIO, this could be avoided. A similar mechanism is in Arduino. In my projects, I used the MCP2221 and the appropriate driver for this. Even in the case of PIC32MZ via GPIO MCP2221, I was able to shorten the RESET pin of the PIC to ground and cause a reboot.
    - I do not know why some of the derived pins are N / C, after all, when it is free, they could route GND there, it is always more convenient ...
    Despite everything, the module is quite handy and cheap, the title "$5" did not turn out to be correct for me in Poland, but "less than $8" also sounds good.
    This board really made it easier for me to develop OpenBeken (or there: OpenBL602), but it's much easier to test on a development board than on an IoT device.
    I have not activated Bluetooth from this board yet, but if something moves, maybe I will show it on the forum.
    I invite you to read the BL602 documentation:
    https://pine64.github.io/bl602-docs/

    Cool? Ranking DIY
    Can you write similar article? Send message to me and you will get SD card 64GB.
    About Author
    p.kaczmarek2
    Level 27  
    Offline 
    p.kaczmarek2 wrote 2159 posts with rating 3937, helped 94 times. Been with us since 2014 year.
  • #2
    szymon122
    Level 38  
    p.kaczmarek2 wrote:
    It is not as common as ESP8266


    Does this system or those with "BK" start have any advantages over ESP8266? The latter is probably cheaper, which in the case of such simple systems as e.g. WiFi light bulbs is not without significance :)
  • #3
    p.kaczmarek2
    Level 27  
    First of all, Beken systems also offer Bluetooth. And when it comes to the price, from what I heard, Beken is also cheaper for manufacturers of Tuya devices, but I do not have this information to verify.

    The fact is that manufacturers are replacing ESP en masse with BK in IoT devices. Even modules with them have a compatible footprint, eg TYWE3S (ESP12F) replaces WB3S.
  • #4
    szymon122
    Level 38  
    p.kaczmarek2 wrote:
    And when it comes to the price, from what I've heard, Beken is also cheaper for manufacturers of Tuya devices


    BL602 for orders> 1000 in China costs $ 1.1152 and ESP8285 $ 0.981 also above 1000 pcs.
    ESP8285 is the same as ESP8266, but has built-in memory instead of using two chips.

    When it comes to bluetooth, it is, for example, ESP32-S2, then we also have, for example, Ethernet and generally more possibilities, but here the price is a bit higher - $ 1.7096 for 30 pieces (I do not have pricing for> 1000 pieces, then maybe it would be better).

    So if bluetooth is needed, it is an alternative in similar money, a bit cheaper than ESP32.
  • #5
    chemik_16
    Level 25  
    It is not just about the price, in these BK we have an encrypted batch, and it is difficult to change the software, China was unlikely to mod their cloud solutions for which they get $$ and metadata and replace them with open software.
  • #6
    p.kaczmarek2
    Level 27  
    chemik_16 wrote:
    China was unlikely to be able to mod their cloud solutions

    And yet they released SDK Tuya for BK7231 along with bkWriter on Github ... and AliOS probably also has support from BK.

    And in addition, they did not protect their buffers well, one of them can be overfilled (exactly the buffer from the JSon parser) and then perform operations on a given IoT device remotely without authorization, including OTA and upload OpenBeken to a given device without opening its housing. And so it was created tuya-cloudcutter
  • #7
    khoam
    Level 41  
    p.kaczmarek2 wrote:
    The fact is that manufacturers are replacing ESP en masse with BK in IoT devices.

    I would like a reliable link to this amazing information.

    szymon122 wrote:
    As for bluetooth

    It is also available on the ESP32-C3 and C2. Both cheaper than archaic "bacons", with solid support of ESP-IDF, FreeRTOS and Arduino Core.
  • #8
    p.kaczmarek2
    Level 27  
    khoam wrote:

    Poproszę o wiarygodny link do tej rewelacyjnej informacji.

    Trochę mam deja vu, bo chyba na to pytanie już Tobie odpisywałem, ale:

    Przykład 1 - a raczej przykłady - spójrz na same urządzenia na stronie blakadder, np. ZMAi-90 - https://templates.blakadder.com/ZMAi-90.html
    Quote:

    WARNING: New Tuya devices have replaced their Wi-Fi module with one incompatible with Tasmota!!!
    Tuya-Convert might not be possible for this device since the template was added (2020-05-12).

    Zamienili TYWE3S na WB3S (wiem, bo mam w kolejce ten produkt).
    Takich przykładów można mnożyć:
    https://templates.blakadder.com/feit_electric-BPA800RGBWAG2P.html
    https://templates.blakadder.com/polux_313799.html
    https://templates.blakadder.com/treatlife_DS01.html tu w 2019 zmienili

    Przykład 2 - opinie użytkowników na Reddicie
    "That moment when you realize the 30 tuya lights you just bought no longer contain ESP8266..."
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Bardzo dobry przykład, ktoś kupił lampki licząć na ESP a tam BK...


    "Tuya moving away from ESP8266"
    Quote:

    Tuya moving away from ESP8266
    I've had lots of success in the past flashing bulbs, switches, plugs, etc with Tuya-Convert, it works amazingly well.

    I wanted to get my dad into the home automation game for Christmas since he seems to like my setup.

    So I got him all set up with HA at home and flashed his existing bulbs and smart plugs with no issues.

    I figured I'd get him 8 more smart bulbs for Christmas and 4 or 5 smart switches.

    I've purchased over 30 light bulbs and probably 15 smart switches so far and have not had success flashing anything. Every time I pull them apart after tuya-convert fails and find something other than an ESP8266.

    So far I've tried merkury bulbs from walmart, and nitebird bulbs from Amazon. All models say they may work when I look them up on the repository, and FCC ID pictures show ESP 8266 but when I open them, they are clearly on a different chip.

    https://www.reddit.com/r/tasmota/comments/k2vvup/tuya_moving_away_from_esp8266/
    Is Tasmota on Tuya dead?|
    Quote:

    I haven’t messed with Tasmota at all until recently. In reading Blakadder templates, it is noted all over that newer Tuya firmware prevents flashing. So does this mean Tuya/rebranded Tuya devices are essentially “uncrackable”? Or simply that one has to solder leads to serial connections? And is that even reasonable on most devices?


    Example 3 - opinions of sellers of smart devices, e.g. I cooperate with one and he claims that they do not produce on ESP anymore
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    This is one of the supporters of the project, both through the $$$ donations and the shipment of devices, he imports IoT products from China branded for his company and sells them in Poland, he gave me 3 sockets for testing:
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Why am I working with him? You will find out about it soon ...

    Example 4 - I would forget, but even on Electrode users wrote about it ...
    Once
    pillarama wrote:
    Greetings everyone. Just sharing my experience - I purchased a set of RGB LED smart bulbs branded "Arlec GRID Connect SMART LED GLOBES" from the local hardware store here in Australia.
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Popped one open and found that they are running WB2L modules. :(
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Seems that nothing ships with ESP modules any more ... :( Then I found this forum - and hope!

    Two
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab
    Three
    The 5$ DT-BL10 board (BL602 WiFi & BT), new MCU from Bouffalo Lab


    I could quote it much more, but I don't have time for such fun and I have a strange feeling that it would not be useful to spend my time anyway

    khoam wrote:

    It is also available on the ESP32-C3 and C2. Both cheaper than archaic "bacons", with solid support of ESP-IDF, FreeRTOS and Arduino Core.

    You don't understand the purpose of the project I'm running. Go back to the first topic in the series and read about where the project came from.

    But for other readers I will write - the project came from the fact that smart devices have "bacons" and it is easier and cheaper for them to change the charge than to exchange them for other ones. Personally, I don't know if you can buy "beken" without a smart device at all, and I don't see any sense in it.

    So if you think about doing some WiFi and Bluetooth project, don't even try to pick "bacens". Choose a popular and cheap solution that is easy to buy, is well documented and gives us some certainty that, for example, in 10 years our modules will still be used for sale.
  • #9
    khoam
    Level 41  
    p.kaczmarek2 wrote:
    I could quote it much more, but I don't have time for such fun

    You have not written anything to show that manufacturers are massively replacing ESP with BK in IoT devices. Elektroda is not a gossip forum.

    p.kaczmarek2 wrote:
    You don't understand the purpose of the project I'm running.

    It doesn't matter to me. I only paid attention to the factoids about ESP, which you generate more and more often. You'd better focus on your project.
  • #10
    p.kaczmarek2
    Level 27  
    Ok @khoam, then maybe let's do it differently.

    What kind of responses do you expect and what would convince you that they are actually converting ESP to BK? I am afraid that whatever I write, it will be rejected by you.

    You set the bar so high that probably only the official position of Tuya would convince you, or rather we know that we will not experience such a position ...

    So to sum up, probably even if I indicated 100 devices where they switched from ESP to BK, you would reject it anyway, so your position boils down to absurdity and further discussion does not make sense.


    EDIT:
    khoam wrote:

    I only paid attention to the factoids about ESP, which you generate more and more often. You'd better focus on your project, I guess.

    As I wrote earlier - I am convinced that in recent years they have actually largely switched from ESP to BK (and probably also a bit to other modules) and the Tasmota community confirms this, as well as the distributor in contact with the factory with whom I work (supporting the project) .

    We could only discuss the scale of this phenomenon (if you would pay attention to the word "mass" and argue that maybe not so much, I would admit you were right), but the phenomenon is definitely happening.

    But in any case - we will not convince each other anyway, so rather EOT.
  • #11
    blakadder
    Level 6  
    khoam wrote:
    p.kaczmarek2 wrote:
    I could quote it much more, but I don't have time for such fun

    You have not written anything to show that manufacturers are massively replacing ESP with BK in IoT devices. Elektroda is not a gossip forum.


    Some manufacturers are moving away from ESP, most importantly Tuya does, who is, basically, THE Manufacturer (with a capital M). That has been verified and confirmed for over a year. The fact that you cannot choose any Espressif based modules in Tuya's device design portal is the cherry on top. My Tasmota supported devices list has been issuing a warning for every device that changed the module while keeping its model name the same (https://github.com/blakadder/templates/search?q=%22unsupported%3A+true%22) and a general warning that any device supporting Tuya Smart app most likely does not carry Espressif anymore.

    ITEAD/Sonoff has been alternating between ESP32 (POW Elite, SwitchMan M5), BL602 (S40, their new bulbs) and OPL1200 (L2 and L3).

    The only "big" manufacturer that still uses Espressif chips (ESP32, their own version of a module with a single core) is Xiaomi (f.e. https://templates.blakadder.com/xiaomi_MJGJD02YL.html) and I have a bunch of devices at home running on Espressif (fan, rice cooker, ) which still use original firmware.

    True, ESP32 is superior in many ways and if you're doing DIY its your choice but anyone buying a device and facing a nonEspressif chip didn't have an option like Tasmota before, now they do and the existence of dev boards with those same chips helps introduce newbies to the platform. The reality is, nonEspressif chips are usually cheaper to the manufacturer and ESP8266 is quite outdated by now.