This plug was already mentioned here
and here is the very useful page about the LN882H.
The inside is exactly the same PCB as mentioned here with another socket case and a different relay.
So, why another post? I think I might give some useful information here, so I hope it's o.k.
(If there should not be a new post, for the same device, please move it into one of the other posts)
First about opening the device:
The upper and lower part are lightly glued together and the pressure on the sides should break it open.
I opened the case with help of a vice, so you can apply pressure on the whole sides.
Just use some thick paper or cardboard to avoid marks on the case.
Turn the plug to put pressure on both sides. You will hear a light crack when glue is broken; you might also support the pressure by some light bending of the socket.
(If you hear a loud crack, you probably applied to much pressure
but I already opened five devices and never broke one...)
Just keep pressing and turning the sides until the device pops open.
The inside is a BSD342-2110 PCB with "WL2S" labeled LN882H module and BL0937 energy metering chip. The relay shows 16A and 20A, so it's your choice, what to believe
:
The bootlog for the shipped firmware is visible on Tx1 (UART1 is on the back side of the WL2S module), but flashing is done via Rx0/Tx0 (soldered to main PCB).
Now to some new findings (I hope): As I am a lazy guy, let me tell you, that in fact you only need to solder three wires
VCC (3.3 V)
RX
TX
You can use the plugs power pin opposite to the LN882H module as GND - no need to solder here!
.
If there was any doubt, now you know for sure that you should never try to use the free GPIOs outside the plugs case: For at least GND will be connected to the high voltage live wires!
Regarding flashing you need to short pin A9 to GND - but this was not necessary for the whole flashing process:
I shortened A9 for some seconds after powering the device up - you will see if you missed the point, if the device starts flashing its LED.
It works o.k. with the shown wires from a breadboard, for other plugs I used a testing pin from a multi-meter, this won't bend so easy.
It didn't work every time, I had to give it some tries, but was successful with all plugs in the end.
Remember, since we used the power pin for GND, we have it present on the upper outlet socket, as you can see on the picture.
For you might need to retry several times: If your PCs keyboard is not reachable from the plug while shortening the pin, I had a small batch file running to retry every five seconds.
Just to show off, I pimped my simple batch a bit
Then flashing with the speed of 115200 (I didn't manage to use 200000, that might be, because of too long wires, the PCB not desoldered but still in the plugs PCB, or some other reason).
Thanks again to all the brave people working on the Openbeken port for this chip!
Here is my template for the device:
Please also see the posts by @divadiow Link and by @sithyoda Link.
The flashing tool is present e.g. in the LN882H flashing guide by @p.kaczmarek2
or can be downloaded here:
https://gitee.com/lightningsemi/ln882h-docume...%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7_V1.0.16.zip (use "save as" on the shown download link, for at least for me it would otherwise only show the raw binary - missing mime type I suspect)
Have fun!
and here is the very useful page about the LN882H.
The inside is exactly the same PCB as mentioned here with another socket case and a different relay.


So, why another post? I think I might give some useful information here, so I hope it's o.k.
(If there should not be a new post, for the same device, please move it into one of the other posts)
First about opening the device:
The upper and lower part are lightly glued together and the pressure on the sides should break it open.
I opened the case with help of a vice, so you can apply pressure on the whole sides.
Just use some thick paper or cardboard to avoid marks on the case.


Turn the plug to put pressure on both sides. You will hear a light crack when glue is broken; you might also support the pressure by some light bending of the socket.
(If you hear a loud crack, you probably applied to much pressure

Just keep pressing and turning the sides until the device pops open.
The inside is a BSD342-2110 PCB with "WL2S" labeled LN882H module and BL0937 energy metering chip. The relay shows 16A and 20A, so it's your choice, what to believe





The bootlog for the shipped firmware is visible on Tx1 (UART1 is on the back side of the WL2S module), but flashing is done via Rx0/Tx0 (soldered to main PCB).
Now to some new findings (I hope): As I am a lazy guy, let me tell you, that in fact you only need to solder three wires

VCC (3.3 V)
RX
TX
You can use the plugs power pin opposite to the LN882H module as GND - no need to solder here!


If there was any doubt, now you know for sure that you should never try to use the free GPIOs outside the plugs case: For at least GND will be connected to the high voltage live wires!
Regarding flashing you need to short pin A9 to GND - but this was not necessary for the whole flashing process:
I shortened A9 for some seconds after powering the device up - you will see if you missed the point, if the device starts flashing its LED.

It works o.k. with the shown wires from a breadboard, for other plugs I used a testing pin from a multi-meter, this won't bend so easy.
It didn't work every time, I had to give it some tries, but was successful with all plugs in the end.
Remember, since we used the power pin for GND, we have it present on the upper outlet socket, as you can see on the picture.
For you might need to retry several times: If your PCs keyboard is not reachable from the plug while shortening the pin, I had a small batch file running to retry every five seconds.
Just to show off, I pimped my simple batch a bit

@echo off
echo List of serial ports (with some text about status):
echo.
echo and all .bin files
dir *.bin | findstr .bin
echo.
echo.
mode | findstr COM
echo.
echo.
:pset
set p=-10
set /p p="Enter COM-Port number: "
if +%p% NEQ %p% (
@echo please only provide numbers
goto pset
)
(mode | findstr COM%p%: >Nul || (
@echo COM%p% not found
goto pset
))
:fset
set /p f="Enter filename: "
if NOT exist %f% (
@echo Can't find file %f%. Please chek and try again.
goto fset
)
:loop
LN882H_CMD_Tool.exe COM%p% download flash 115200 0x0 %f%
timeout /t 5
goto loop
Then flashing with the speed of 115200 (I didn't manage to use 200000, that might be, because of too long wires, the PCB not desoldered but still in the plugs PCB, or some other reason).
Thanks again to all the brave people working on the Openbeken port for this chip!
Here is my template for the device:
Quote:{
"vendor": "Elvico",
"bDetailed": "0",
"name": "Elvico LSPA9",
"model": "LSPA9",
"chip": "LN882H",
"board": "BSD342-2110",
"flags": "1024",
"keywords": [
"BSD342-2110",
"LN882H",
"BL0937"
],
"pins": {
"0": "LED_n;0",
"3": "Btn;0",
"7": "BL0937CF1;0",
"10": "WifiLED_n;1",
"11": "Rel;0",
"12": "BL0937CF;0",
"19": "BL0937SEL;0"
},
"command": "",
"image": "https://obrazki.elektroda.pl/5522980200_1708165078.jpg",
"wiki": "https://www.elektroda.com/rtvforum/topic4036567.html"
}
Please also see the posts by @divadiow Link and by @sithyoda Link.
The flashing tool is present e.g. in the LN882H flashing guide by @p.kaczmarek2
or can be downloaded here:
https://gitee.com/lightningsemi/ln882h-docume...%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7_V1.0.16.zip (use "save as" on the shown download link, for at least for me it would otherwise only show the raw binary - missing mime type I suspect)
Have fun!
Cool? Ranking DIY