Enable NFC for Linux and pcscd on Dell E7470 (and others) with ControlVault2
Jacek Kowalski
2020-07-24 f834210391b0549770947019c8bf6b5c5034d04c
commit | author | age
f83421 1 import cvcomm
JK 2
3 class ControlVault3:
4     NAME = 'Broadcom ControlVault 3'
5
6     turn_on_seq1 = [
7         "20 00 01 00",
8     ]
9     turn_on_seq2 = [
10         "20 00 01 00",
11         "20 01 00",
12         "20 03 02 01 52",
13         "20 02 1f 0a 21 01 00 28 01 00 30 01 04 31 01 03 54 01 06 5b 01 00 60 01 07 80 01 01 81 01 01 82 01 0e",
14         "21 00 10 05 04 03 02 05 03 03 01 01 01 02 01 01 03 01 01",
15         "21 01 07 00 01 01 03 00 01 05",
16         "20 02 09 01 b9 06 01 00 00 0b 00 00",
17         "20 02 c7 11 18 01 02 2a 01 32 80 01 00 c2 02 03 02 c4 02 00 13 ca 05 00 0f 0d 03 08 cb 01 00 d6 0b 01 01 00 01 12 00 01 00 01 00 01 d8 01 01 de 04 01 00 00 00 e0 07 00 60 93 1c 63 3e 0a e1 02 79 07 e2 2a 48 07 0c 10 00 31 39 39 39 39 39 39 39 39 39 39 41 39 90 90 90 90 3f 90 90 90 88 8a 8c 94 94 28 04 07 00 00 00 00 00 00 00 00 e3 08 17 04 16 0d 10 0c 2b 0b e4 01 37 e5 1e e0 1e 02 12 00 0a 00 10 04 54 54 54 54 2b 52 50 53 4e 20 2d 18 0c 02 07 00 94 70 94 70 20 e6 2d 01 68 00 77 00 8b 00 a7 00 d6 00 22 01 c0 01 9e 58 4c 40 33 26 20 1e 68 00 77 00 8b 00 a7 00 d6 00 22 01 c0 01 5e 58 4c 40 33 2b 26 1e",
18         "2f 1b 06 08 00 00 01 00 00",
19         "20 02 2d 04 29 11 46 66 6d 01 01 11 02 02 03 80 03 02 00 01 04 01 64 2a 01 30 61 11 46 66 6d 01 01 11 02 02 03 80 03 02 00 01 04 01 64 62 01 30",
20         "20 02 0e 04 18 01 01 32 01 40 50 01 02 00 02 2c 01",
21         "21 03 0d 06 00 01 01 01 02 01 06 01 80 01 82 01",
22     ]
23
24     def __init__(self, device):
25         self.device = device
26         self.communicator = cvcomm.ControlVaultCommunicator(device)
27
28     def turn_on(self):
29         self.communicator.ctrl_transfer(0x41, 1, 0, 3)
30         self.communicator.talk(self.turn_on_seq1)
31         self.communicator.ctrl_transfer(0x41, 1, 1, 3)
32         self.communicator.ctrl_transfer(0x41, 0, 0, 3)
33         self.communicator.ctrl_transfer(0x41, 0, 1, 3)
34         self.communicator.ctrl_transfer(0x41, 1, 0, 3)
35         self.communicator.talk(self.turn_on_seq2)
36         self.communicator.ctrl_transfer(0x41, 1, 1, 3)
37
38     def turn_off(self):
39         self.communicator.ctrl_transfer(0x41, 1, 0, 3)
40         self.communicator.ctrl_transfer(0x41, 0, 0, 3)
41
42     def reset(self):
43         self.device.reset()