Skip to content

Latest commit

 

History

History
47 lines (41 loc) · 1.7 KB

README.MD

File metadata and controls

47 lines (41 loc) · 1.7 KB

RFID Raspberry Card Manager Status

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)

How to use it

  1. Install required packages (MQTT)
pip install -r requirements.txt --user
  1. 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

  2. Make password file (in your mosquitto installation folder, e.g. /etc/mosquitto/):
    mosquitto_passwd -c passwd.conf server

  3. 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//
  4. Navigate to client and server directory

  5. Run script:

python3 main.py

📫 Contact

Feel free to contact me! ✊