-
Notifications
You must be signed in to change notification settings - Fork 2
/
Protocol
196 lines (177 loc) · 4.77 KB
/
Protocol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
This the UDP protocol of Besen WB with APP
**************************************************************************************************
Packet checksum
**************************************************************************************************
Each UDP packets have a checksum at the end, stored before the 2 last constant bytes.
The algorithm is quite simple (and scary!):
You just need to add each byte of the packet, byte per byte, from the first 0601… to the last byte before the checksum.
Each round you need to do a modulus 0X10000 to be sure the sum didn’t go behind 16 bits. And that’s it!
See the C code example in the folder Checksum.
Checksum is stored in Big Endian.
**************************************************************************************************
client_ID
**************************************************************************************************
The 8 digits client_ID is random, one per application.
BUT! The first byte is always 86, and the last observed to be 43 (most) or 44 (rare).
(badly designed random generator?)
**************************************************************************************************
Command: Stop Charging
**************************************************************************************************
Sniffed packets:
WB Phil
06 01 00 48 00 91 81 10 27 51 21 95 13 31 32 33 34 35 36 80 08 01 38 36 30 30 37 39 37 39 38 35 37 38 39 32 34 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 cc 0f 02
WB Florent
06 01 00 48 00 49 57 91 72 43 50 64 89 31 32 33 34 35 36 80 08 01 38 36 30 37 37 31 34 30 38 36 37 38 36 32 34 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 7D 0F 02
Byte per byte :
06 : * len 2:
01 : * Constant 0601, BESEN custom protocol
00 : * len 2:
48 : * packet length, from the begining (including 06 01 ...)
00 : * reserved 00 ?
91 : * len 8:
81 : *
10 : *
27 : *
51 : *
21 : *
95 : *
13 : * device serial number (as accessible in APP, About charger, Device Number OR on WB screen)
31 : * len 6:
32 : *
33 : *
34 : *
35 : *
36 : * password, ASCII (here 123456)
80 : * len 2:
08 : * BESEN custom protocol 8008: STOP charge
01 : * ?
38 : * len 16:
36 : *
30 : *
30 : *
37 : *
39 : *
37 : *
39 : *
38 : *
35 : *
37 : * last 6 : "My records, last column "user" in the APP (here 786243)
38 : *
39 : *
32 : *
34 : *
33 : * client_ID (one different ID on each smartphone) format 8600797985789243, only last 6 bytes displayed on app (in ASCII)
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
07 : * len 2
cc : * custom checksum
0f : * len 2
02 : * Constant 0F02, BESEN custom protocol
**************************************************************************************************
Command: Start Charging
**************************************************************************************************
WB Phil
06 01 00 48 00 91 81 10 27 51 21 95 13 31 32 33 34 35 36 80 07 01 38 36 30 30 37 39 37 39 38 35 37 38 39 32 34 33 31 36 34 39 34 35 35 34 32 31 32 38 38 30 39 36 00 62 50 5c dd 01 01 ff ff ff ff ff ff 10 13 0c 0f 02
WB Florent
06 01 00 48 00 49 57 91 72 43 50 64 89 31 32 33 34 35 36 80 07 01 38 36 30 37 37 31 34 30 38 36 37 38 36 32 34 33 31 36 34 39 34 35 32 31 35 38 32 34 30 30 35 33 00 62 50 50 1E 01 01 ff ff ff ff ff ff 10 12 e3 of 02
WB Phil, byte per byte:
06 : * len 2
01 : * Constant 0601, BESEN custom protocol
00 : * len 2
48 : * packet length, from the begining (including 06 01 ...)
00 : * Always 00
91 : * len 8
81 : *
10 : *
27 : *
51 : *
21 : *
95 : *
13 : * device serial number (as accessible in APP, About charger, Device Number OR on WB screen)
31 : * len 6
32 : *
33 : *
34 : *
35 : *
36 : * password (here 123456)
80 : * len 2
07 : * BESEN custom protocol 8007: START charge
01 : * ?
38 : * len 16
36 : *
30 : *
30 : *
37 : *
39 : *
37 : * last 6 : "My records, last column "user" in the APP (here 786243)
39 : *
38 : *
35 : *
37 : *
38 : *
39 : *
32 : *
34 : *
33 : * client_ID (one different ID on each smartphone) format 8600797985789243, only last 6 bytes displayed on app.
31 : * len 10
36 : *
34 : *
39 : *
34 : *
35 : *
35 : *
34 : *
32 : *
31 : * timestamp EPOQ format (in ASCII)
32 : * len 6: ?
38 : *
38 : *
30 : *
39 : *
36 : * 6 digits decimal number, looks random (in ASCII)
00 : * len 5: ?
62 : *
50 : *
5c : *
dd : * another timestamp (last 2 bytes give the seconds beetween 2 charges)
01 : * ?
01 : * ?
ff : * ?
ff : * ?
ff : * ?
ff : * ?
ff : * ?
ff : * ?
10 : * Max Current of the charge, here 0x10 = 16A
13 : * len2
0c : * custom checksum
0f : * len 2
02 : * Constant 0F02, BESEN custom protocol