วันอังคารที่ 12 พฤศจิกายน พ.ศ. 2562

rpi3b เลิกผลิต จึงต้องทำใหม่ทั้งหมดด้วย rpi4


1.เริ่มต้นด้วย download image lite มาจาก https://www.raspberrypi.org/downloads/raspbian/ โดยเลือกตัว buster lite
2.sudo nano /etc/default/keyboard ให้เปลี่ยนจาก "gb" ไปเป็น "us"  เพื่อทำให้ keyboard เป็น us
2.1 reboot
3.sudo raspi-conig
3.1 change password
3.2 change Time-Zone ให้เป็น Asia, Bangkok
3.3 Interface option
3.3.1 Enable I2C
3.3.2 Enable SSH
4.sudo nano /boot/config.txt
4.1 uncomment hdmi_force_hotplug=1
4.2 uncomment hdmi_group=1, hdmi_mode=16
แล้วแต่กรณีดังตารางต่อไปนี้


hdmi_group hdmi_mode ความละเอียด จอ
1 16 1080p TV
2 16 1024x768 60hz computer
2 82 1080p 60hz computer


5.Static IP
5.1 sudo nano /boot/cmdline.txt เพิ่ม ip=192.168.1.31 เพื่อตั้ง ip
5.2 sudo systemctl disable dhcpcd.service เพื่อไม่ให้รับ ip dhcp
6.sudo apt-get update
7.sudo apt-get upgrade
8.sudo apt-get install wiringpi
9.cd /temp
10.wget https://project-downloads.drogon.net/wiringpi-latest.deb
11.sudo dpkg -i wiringpi-latest.deb
12.check ด้วยคำสั่ง gpio -v และ gpio readall
13.ลง R502-CL
13.1 Open a root terminal window; you need to have administrator rights.
Get and install the libusb library with the apt-get command: apt-get install libusb-dev libusb++-0.1-4c2
Check the installation: You shall find the library libusb.so under the directory /usr/lib/
13.2. Download and install the libccid package: apt-get install libccid
13.3. Download and install the pcsc-lite package: apt-get install pcscd
13.4. Check that the pcscd service is running:
In the terminal console, run the command ps –A.
You should find a "pcscd" process running in the list displayed
Run pcscd in terminal
13.5. Download and install libpcsclite1: apt-get install libpcsclite1
13.6. Download and install libpcsclite-dev: apt-get install libpcsclite-dev
13.7. Check whether the R502 reader is detected: your_system_name:/tmp# lsusb
Bus 001 Device 002: ID 096e:0608
13.8. Use root to run “install script”: $ wget http://download.ftsafe.com/files/reader/product/R502/install.sh $ sh install.sh or $ bash install.sh
13.9. After run “install script”, then insert reader and start “pcscd” service.
Run “pcsctest” command to do test
Like below: pcscd –adf //run pcscd service, for parameter, you can using “man pcscd” to get more helps pcsctest
13.10. To develop application based on FEITIAN R502, check below:
To develop your own application, just follow PCSC Lite APIs
http://pcsclite.alioth.debian.org/api/group__API.html
For the test demo application, you can found in source code, which named "pcsctest"
https://alioth.debian.org/frs/?group_id=30105


http://wiringpi.com/download-and-install/
https://www.raspberrypi.org/forums/viewtopic.php?t=251297
http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/
http://androidraspberryarduino.blogspot.com/2015/12/install-acr-pcsc-smart-card-raspberry.html
https://hosxp.net/smf2/index.php?topic=35175.0
https://raspberrypith.blogspot.com/2014/09/install-card-reader-rfid-r502-cl.html
https://github.com/FeitianSmartcardReader/R502_SDK_Latest/blob/master/Docs/EN_Build_CCID_Driver_On_Linux_Latest.pdf


ไม่มีความคิดเห็น: