Xathrya Sabertooth |
Setting Up Raspberry Pi + Smart Card Reader + PHP Posted: 07 Dec 2013 06:02 AM PST Smart Card is a pocket-sized card with embedded integrated circuits. It provides identification, authentication, data storage and application processing on simple medium. There are two big categories of smart card: contact and contactless. To identify and authenticate a smart card properly we need a smart card reader. There are many smart card reader and the way we operate is depend on what smart card it can detect. To detect and use smart card, there is a specification for smart card integration into computing environments. It is called PC/SC (Personal Computer / Smart Card). The standard has been implemented to various operating system: Windows (since NT/9x), Linux, Unix. We can however create a small device which can make use of smart card reader, instead of using our PC. That’s what we will discuss on this article. As title suggest, after we have smart card connected we will use PHP as a programming environment. For this article, we use:
Grab the MaterialsMake sure the Raspberry Pi is working properly with Raspbian Wheezy installed. Also make sure all the hardware are available. We need USB power hub as the ACR122 Smart Card Reader gives too high load for Raspberry Pi so we will feed electricity from somewhere else. InstallationInstall the drivers and related package apt-get install build-essential libusb-dev libusb++-dev libpcsclite-dev libccid
Install PHP and all needed development tool apt-get install php5-dev php5-cli php-pear Once PHP installed, we need a PHP extension for smart card: pecl install pcsc-alpha You can see the documentation here. ConfigurationOn some case, we need to add an entry to php.ini manually for registering pcsc extension. To do this, open up php.ini and add following entry: extension = pcsc.so |
You are subscribed to email updates from Xathrya Sabertooth To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Tidak ada komentar:
Posting Komentar