Compare commits

..

3 Commits

Author SHA1 Message Date
721e3a778b Add new keys 2025-06-06 12:48:05 +00:00
9bccb437c3 Update README.md 2025-06-06 10:04:01 +00:00
572d27084a Update README.md 2025-06-06 10:03:46 +00:00
10 changed files with 80 additions and 77 deletions

View File

@ -4,17 +4,50 @@ Il peut etre transporté ou etre utilisé dans un magasin pour vendre un service
## Le matériel nécessaire : ## Le matériel nécessaire :
- Un raspberry pi - Un raspberry pi
- Un écran lcd tactile ([Lien Amazon](https://amzn.to/3WTLLis)) - Un écran lcd tactile
- Un lecteur nfc acr122u ([Lien Amazon](https://amzn.to/45w3fVP)) - Un lecteur nfc acr122u ([Lien Amazon](https://amzn.to/45w3fVP))
- Un clavier numérique ([Lien Amazon](https://amzn.to/3qj24c9)) - Un clavier numérique
Le script peut aussi se lancer sur un ordinateur linux ayant accès à un lecteur nfc acr122u Le script peut aussi se lancer sur un ordinateur linux ayant accès à un lecteur nfc acr122u
## Dépendances du script :
- [Python 3.x](https://www.python.org/downloads/) : Qui permet de lancer le script.
- [Librarie Python Flask](https://pypi.org/project/Flask/) : Qui permet de mettre en place un serveur web et donc l'interface graphique dans ce projet.
- [Libnfc](http://nfc-tools.org/index.php/Libnfc)
- [MFOC](https://github.com/nfc-tools/mfoc)
## Installation : ## Installation :
Lancement du script d'installation : Après avoir installé Python3.x, vous devez installer la librairie Flask.
```sh ```sh
chmod +x install.sh python3 -m pip install flask
./install.sh ```
Vous pouvez ensuite télécharger le projet.
Pour que le script fonctionne correctement vous devez désactiver 2 modules (il est aussi possible d'enlever ces modules de facon permanente, un exemple [ici]( https://wiki.archlinux.org/index.php/Touchatag_RFID_Reader)).
```sh
sudo modprobe -r pn533_usb pn533
```
Mfoc et LibNFC peuvent etre installer avec ces commandes :
```sh
sudo apt install libnfc*
sudo apt install mfoc
```
Pour lancer le projet au lancement du raspberry :
```sh
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
```
et vous devez ajouter ces commandes (vous pouvez ensuite fermer le fichier) :
```
@sh /home/pi/launcher.sh &
@chromium-browser --incognito --kiosk http://localhost:5000
```
Pour finir il faut créer le fichier launcher.sh
```sh
nano ~/launcher.sh
```
et y ajouter ce texte :
```
cd /home/pi/BadgeCloner
python3 server.py
``` ```
## Configuration : ## Configuration :
Vous pouvez changer le nom du répertoire des dumps avec la variable Vous pouvez changer le nom du répertoire des dumps avec la variable
@ -38,4 +71,4 @@ L'url pour accéder à l'interface depuis le navigateur est :
``` ```
localhost:PORT localhost:PORT
``` ```
PORT étant le numéro de port renseigné dans le script. PORT étant le numéro de port renseigné dans le script.

View File

@ -1,71 +0,0 @@
#!/bin/sh
set -e
install_packages() {
command -v git >/dev/null 2>&1 || { echo >&2 "Git n'est pas installé. Installation..."; sudo apt-get install git; }
sudo apt-get update
sudo apt-get install libusb-dev autoconf libpcsclite-dev -y
}
clone_repos() {
local repos=(
"https://gitea.jarodcajna.fr/jarjar/BadgeCloner.git"
"https://gitea.jarodcajna.fr/jarjar/libnfc.git"
"https://gitea.jarodcajna.fr/jarjar/mfoc.git"
"https://gitea.jarodcajna.fr/jarjar/LCD-show.git"
)
for repo in "${repos[@]}"
do
git clone $repo
done
}
compile_libnfc() {
cd ~/libnfc
autoreconf -is --force
./configure
make distclean
sudo make install
cd ~
}
compile_mfoc() {
cd ~/mfoc
autoreconf -is
./configure
make && sudo make install
cd ~
}
update_autostart() {
sudo sed -i '1,3s/^/@#/' /etc/xdg/lxsession/LXDE-pi/autostart
echo "@sh /home/$USER/launcher.sh &" | sudo tee -a /etc/xdg/lxsession/LXDE-pi/autostart
echo "@chromium-browser --incognito --kiosk http://localhost:5000" | sudo tee -a /etc/xdg/lxsession/LXDE-pi/autostart
}
create_launcher() {
echo "cd /home/$USER/BadgeCloner/BadgeCloner" > ~/launcher.sh
echo "python3 server.py" >> ~/launcher.sh
chmod +x ~/launcher.sh
}
install_lcd_drivers() {
cd ~/LCD-show
sudo chmod +x LCD35-show
sudo ./LCD35-show
}
main() {
cd ~
install_packages
clone_repos
compile_libnfc
compile_mfoc
sudo ldconfig
update_autostart
create_launcher
install_lcd_drivers
}
main "$@"

View File

@ -114,3 +114,44 @@ F124C2578AD0
E2C42591368A E2C42591368A
4A6352684677 4A6352684677
E64Q986Q5D94 E64Q986Q5D94
A00027000099
A00016000028
A00003000028
A0000F000345
A00001000030
A00002000086
A00002000036
A00002000088
A00000000058
A00000000096
A00000000008
A00000043D79
A00000000064
A00025000030
A00003000057
0000A2B3C86F
021200c20307
021209197507
1E34B127AF9C
303041534956
4143532D494E
41454E521985
43412d627400
455249524345
456666456666
45B722C63319
484585414354
4D414C414741
536563644C65
57D27B730760
593DD8FE167A
6472616E7265
65626F726369
680E95F3C287
709BA7D4F920
8829DAD9AF76
92D0A0999CBA
948EE7CFC9DB
9EB7C8A6D4E3
A22AE12C9013
AFC984A3576E