Raspberry Pi ต่อ Smartcard Reader อ่านบัตรประชาชน
อ้างอิงจาก https://raspberrypi4u.blogspot.com/2018/01/raspberry-pi-smartcard-reader-thai-id.html
เบื้องนั้น ต้องตรวจสอบก่อนว่า Raspberry Pi 3 model B มี python 2 (3 ไม่แน่ใจว่าได้ไหม)
ผมใช้ OS เป็น NOOBS Lite และ update ล่าสุด
Smartcard Reader ของตัวอย่างใช้เป็น
-USB Smartcard Reader Alcor Micro model AU9560
ผมหาไม่ได้ผมเลยใช้เป็น
-fingo
(คาดว่าน่าจะใช้กันได้ไหม คาดว่านะ)
จากนั้นติดตั้ง
sudo apt-get install pcscd git python-setuptools swig gcc libpcsclite-dev python-dev
จากนั้นให้ไปโหลด pyscard ลงเครื่อง
https://github.com/LudovicRousseau/pyscard
จากนั้น ไปที่โฟลเดอร์และติดตั้ง
cd pyscard
sudo python setup.py build_ext install
(จากที่ทำยังไม่เคยพบ error อะไร)
จากนั้นโหลด file ที่จะใช้งาน thai-id-card.py
จากนั้นเสียบ Smartcard Reader ดูว่าไฟติดไหม (จากที่เจอไฟจะติดแค่ตอนแรกอย่าตกใจ)
จากนั้นลองทดสอบ เสียบ บัตรประชาชน แล้วใช้คำสั่ง python thai-id-card.py
จะได้ข้อความออกมาส่วนรูปอยู่ใน โฟล์เดอร์ที่ run