Skip to content

Commit

Permalink
Allow rc522 readmode UID setting during setup
Browse files Browse the repository at this point in the history
Extend rc522 setup script to question user for the usage of UID mode
rather than the old custom card ID.
  • Loading branch information
miohna committed Jan 24, 2024
1 parent 08365b1 commit cd883df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/rfid-reader/RC522/setup_rc522.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ printf "MFRC522" > "${JUKEBOX_HOME_DIR}"/scripts/deviceName.txt
sudo chown pi:www-data "${JUKEBOX_HOME_DIR}"/scripts/deviceName.txt
sudo chmod 644 "${JUKEBOX_HOME_DIR}"/scripts/deviceName.txt

read -p "Use backward-compatible card ID (not suggested for new installations) (y/n)? " choice
case "$choice" in
y|Y ) printf "OFF" > "${JUKEBOX_HOME_DIR}"/settings/Rfidreader_Rc522_Readmode_UID;;
* ) printf "ON" > "${JUKEBOX_HOME_DIR}"/settings/Rfidreader_Rc522_Readmode_UID;;
esac

printf "Restarting phoniebox-rfid-reader service...\n"
sudo systemctl start phoniebox-rfid-reader.service

Expand Down

0 comments on commit cd883df

Please sign in to comment.