A comprehensive RFID reader application that supports Turkish ID cards and provides detailed card information analysis.
- Automatic Detection: Automatically detects Turkish ID cards (TC Kimlik) based on 11-digit format
- Validation Algorithm: Implements the official Turkish ID validation algorithm
- Check Digit Verification: Validates the 10th and 11th check digits
- Detailed Analysis: Shows validation results and expected vs actual check digits
- Multiple Card Types: Supports various RFID card formats
- Turkish ID Cards (TC Kimlik)
- Standard RFID Cards (10-digit)
- Long Format RFID Cards (16+ digits)
- Hexadecimal RFID Cards
- Custom format cards
- Detailed Data Analysis:
- Raw data and hexadecimal representation
- Single decimal number representation of card data
- Card format detection
- Numeric and alphanumeric data extraction
- Timestamp tracking
- Read count statistics
- Auto-Typing Feature: Automatically types decimal data to the active window
- Automatic COM Port Detection: Automatically finds and uses the best available COM port
- Serial Communication: 9600 baud rate with automatic port selection
- Real-time Monitoring: Continuous or timed monitoring options
- Data Filtering: Filters out incomplete reads and duplicates
- Error Handling: Comprehensive error handling and status indicators
- User-friendly Interface: Clear status messages and progress indicators
- Ensure Python 3.13 is installed
- Install required dependencies:
pip install -r requirements.txt
Run the batch file for easy execution:
run_rfid_test.batpython rfid_reader_test.pypython test_turkish_id.pypython com_port_detector.py- Monitor RFID reads (continuous) - Detailed + Auto-type: Shows comprehensive card information and types decimal data
- Monitor RFID reads (continuous) - Simple + Auto-type: Shows basic card info and types decimal data
- Monitor RFID reads (continuous) - Detailed (no auto-type): Shows detailed info without auto-typing
- Monitor RFID reads (30 seconds) - Detailed + Auto-type: Timed monitoring with detailed info and auto-typing
- Monitor RFID reads (30 seconds) - Simple + Auto-type: Timed monitoring with basic info and auto-typing
- Exit: Close the application
The application uses the official Turkish ID validation algorithm:
- Length Check: Must be exactly 11 digits
- First Digit: Cannot be 0
- 10th Digit: Calculated as
(odd_sum * 7 - even_sum) % 10 - 11th Digit: Calculated as
sum(first_10_digits) % 10
Card Type: Turkish ID Card (TC Kimlik)
Raw Data: 10000000146
Hex Data: 31 30 30 30 30 30 30 30 31 34 36
Decimal Data: 3401181938
Data Length: 11 characters
Timestamp: 2024-01-15T10:30:45.123456
Turkish ID Card Details:
Full Number: 10000000146
Valid: ✓ Yes
Check Digit 10: 4 (Expected: 4)
Check Digit 11: 6 (Expected: 6)
- Format: 11 digits
- Validation: Official Turkish algorithm
- Example:
10000000146
- Format: 10 alphanumeric characters
- Example:
1234567890
- Format: 16+ digits
- Example:
1234567890123456
- Format: 8+ hex characters
- Example:
A1B2C3D4
- Port: Automatically detected (no manual configuration needed)
- Baud Rate: 9600
- Data Bits: 8
- Parity: None
- Stop Bits: 1
- Flow Control: None
Edit rfid_reader_test.py to modify:
- Serial port settings
- Card type detection patterns
- Output format
- Monitoring duration
- Automatic Detection: The system will automatically find the best available COM port
- Ensure RFID reader is properly connected
- Verify device drivers are installed
- Try different baud rates if needed
- Permission Errors: If you get "Access denied" errors:
- Close other applications that might be using the COM port
- Try running the application as Administrator
- Use
python com_port_detector.pyto find available ports
- Ensure cards are properly positioned
- Check RFID reader power and connections
- Verify card compatibility
- Try different card types
- Check if the card is a genuine Turkish ID
- Verify the 11-digit format
- Ensure proper card positioning
- Check for card damage
pyserial==3.5: Serial communicationtyping-extensions==4.8.0: Type hints supportpyautogui==0.9.54: Auto-typing functionalitypywin32==306: Windows API access
FitnessDesktop/
├── rfid_reader_test.py # Main RFID reader application
├── test_turkish_id.py # Turkish ID validation test
├── com_port_detector.py # COM port detection utility
├── run_rfid_test.bat # Windows batch file for easy execution
├── requirements.txt # Python dependencies
└── README.md # This documentation
This project is open source and available under the MIT License.