Hello i flashed OpenBL602_1.12.8.bin on a Sonoff MiniR3 as described above.
Flash was successful but the device does not boot after opening the boot-3,3V connection and power cycling.
When i try to log in DevCube i get an error. Do i need a different Partition Table or Params?
The Chip is a BL602L20.
Some Pics and flash logs are in the attachment.
Cheers Winux
Sorry totally my bad I had the same problem as bartek666666. I kinda missed that page of the thread.
The problem was i downloaded the devcube programmer from the buffalos website. It's a different version.
The one in your repo worked first try. I thought about deleting the post above, but i will leave it there for the pictures. Maybe it helps someone.
Added after 3 [hours] 30 [minutes]:
Here are some more infos for the Sonoff MiniR3
Pins:
Wifi LED: 1
Button: 5
Relais: 22
I would have sent a pull request but i don't have my credentintials with me at the moment.
So for the sake of completeness feel free to add the following to the code:
/src/new_builtin_devices.c
Thanks, I will look into it when I have more time, same goes for LED driver update.
I have BL602 bulb at hand, the one with I2C LED controller (SM2135), I will also try to get it running. Or it should already run, as the SM2135 driver is only using digital pins IO and OBK has it already working and tested for BK7231
First off, thanks so much for your work on this project! I accidentally bought a pack of Sonoff S40 smart plugs with power monitoring and figured I'd try to cut my losses and see if I could harvest the switch boards from these. Took *way* too long to get the correct wiring layout (the board has two sets of rx/tx pads for some reason) but I was eventually able to flash the latest firmware. Unfortunately it appears to be in a bootloop now, and never gets to a point where it's broadcasting a WiFi AP.
The error(s) it appears to throw in the console are:
[0m: bl_romfs.c: 146] romfs magic is NOT correct
I've attached some logs and a screenshot of the Dev Cube app. Happy to provide some pictures of the board itself as well, this seems to be a fairly new one.
That's a strange error, I have never seen it before.
At first, can you try downloading compiled GPIO demo from their SDK, here:
https://www.elektroda.com/rtvforum/viewtopic.php?p=20117857#20117857 and checking if at least it works on your device? It has an UART console to control pins. Try commands from the first post from this topic, gpio-func, gpio-set, etc...
Also, good job with finding the wiring. Can you please photos of boards and the wiring to help other users with flashing Sonoff S40?
I sent a pull request on github for the Sonoff MiniR3 from above.
I compiled the code and realised i'm not able to update via wifi ^^, so i had to get the device out of the garden and solder again to update the firmware. An update solution for the BL602 devices would be real nice.
Things that could be improved:
- Possibility to update the BL602 Devices via wifi.
- Quick configs should also store device name as well as device short name. Device short name could be also used for the Hostname.
- Timers
As seen in Tasmota:
https://github.com/arendst/Tasmota/blob/development/tasmota/tasmota_xdrv_driver/xdrv_09_timers.ino It's neat to have them running on the device, especially for pumps or automated lights.
Another neat idea would be an override for the timer via mqtt if available.
Let's say the device turns a pump on every day to water plants or grass via local timer on the device. The smarthome software detects rain for a given day and sets an mqtt topic to 0. The Timer checks that topic as soon as a trigger happens and ignores watering for that day.
That's all i'm missing so far. The Update solution would be top prio.
Have a great day.
I got a CozyLife bulb with a DT-BL200 slightly different from the one p.kaczmarek2 posted. Mine doesn't have anything written on the RF shield and the code on the back is `2120`.
Removing the shield reveals a BL602L20 chip. According to the datasheet L is for "light" chips compared to the usual C/E which tracks.
I wasn't able to flash it using the DevCube flashing tool in the Open602 repo. It errors out after trying to read flash vendor ID.
Flash was complete using the latest official BLDevCube 1.7.5. but OpenBeken firmware does not boot.
I've flashed an RGBW LED-strip controller with the latest OpenBL602 1.12.39.bin and the first boot did work ok. I could connect to the Wifi AP OpenBL602_Xxxxx, got IP address 192.168.169.2 and could connect to the Config Page. After I setup the SSID, password, MQTT, etc. the device reboots but seems to be in an endless reboot loop now.
I did try sdk_app_gpio.bin which works fine, and I did flash the bl602_demo_wifi and right after the start of the WIFI the device reboots.
Did I overwrite some factory default; e.g. calibration settings?
I habe a Switch-wf which contains a bl602.
Have Someone flashed this device and can give me help how to Do it? What do i need for firmware and other files.
I habe a Switch-wf which contains a bl602.
Have Someone flashed this device and can give me help how to Do it? What do i need for firmware and other files.
Best regards
Maniac 2002
It helps to post images of the device and its label/model number or at least a link to where you purchased it.
This is a very important information @blakadder , thank you for providing that. It seems that they really have broken compatibility with older flashes, this is not good. It looks like I will really have to get the new BL602 SDK and keep both SDKs alive just to support the newly-created two families of BL602 chips (old and new ones). It could be also possible to alter existing SDK to generate two flash formats, but I am not sure is it viable when it comes to time cost.
Maybe at least this new SDK has a better OTA (from what I've seen, yes, it was added later in time)
@Maniac2002 we will help you step by step but you need to provide some more information, photos, etc
@mgerald21 even the WiFi SDK demo crashes for you?
Well, the WiFi demo did start but crashed right after doing something with WiFi.
But in the end it was my fault because the chip was powered by the USB adapter's 3v3 and obviously that wasn't enough and the system crashed. After providing a 12V power supply all was Ok.
But in the end it was my fault because the chip was powered by the USB adapter's 3v3 and obviously that wasn't enough .
did you use this USB to UART dongle?
as far as I know, the 3.3V and 5V pins are just used to select VDD levels by puting a jumper between them.
Still, the WiFi crash due to low power is also known to me. I even had device with a faulty electrolytic capacitor which started randomly resetting because capacitor gone bad and power supply was not providing enough stable voltage/current.
See (not yet translated):
https://www.elektroda.pl/rtvforum/topic3898805.html
It's a classic trap for young players, this is why I have soldered extra wire directly to 5V pin on that USB to UART dongles, and use it along with TC1264 3.3V LDO or the on-board LDO of smart device pcb if possible
Some adapters sometimes do not even have enough power for flashing, depending on the chip/ module you're flashing. In Tasmota community we always recommend the "golden CH340G" which always works.
If you're looking for a bit more serious tool get an ESP8266 burner board (https://s.click.aliexpress.com/e/_DeodsyT *affiliate link)
Hi again,
well, an OTA for BL602 would be great. Also for the "old" flash chip/sdk.
But beyond that, can I request again the following (then OTA wouldn't be so urgent anymore):
MQTT reporting:
reporting a calculated dimmer value after setting a new RGB value and therefore overwriting a dimmer value with RGB settings;
beyond that, reporting final color together with dimmer, whenever a value (RGB/dimmer/Hue/Sat) is changed.
Hello,
so here comes the information.
It is a Switch-WF.
It has a Bl602L20.
Please can you give me a step by step manual
I have a USB to UART Dongle and i have already soldered teh cables to the PCB (RX,TX, GND and 3.3V)
Ma Questionss are:
Which flashing Tool do i nedd?
Which firmwarefiles do i need.
What do i need to do to flasch the "tasmota replacement firmware" to the device?
Hi again,
well, an OTA for BL602 would be great. Also for the "old" flash chip/sdk.
But beyond that, can I request again the following (then OTA wouldn't be so urgent anymore):
MQTT reporting:
reporting a calculated dimmer value after setting a new RGB value and therefore overwriting a dimmer value with RGB settings;
beyond that, reporting final color together with dimmer, whenever a value (RGB/dimmer/Hue/Sat) is changed.
Thanks,
best.
Hey again,
some testing, with the new firmware:
when using flag 3: report MQTT final color, the devices crashes after 2-3 minutes changing colors every 20-30 seconds. This is not stable.
whan turning off MQTT reporting the device stays stable. But that's not desired.
Can you fix it?
Best.
Thank you for reporting. It seems you are still experiencing the same issue related to MQTT crashing when doing a lot of publish calls. I tried to mitigate it but it happens if you have lots of flags enabled.
I just flashed succsessfully a BL602 as you described.
A Accsess Point is shown "OpenBL602_94F30D07" and i can connect to it.
I just cannot connect to 192.168.4.1
What i'm doing wrong
Thanks Roli
If you have successfully connected your pc to the BL602's hotspot, run ipconfig on your laptop to see what the IP is you got on your Wireless LAN adapter Wi-Fi. In my case the default gateway was something like 192.168.1xx.1 then take that address.
So that's a BL602 device? Well, you need 3 signals - BOOT (visible on photo), RX1 and TX1 (visible on photo).
Also you need to power it, and NEVER power it from mains while programming - this might even destroy your PC. Maybe you can power it from 5V, 5V and GND pads are also visible on photo.
Then you don't need an external 3.3V LDO regulator. You can use that AMS1117. So, you need to solder 5V, GND, TX, RX and boot. Please also read the instructions in the first post.