Tutorial: Adding an ISO 7816 card reader to your Linksys WRT54G |
By Rasmus Rohde and Mads Ulrik Kristoffersen |
This project is for people who would like to add an ISO 7816 card reader to their Linksys WRT based router. We will connect it to one of the serial ports and use the DMZ GPIO to reset the card.
+3.3V (VCC) o / \ 22K / \ | RxD o-------------------+--------------------------o I/O |\ | TxD o--------------| |--+ 1|/ 2 74LS07 pin 7=GND, pin 14=VCC DMZ o----------------------------------------------o RST 1M 2.2k 3|\4 +-/\/\/--+----/\/\/-----+--| o-----+-------------o CLK | |2 | |/ | | -o- | |100 pF | /_____\ | === | |1 | | | | 3.579545 MHz | | | | +--+ | - 74HC04 +--------+---| | | |---+ GND pin 5,7,9,11,13=GND, | +--+ | pin 14=VCC=+3.3 V |27pF |27pF === === | | - - GND GNDRxD and TxD is the serial port inside the router. Actually you have 2 serial ports to choose from and the link will also tell you where to find 3.3V. DMZ is the LED on the front of the router. The oscillator design is of course just a suggestion. If you want to make it easy just buy a ready-made oscillator instead.
______________________________________ / \ | | | | | C1 C5 | | C2 C6 | | C3 C7 | | C4 C8 | | | | | | | \________________________________________/ C1 VCC Supply voltage C2 RST Reset signal C3 CLK Clock signal C4 - reserved C5 GND Ground C6 VPP Programming voltage (5-25 V) C7 I/O Data input/output C8 - reserved
The software part is actually pretty easy since tools have already been written for you. The NewCS software package comes bundled with a pre-compiled OpenWRT MIPS version, which I suggest you use. This of course means that your life will be a lot easier if you choose OpenWRT as your firmware on the router.
With OpenWRT installed you still need some packages installed to get NewCS running. At the moment they can be found at http://downloads.openwrt.org/whiterussian/packages/. You will be needing libgcc, libopenssl, libpthread and kmod-diag.
That's it!