I just flashed two switches, KS602S, that have the Beken BK7231N chips in them. I purchased two from Amazon about 18 months ago and they had ESP chips. I bought two more earlier this year and discovered that they were not ESP switches any longer.
But before using my process described here just try latest release (tutorial) without doing any fullFW hacks. FullFW.bin is only needed in rare cases.
How to flash FullFW.bin to the chip
Important note- I am not an expert. I could not have figured this out on my own and depended on inputs from @p.kaczmarek2.
1. Flash the device using BK7231Flasher.exe with FullFW.bin (Attached).
FullFW.bin is a full 2MB flash with empty MAC and RF data. This clears the incompatible RF data from Tuya.
2. Copy FullFW.bin to OpenBK7231N_QIO_1.15.999.bin and put the file into the firmwares folder. The BK7231Flasher will not "see" the FullFW.bin file in the "Select firmware" dropdown otherwise.
3. Click on "Do backup and flash now".
4. While the flasher is displaying "Getting bus failed" in yellow, touch the CEL pin to ground for 0.1 to 0.25 seconds to put the device into the flash mode.
5. Reboot (power off-on) the device and wait a minute (at least) for it to go online and in the AP mode.
6. On your phone or tablet, look for a network named: "OBK...." and connect to it.
(When you are warned that Internet is not available, click on "Connect always", or whatever option your device presents).
7. Open a browser and connect to http://192.168.4.1.
8. From the menu that you are presented with, click on "Config"
9. From here, click on "Configure WiFi", then enter your WiFi credentials.
10. When you click on "Submit", the device will reboot and try to connect to your network. (If everything goes well. Otherwise see below)).
11. Do an IP scan to find the IP address of the device. (I use Advanced IP scanner).
12. Enter the device IP address on your browser. (A feature of the Advanced IP scanner is that the dropdown exposes the HTTP link).
Opening the IP address for the device will bring you back to the menu. Again, open "Config".
13. Now go to "Change Mac". The binary I used, FullFW.bin, erases the MAC address and if you ever flash a second device you will have a MAC address conflict unless you change them. Now would be a good time to change the MAC address. (In my case I just changed the last digit from 0 to 1. On the second unit I changed the last zero to 2).
OPTIONAL:
You may want to turn on the Universal/Local bit in the MAC address. (This bit turned on is analogous to the 192.168.x.y family of private IP addresses). If the Universal/Local Bit is turned on, your MAC address can never conflict with a manufacturer's MAC address. (I did not do this in my examples).
The Universal/Local bit in the MAC address is the second-least significant bit of the first byte of the address. All MAC addresses physically assigned to real hardware will have this bit set to 0. Locally assigned addresses are supposed to have this bit set to 1 (though this requirement is often ignored). Thus, any address beginning with x2, x6, xA, or xE will be private.[/quote]
However, if you do this, the IP scanner will not recognize the device manufacturer as Beken because the manufacturers MAC addresses begin with C8:47:8C:...
IMPORTANT !!! The FullFW.bin hack will not work on two devices unless you use change the MAC address. Otherwise you will get two devices with the SAME MAC on your network! And router will act crazy. That way people can lose a lot of time debugging strange issues!
After changing the MAC address, it would be advisable to reboot your router.
I CAN'T FIND THE DEVICE IP
This means that the device couldn't log on to your network.
Try this first:
1. Cycle the power off/on five times. This will put the device into the AP mode again, then go back to step 6.
2. If re-entering the WiFi credentials doesn't work, try flashing the device again. Back to step 1.
(Note: I did both, so I don't know which step fixed the problem of the device not being able to connect to my network).
Once the device reliably connects to your network, go back to the config menu to finish setting up your device.
Here are the Module Configuration for my KS602S switches:
P17 - Relay - channel 1
P24 - LED - channel 1
P26 - Button - channel 1
Now you need to do an upgrade to the latest release
Do not use the config menu item: OTA (update software by WiFi). This won't work with an .rbl file.<br>
1. Go to https://github.com/openshwprojects/OpenBK7231T_App/releases and download the *.rbl file for your device.
In my case the KS602S switches have the BK7231N chip, so I downloaded OpenBK7231N_1.15.394.rbl
2. Open the Web App by entering your device IP plus /app?. For example: http://192.168.1.32/app? (Alternately, there is a link to WebApp on the config menu).
3. Click on the "OTA" tab.
4. Drag the .rbl file you just downloaded to the box labeled: "Drop OTA file here".
5. Click on "Start OTA.
6. When OTA is finished, the device will reboot. Wait a few seconds and open the device IP.
At the bottom of the menu from the device you can see the latest version number.
Your device is now up to date.
Hope this helps.
But before using my process described here just try latest release (tutorial) without doing any fullFW hacks. FullFW.bin is only needed in rare cases.
How to flash FullFW.bin to the chip
Important note- I am not an expert. I could not have figured this out on my own and depended on inputs from @p.kaczmarek2.
1. Flash the device using BK7231Flasher.exe with FullFW.bin (Attached).
FullFW.bin is a full 2MB flash with empty MAC and RF data. This clears the incompatible RF data from Tuya.
2. Copy FullFW.bin to OpenBK7231N_QIO_1.15.999.bin and put the file into the firmwares folder. The BK7231Flasher will not "see" the FullFW.bin file in the "Select firmware" dropdown otherwise.
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/8124316700_1675012422_thumb.jpg)
3. Click on "Do backup and flash now".
4. While the flasher is displaying "Getting bus failed" in yellow, touch the CEL pin to ground for 0.1 to 0.25 seconds to put the device into the flash mode.
5. Reboot (power off-on) the device and wait a minute (at least) for it to go online and in the AP mode.
6. On your phone or tablet, look for a network named: "OBK...." and connect to it.
(When you are warned that Internet is not available, click on "Connect always", or whatever option your device presents).
7. Open a browser and connect to http://192.168.4.1.
8. From the menu that you are presented with, click on "Config"
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/1676507300_1675012552_thumb.jpg)
9. From here, click on "Configure WiFi", then enter your WiFi credentials.
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/8753339600_1675012598_thumb.jpg)
10. When you click on "Submit", the device will reboot and try to connect to your network. (If everything goes well. Otherwise see below)).
11. Do an IP scan to find the IP address of the device. (I use Advanced IP scanner).
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/8998983300_1675012839_thumb.jpg)
12. Enter the device IP address on your browser. (A feature of the Advanced IP scanner is that the dropdown exposes the HTTP link).
Opening the IP address for the device will bring you back to the menu. Again, open "Config".
13. Now go to "Change Mac". The binary I used, FullFW.bin, erases the MAC address and if you ever flash a second device you will have a MAC address conflict unless you change them. Now would be a good time to change the MAC address. (In my case I just changed the last digit from 0 to 1. On the second unit I changed the last zero to 2).
OPTIONAL:
You may want to turn on the Universal/Local bit in the MAC address. (This bit turned on is analogous to the 192.168.x.y family of private IP addresses). If the Universal/Local Bit is turned on, your MAC address can never conflict with a manufacturer's MAC address. (I did not do this in my examples).
The Universal/Local bit in the MAC address is the second-least significant bit of the first byte of the address. All MAC addresses physically assigned to real hardware will have this bit set to 0. Locally assigned addresses are supposed to have this bit set to 1 (though this requirement is often ignored). Thus, any address beginning with x2, x6, xA, or xE will be private.[/quote]
However, if you do this, the IP scanner will not recognize the device manufacturer as Beken because the manufacturers MAC addresses begin with C8:47:8C:...
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/5787774500_1675014074_thumb.jpg)
IMPORTANT !!! The FullFW.bin hack will not work on two devices unless you use change the MAC address. Otherwise you will get two devices with the SAME MAC on your network! And router will act crazy. That way people can lose a lot of time debugging strange issues!
After changing the MAC address, it would be advisable to reboot your router.
I CAN'T FIND THE DEVICE IP
This means that the device couldn't log on to your network.
Try this first:
1. Cycle the power off/on five times. This will put the device into the AP mode again, then go back to step 6.
2. If re-entering the WiFi credentials doesn't work, try flashing the device again. Back to step 1.
(Note: I did both, so I don't know which step fixed the problem of the device not being able to connect to my network).
Once the device reliably connects to your network, go back to the config menu to finish setting up your device.
Here are the Module Configuration for my KS602S switches:
P17 - Relay - channel 1
P24 - LED - channel 1
P26 - Button - channel 1
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/2242227100_1675014313_thumb.jpg)
Now you need to do an upgrade to the latest release
Do not use the config menu item: OTA (update software by WiFi). This won't work with an .rbl file.<br>
1. Go to https://github.com/openshwprojects/OpenBK7231T_App/releases and download the *.rbl file for your device.
In my case the KS602S switches have the BK7231N chip, so I downloaded OpenBK7231N_1.15.394.rbl
2. Open the Web App by entering your device IP plus /app?. For example: http://192.168.1.32/app? (Alternately, there is a link to WebApp on the config menu).
3. Click on the "OTA" tab.
4. Drag the .rbl file you just downloaded to the box labeled: "Drop OTA file here".
5. Click on "Start OTA.
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/3774728600_1675014502_thumb.jpg)
6. When OTA is finished, the device will reboot. Wait a few seconds and open the device IP.
At the bottom of the menu from the device you can see the latest version number.
![[Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip) [Tutorial] Fix for OpenBeken not connecting to WiFi (KS-602S switch, BK7231N chip)](https://obrazki.elektroda.pl/3085856300_1675014581_thumb.jpg)
Your device is now up to date.
Hope this helps.