File tree 15 files changed +387
-0
lines changed
15 files changed +387
-0
lines changed Original file line number Diff line number Diff line change
1
+ 0 - Jumper 3
2
+ 1 - RGB touch red
3
+ 2 - RGB touch green
4
+ 3 - RGB touch blue
5
+ 4 - NTC
6
+ 5 - NTC
7
+ 6 - Jumper 20
8
+ 7 - Touch button
9
+ 8 - RGB LED Bottom blue
10
+ 9 - RGB LED Bottom red
11
+ 10 - RGB LED Bottom green
12
+ 11 - NFC IRQ?
13
+ 12 - enable RC522, goes to DVDD
14
+ 13 - SWD SWDIO
15
+ 14 - SWD SWCL
16
+ 15 - NFC NSS
Original file line number Diff line number Diff line change
1
+ 0 - ADC?!
2
+ 1 - ADC?!
3
+ 2 - 74HC DS
4
+ 3 - NFC SCK
5
+ 4 - NFC MOSI
6
+ 5 - NFC MISO
7
+ 6 - Jumper 2
8
+ 7 -
9
+ 8 - Jumper 15
10
+ 9 - Speaker
11
+ 10 - 74HC XY
12
+ 11 - 74HC XY
13
+ 12 - EHS6 SPI NSS
14
+ 13 - EHS6 SPI SCK
15
+ 14 - EHS6 SPI MISO
16
+ 15 - EHS6 SPI MOSI
Original file line number Diff line number Diff line change
1
+ 0 - ADC - maybe for 24V line
2
+ 1 - ADC
3
+ 2 - air filter present switch
4
+ 3 - unkown digital sensor
5
+ 4 - unkown digital sensor, jumper 9
6
+ 5 - coffee filter present switch
7
+ 6 - Jumper 15
8
+ 7 - EHS6 XY
9
+ 8 - EHS6 XY
10
+ 9 - NRSTP RC522
11
+ 10 - Jumper 20
12
+ 11 - Jumper 17
13
+ 12 -
14
+ 13 - roasting chamber present switch
15
+ 14 - EHS6 “R79”
16
+ 15 - EHS6 “R97”
Original file line number Diff line number Diff line change
1
+ 0 - unkown digital sensor, Jumper 10
2
+ 1 - unkown digital sensor, Jumper 8
3
+ 2 - Turn heater on/off
4
+
Original file line number Diff line number Diff line change
1
+ TIM3 Heater
2
+ TIM6 ist der beeper
Original file line number Diff line number Diff line change
1
+ 0800 000
2
+
3
+
4
+ 0800 |
5
+ 0800 |
6
+ 0800 |
7
+ 0800 |
8
+ 0800 |
9
+ 0800 9904 | EXTI
10
+ 0800 9a20 | misc.c
11
+ 0800 9afa | ADC
12
+ 0800 9f48 | DMA
13
+ 0800 a19c | FLASH
14
+ 0800 a758 | GPIO
15
+ 0800 aaaa | RCC
16
+ 0800 ae74 | SPI
17
+ 0800 b180 | TIM
18
+ 0800 b9e0 | ???
19
+ 0800 c5df | THE END
Original file line number Diff line number Diff line change
1
+ 0801 FF00 roasts since last reset
2
+ 0801 FF01 total roasts
3
+
4
+ 2000 0000 loop flag
5
+ 2000 0001 loop flag, detect touch and check sensors
6
+ 2000 0002 loop flag, check NFC data
7
+ 2000 0003 loop flag, giant state machine
8
+
9
+ 2000 000C könnte error flag sein, wird gesetzt wenn OTP auf 0xFF steht etc.
10
+
11
+ 2000 0059 machine state? is set in EHS6_comm if the state package is send
12
+
13
+ 2000 0040 brews since last reset
14
+ 2000 0044 total brews
15
+
16
+ 2000 0087
17
+ 2000 0088
18
+ 2000 0089
19
+ 2000 008a
20
+
21
+ 2000 00ae lower part temp top
22
+ 2000 00af upper part temp bottom
23
+
24
+ 2000 034c prescaler für timer 1virt
25
+ 2000 05a0-200005ac
26
+
Original file line number Diff line number Diff line change
1
+ {
2
+ "cSpell.words" : [
3
+ " bvmessage"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change
1
+
2
+ import struct
3
+ import binascii
4
+ from bvpackages import *
5
+
6
+ def calcCRC (data ):
7
+ crc8 = 0
8
+ #calculate only the crc8 without the "OTP" register
9
+ new_data = data [0 :12 ] + data [16 :60 ]
10
+ for single_byte in new_data :
11
+ crc8 ^= single_byte
12
+ for i in range (0 ,8 ):
13
+ if (crc8 & 0x80 ) != 0 :
14
+ crc8 = crc8 << 1 ^ 0x7
15
+ else :
16
+ crc8 = crc8 << 1
17
+
18
+ return crc8 & 0xff
19
+
20
+ def get_full_nfc_tag_package (nfc_tag ):
21
+ #add prefix and suffix
22
+ package = bytearray (build_package (SEND_NFC_TAG_PREFIX + bytearray (nfc_tag ).hex ().upper ().encode () + SEND_NFC_TAG_SUFFIX ))
23
+
24
+ #calculate new crc and add it to the array
25
+ new_crc = calcCRC (nfc_tag )
26
+ package [len (SEND_NFC_TAG_PREFIX ) + 61 * 2 ] = (55 if (new_crc >> 4 ) > 9 else 48 ) + (new_crc >> 4 )
27
+ package [len (SEND_NFC_TAG_PREFIX ) + 61 * 2 + 1 ] = (55 if (new_crc >> 4 ) > 9 else 48 ) + (new_crc & 0xf )
28
+ return package
29
+
30
+ def build_package (message ):
31
+ msg = struct .pack (">H" , len (message ))
32
+ msg += message
33
+ return msg
Original file line number Diff line number Diff line change
1
+ SEND_NFC_TAG_PREFIX = b"\x00 \x50 \x20 \x00 \x0A \x00 \x12 \x21 \x01 "
2
+ SEND_NFC_TAG_SUFFIX = b"\x00 "
3
+
4
+ DEBUG_NFC_TAG = b"\x04 \xD5 \xFF \xA6 " \
5
+ b"\x1A \xC9 \x55 \x80 " \
6
+ b"\x06 \x48 \x00 \x00 " \
7
+ b"\x00 \x00 \x00 \x00 " \
8
+ b"\xAA \x96 \x64 \x4B " \
9
+ b"\x05 \xAA \x96 \x41 " \
10
+ b"\x32 \x78 \xAA \xB5 " \
11
+ b"\x5F \x50 \x05 \xAA " \
12
+ b"\xB6 \x41 \x46 \x96 " \
13
+ b"\x37 \x6E \x5A \x2D " \
14
+ b"\x23 \x01 \x0F \x00 " \
15
+ b"\x06 \x01 \xAB \x13 " \
16
+ b"\x00 \x00 \x00 \x00 " \
17
+ b"\x00 \x00 \x00 \x00 " \
18
+ b"\x00 \x00 \x00 \x00 " \
19
+ b"\x7E \x00 \x00 \x00 "
20
+
21
+ GRIND_AND_BREW_NFC_TAG = b"\x04 \xF7 \xA3 \xD8 " \
22
+ b"\xC2 \xA7 \x50 \x80 " \
23
+ b"\xB5 \x48 \x00 \x00 " \
24
+ b"\x00 \x00 \x00 \x00 " \
25
+ b"\xAA \xA0 \x64 \x4B " \
26
+ b"\x05 \xAA \xA0 \x41 " \
27
+ b"\x46 \x55 \xAA \xB2 " \
28
+ b"\x5F \x50 \x05 \xAA " \
29
+ b"\xB2 \x41 \x46 \x87 " \
30
+ b"\x37 \x5A \x5A \x2D " \
31
+ b"\x23 \x05 \x0F \x00 " \
32
+ b"\x06 \x01 \x32 \x0C " \
33
+ b"\x00 \x01 \x00 \x00 " \
34
+ b"\x00 \x00 \x00 \x00 " \
35
+ b"\x00 \x00 \x00 \x00 " \
36
+ b"\xFC \x00 \x00 \x00 "
37
+
38
+ ROAST_ONLY_NFC_TAG = b"\x04 \xE2 \xEB \x85 " \
39
+ b"\xC2 \xA7 \x50 \x80 " \
40
+ b"\xB5 \x48 \x00 \x00 " \
41
+ b"\x00 \x00 \x00 \x00 " \
42
+ b"\xAA \xA0 \x64 \x4B " \
43
+ b"\x05 \xAA \xA0 \x41 " \
44
+ b"\x46 \x58 \xAA \xB2 " \
45
+ b"\x5F \x50 \x05 \xAA " \
46
+ b"\xB2 \x41 \x46 \x8C " \
47
+ b"\x37 \x6E \x5A \x2D " \
48
+ b"\x23 \x02 \x0F \x00 " \
49
+ b"\x06 \x01 \x89 \x12 " \
50
+ b"\x00 \x01 \x00 \x00 " \
51
+ b"\x00 \x00 \x00 \x00 " \
52
+ b"\x00 \x00 \x00 \x00 " \
53
+ b"\x8E \x00 \x00 \x00 "
54
+
55
+ COFFEE_CHANGER_BADGE_NFC_TAG = b"\x04 \xD5 \xFF \xA6 " \
56
+ b"\x1A \xC9 \x55 \x80 " \
57
+ b"\x06 \x48 \x00 \x00 " \
58
+ b"\x00 \x00 \x00 \x00 " \
59
+ b"\xAA \x96 \x64 \x4B " \
60
+ b"\x05 \xAA \x96 \x41 " \
61
+ b"\x32 \x78 \xAA \xA2 " \
62
+ b"\x5F \x50 \x05 \xAA " \
63
+ b"\xB6 \x41 \x46 \x96 " \
64
+ b"\x37 \x6E \x5A \x2D " \
65
+ b"\x23 \x01 \x0F \x00 " \
66
+ b"\x06 \x01 \xAB \x13 " \
67
+ b"\x00 \x00 \x00 \x00 " \
68
+ b"\x00 \x00 \x00 \x00 " \
69
+ b"\x00 \x00 \x00 \x00 " \
70
+ b"\x7E \x00 \x00 \x00 "
71
+
72
+ AIRFILTER_MULTI_USE_NFC_TAG = b"\x04 \x71 \x32 \xCF " \
73
+ b"\x4A \xCF \x59 \x80 " \
74
+ b"\x5C \x48 \x00 \x00 " \
75
+ b"\x00 \x00 \x00 \x00 " \
76
+ b"\xAA \x96 \x64 \x4B " \
77
+ b"\x05 \xAA \x96 \x41 " \
78
+ b"\x32 \x78 \xAA \xAC " \
79
+ b"\x5F \x50 \x05 \xAA " \
80
+ b"\xB8 \x41 \x46 \x96 " \
81
+ b"\x37 \x6E \x5A \x2D " \
82
+ b"\x23 \x0F \x0F \x00 " \
83
+ b"\x06 \x01 \x84 \x6E " \
84
+ b"\x00 \x00 \x00 \x00 " \
85
+ b"\x00 \x00 \x00 \x00 " \
86
+ b"\x00 \x00 \x00 \x00 " \
87
+ b"\x05 \x00 \x00 \x00 "
88
+
89
+ ADVENTURE_14_SLOW_NFC_TAG = b"\x04 \x7F \xFB \x08 " \
90
+ b"\xC2 \xA7 \x50 \x80 " \
91
+ b"\xB5 \x48 \x00 \x00 " \
92
+ b"\x00 \x00 \x00 \x00 " \
93
+ b"\xAA \xB8 \x4B \x4B " \
94
+ b"\x00 \xAA \xB8 \x32 " \
95
+ b"\x46 \x5A \xAA \xB6 " \
96
+ b"\x4B \x5A \x00 \xAA " \
97
+ b"\xB6 \x32 \x46 \x64 " \
98
+ b"\x3C \x46 \x5A \x2D " \
99
+ b"\x32 \x01 \x2D \x00 " \
100
+ b"\x05 \x01 \x2C \x6E " \
101
+ b"\x02 \x58 \x00 \x00 " \
102
+ b"\x00 \x00 \x00 \x00 " \
103
+ b"\x00 \x00 \x00 \x00 " \
104
+ b"\xA1 \x00 \x00 \x00 "
105
+
106
+ ADVENTURE_4_QUICKIE_NFC_TAG = b"\x04 \x46 \x19 \xD3 " \
107
+ b"\xC2 \xA7 \x50 \x85 " \
108
+ b"\xB0 \x48 \x00 \x00 " \
109
+ b"\x00 \x00 \x00 \x00 " \
110
+ b"\xAA \xB4 \x4B \x4B " \
111
+ b"\x00 \xAA \xB4 \x32 " \
112
+ b"\x46 \x4B \xAA \xAE " \
113
+ b"\x4B \x5A \x00 \xAA " \
114
+ b"\xAE \x32 \x46 \x5A " \
115
+ b"\x3C \x6E \x5A \x14 " \
116
+ b"\x14 \x05 \x2D \x00 " \
117
+ b"\x05 \x01 \x94 \x01 " \
118
+ b"\x00 \x00 \x00 \x00 " \
119
+ b"\x00 \x00 \x00 \x00 " \
120
+ b"\x00 \x00 \x00 \x00 " \
121
+ b"\x8B \x00 \x00 \x00 "
You can’t perform that action at this time.
0 commit comments