RFID Raspberry Pi Card Manager written in Python with MVC and MQTT patterns
- ✅ Client server publish/subscribe messaging pattern (by using MQTT 3.1.1 protocol)
- ✅ Security and authentication (By using SSL and uthentication mechanism)
- ✅ MVC (Model-View-Controller)
- Install required packages (MQTT)
pip install -r requirements.txt --user
-
Generate certificates and keys:
Generate pair of keys:
openssl genrsa -des3 -out ca.key 2048
Make certificate:
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt
Make another pair of keys:
openssl genrsa -out server.key 2048
Sign certificate:
openssl req -new -out server.csr -key server.key
Verify certificate
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 360
-
Make password file (in your mosquitto installation folder, e.g.
/etc/mosquitto/
):
mosquitto_passwd -c passwd.conf server
-
Modify mosquitto.conf file. Append this lines to it:
allow_anonymous false password_file //path to passwd.conf which you had made in section 3// port 8883 cafile //path to ca.crt which you had made in section 2// certfile //path to server.crt which you had made in section 2// keyfile //path to server.key which you had made in section 2//
-
Navigate to client and server directory
-
Run script:
python3 main.py
Feel free to contact me! ✊