@@ -10,14 +10,18 @@ install_pcsc() {
10
10
case $distro_choice in
11
11
1)
12
12
echo " Installing pcscd and pcsc-tools using apt..."
13
- sudo apt-get install pcscd pcsc-tools
13
+ sudo apt-get update
14
+ sudo apt-get install -y pcsc-lite pcsc-tools
15
+ sudo systemctl enable pcscd
16
+ sudo systemctl start pcscd
14
17
;;
15
18
2)
16
19
echo " Installing pcscd and pcsc-tools using pacman..."
17
- sudo pacman -Sy pcscd pcsc-tools
20
+ sudo pacman -Syu --noconfirm ccid libnfc acsccid pcsclite pcsc-tools
21
+ sudo systemctl enable --now pcscd
18
22
;;
19
23
3)
20
- read -p " Write install command for pcsc-tools or download similar package: " custom_install_cmd
24
+ read -p " Enter the install command for pcsc-tools or download a similar package: " custom_install_cmd
21
25
eval $custom_install_cmd
22
26
;;
23
27
* )
@@ -27,32 +31,16 @@ install_pcsc() {
27
31
esac
28
32
}
29
33
30
- blacklist_drivers () {
31
- echo " Blacklisting conflicting NFC kernel drivers..."
32
- echo -e " install nfc /bin/false\ninstall pn533 /bin/false" | sudo tee -a /etc/modprobe.d/blacklist.conf
33
- }
34
-
35
- download_install_drivers () {
36
- echo " Downloading ACR122U drivers..."
37
- wget http://www.acs.com.hk/download-driver-unified/11929/ACS-Unified-PKG-Lnx-118-P.zip -O acr122u_driver.zip
34
+ echo " Please ensure that your smart card reader is properly connected."
35
+ echo " Running pcsc_scan to detect the reader:"
38
36
39
- echo " Unzipping downloaded drivers..."
40
- unzip acr122u_driver.zip -d acr122u_driver
37
+ # Check if pcsc_scan is available
38
+ if ! command -v pcsc_scan & > /dev/null; then
39
+ echo " pcsc_scan command not found. Please install pcsc-tools."
40
+ exit 1
41
+ fi
41
42
42
- echo " Installing drivers..."
43
- cd acr122u_driver
44
- # Placeholder for driver installation command
45
- # ./install.sh or other commands as per the driver documentation
46
- }
43
+ pcsc_scan
47
44
48
45
# Run functions
49
46
install_pcsc
50
- blacklist_drivers
51
- download_install_drivers
52
-
53
- echo " Please follow any on-screen instructions to complete the driver installation."
54
-
55
- echo " Once the driver is installed, restart your computer."
56
-
57
- echo " After restarting, run 'pcsc_scan' to verify the installation. You should see 'ACS ACR122U' listed among the devices."
58
-
0 commit comments