I have a garden and would like to water it automatically with rain. For this I bought a «Gardena Battery Rain Water Tank Pump 2000/2» and would like to control via an ESP8266.
After opening the control panel, I found that the board is molded in black plastic, but there is an interface with 6 ports.
I checked this interface with a logic analyzer and identified the following ports:
- 1 > TX,
- 2 > GND
- 3 > RX
As soon as the device is switched on, RX and TX switch to high and data is sent via TX. When switched off, they remain high and go low after 10 seconds.
The baudrate is 9600 8N1 and I think the interface type is UART.
I receive the following data formatted as HEX:
FE323B553A30302E30303B493A30302E30303B54413A3030302E303B4572723A30303B534D4F3A3032333B4254523A3030306B303B53564E3A30332E31303B54533A3030302E303B42543A305F303B41493A3030303030323130303B18FD FE323B553A32302E34313B493A30302E30303B54413A3032352E343B4572723A30303B534D4F3A3032333B4254523A3034376B353B53564E3A30332E31303B54533A3032352E373B42543A335F313B41493A3030303030323130313B19FD FE323B553A32302E34303B493A30302E30303B54413A3032352E343B4572723A30303B534D4F3A3032333B4254523A3034376B353B53564E3A30332E31303B54533A3032352E383B42543A335F313B41493A3030303034313130323B13FD FE323B553A32302E34303B493A30302E30303B54413A3032352E343B4572723A30303B534D4F3A3032333B4254523A3034376B353B53564E3A30332E31303B54533A3032352E383B42543A335F313B41493A3030303034313130333B12FD
HEX converted to ASCII:
I think 0xFE is the start and 0xFD is the end byte.
To create the checksum, start reading after the first byte, end before the checksum byte and calculate the checksum using the CheckSum8 Xor algorithm.
As soon as I send data, I get "0xFF" as output followed by a start and end byte with the data listed above. I assume that 0xFF is an error code.
I have looked at the sent data with the logic analyzer and the scheme of the sent corresponds to the received.
Do you have any idea what kind of protocol this is?
I tried to send various data to the RX interface, here is my result:
0x00 > return 0xFF followed by the data 0x01 > return 0xFF followed by the data 0x02 > return 0xFF followed by the data 0xE0 > return the data without 0xFF 0xE1 > return the data without 0xFF 0xE2 > no return, but if the value was sent twice, data will be sent 0xE3 to 0xFF > no return 0xFE, 0x32, 0xFD > no return 0xFE, 0x32, 0x3B, 0xFD > no return 0xFE, 0x32, 0x3B, 0x49, 0xFD > no return 0xFE, 0x32, 0x3B, 0x00, 0xFD > return 0xFF followed by the data 0xFE, 0x32, 0x3B, 0x00, 0x3A, 0xFD > return the data without 0xFF 0xFE, 0x32, 0x3B, 0x00, 0x3A, 0x30, 0xFD > return 0xFF followed by the data
I was now able to detach the plastic from the board. On the board it has an imprint with the pinout.
The interface reminds me of ICSP, but the labeling is not identical. Unfortunately, I don't see any RX. Could DAT possibly be RX?
I can't completely decipher the labeling of the microcontroller. The following I could read:
- (CC or DD) 2?27(8 or 9)1 > Example "CC 2?2781"
I spent the last two days trying to identify the microcontroller.
I found NU-Link, a SWD debugger that uses the DAT, CLK and GND pins. When I searched the website of the manufacturer, I found the Nuvoton NuMicro ML51TC0AE.
I have ordered a NU-Link from Taiwan and will try to communicate with it via SWD.
I have created a new post: Gardena battery rain water tank pump 2000/2 – SWD Interface