Compare commits
8 Commits
master
...
add-instal
| Author | SHA1 | Date | |
|---|---|---|---|
| 313acdb600 | |||
| 30e5983273 | |||
| 104211b810 | |||
| dca8ddffc9 | |||
| d782c8db5a | |||
| 9b4ce2932e | |||
| 26ea541e37 | |||
| b6a5199fdc |
@ -114,44 +114,3 @@ 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
|
|
||||||
43
README.md
43
README.md
@ -4,50 +4,17 @@ 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
|
- Un écran lcd tactile ([Lien Amazon](https://amzn.to/3WTLLis))
|
||||||
- Un lecteur nfc acr122u ([Lien Amazon](https://amzn.to/45w3fVP))
|
- Un lecteur nfc acr122u ([Lien Amazon](https://amzn.to/45w3fVP))
|
||||||
- Un clavier numérique
|
- Un clavier numérique ([Lien Amazon](https://amzn.to/3qj24c9))
|
||||||
|
|
||||||
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 :
|
||||||
Après avoir installé Python3.x, vous devez installer la librairie Flask.
|
Lancement du script d'installation :
|
||||||
```sh
|
```sh
|
||||||
python3 -m pip install flask
|
chmod +x install.sh
|
||||||
```
|
./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
|
||||||
|
|||||||
71
install.sh
Normal file
71
install.sh
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#!/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 "$@"
|
||||||
Loading…
x
Reference in New Issue
Block a user