Skip to content

Commit 20a5432

Browse files
authored
Add ACR122U helper
Run this if you have problems with scanning.
1 parent 8e74acc commit 20a5432

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

ACR122U_helper.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/bash
2+
3+
echo "Select your Linux distribution:"
4+
echo "1) Debian-based (Ubuntu, Linux Mint, etc.)"
5+
echo "2) Arch-based (Arch Linux, Manjaro, etc.)"
6+
echo "3) Other"
7+
read -p "Enter your choice (1, 2, or 3): " distro_choice
8+
9+
install_pcsc() {
10+
case $distro_choice in
11+
1)
12+
echo "Installing pcscd and pcsc-tools using apt..."
13+
sudo apt-get install pcscd pcsc-tools
14+
;;
15+
2)
16+
echo "Installing pcscd and pcsc-tools using pacman..."
17+
sudo pacman -Sy pcscd pcsc-tools
18+
;;
19+
3)
20+
read -p "Write install command for pcsc-tools or download similar package: " custom_install_cmd
21+
eval $custom_install_cmd
22+
;;
23+
*)
24+
echo "Invalid choice. Exiting."
25+
exit 1
26+
;;
27+
esac
28+
}
29+
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
38+
39+
echo "Unzipping downloaded drivers..."
40+
unzip acr122u_driver.zip -d acr122u_driver
41+
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+
}
47+
48+
# Run functions
49+
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

Comments
 (0)