>>21719588
I've had some BG sockets connected to Home Assistant for a couple of years and have always wanted to replace the firmware with something that doesn't continually try to connect to the internet. I've got the sockets blocked by a router firewall rule. They still work but blocking them causes them to drop and reconnect to the wifi regularly.
I've just found this forum and the very helpful information on it. I've flashed lots of ESP devices but have never flashed Broadcom or Tuya type devices so I'm very new to this. After reading this thread and a bit of experimenting I've managed to do a rom dump of the BL3335-P with its factory settings and a rom dump with my wifi settings in it.
Hopefully the information below will be of help. Some of it may be obvious to you but as a beginner it wasn't to me. :-
With the module pcb plugged into the BG socket pcb I powered it from an external 3.3v supply.
Red leds flashed at boot up. I assume until wifi connected.
Blue leds go on and off with the power buttons.
NOTE
The relays will not turn on as they use a higher voltage power supply that isn't available unless the mains is connected. WHICH IT MUST NOT BE WHILE CONNECTED TO THE USB TO SERIAL ADAPTOR.
Ran RDA Dump Tool v01.00.03 in Windows 10
With the default settings :-
Baudrate 921600
Dump Address 0x 18000000
Length of Word 0x3fc00
Set to 1MByte
----------------
EDIT
After reading
https://www.elektroda.com/rtvforum/topic4148573.html I've realised that the 1M Dump setting doesn't give the full 1M rom dump!
To get the full dump set Length of Word to 0x7fc00 and Flash Size to 2M, so dump is just short of 2mb. The file can be trimmed down in HxD later.
Alternatively, select 2mb flash size and word length of 0x3ffff.
----------------
With a USB to Serial adaptor connected to RX and TX and earth. So the 3.3v supply earth and flasher board earth are connected together.
With the Dump Tool running and connected to the USB to Serial adaptor port, hit Start. Then turn on the 3.3v power to the BG socket. It will connect and create a dump file. You may need to power the BG board on and off a few times before the Dump Tool will connect to it.
Tried with 1M, 2M and 4M settings and all dump files were 1M in size and the Dumped 100% value was 0x180fc000 in all cases.
Checking the MD5 of the files and they were all identical.
When the Dump Tool has connected to the module the red leds do not come on at power up and the buttons will not turn the blue leds on or off. If the leds flash then the Dump Tool hasn't connected and you need to turn the 3.3v power off and on again for it to connect.
I then reset the socket by holding the left button until red leds flashed fast.
Then ran the Dump Tool to get a factory rom dump. Had to power the module off and on a few times before the Dump Tool connected and started to do a backup.
________________
EDIT
Post
https://www.elektroda.com/rtvforum/topic4148573.html also explains that to get a readable log using Putty you need to pull GPIO21 high at boot up which means removing the metal shield to get to it.
-------------------
Before using the Dump Tool I used PuTTY to listen to the com port. It showed characters but was gibberish. Tried 9600, 115200, 921600 with 8,N,1 and 7,N,1 etc. None gave a readable output. 921600 was the worst and seemed to be the same 3 characters in random order.
But 7,N,1 gave a more readable output.
Tried N, E, O, Mark, Space with None and Xon/Xoff etc. None gave a non gibberish output.
If the module pcb is unplugged and powered up, the red leds flash until connected to wifi, the blue leds stay lit all the time and don't go on and off with the buttons.
If you need a copy of the factory rom dump let me know.
Next is to use OpenRDA5981 and try to get the sockets fully working with it. Hopefully gandi69 will have figured it all out before I try it which will save me some time!