Pages: [1]   Go Down
Author Topic: ic card reader and serial port  (Read 921 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 149
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm trying to read serial data from an ic card reader, as you can see here (last page)
http://speedy.sh/sSebC/CRT-188-Specification.pdf
it should be a TTL serial device so I wired directly into pin 0 (rx) and 1 (tx) of my arduino uno and with this code i suppose to read the serial data coming from the card reader
Code:
int incomingByte = 0;   

void setup() {
        Serial.begin(9600);   
}

void loop() {

        // send data only when you receive data:
        if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte);
        }
}
but nothing goes through the serial, any hint? How can i debug it?
Thank you
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The serial port is not a three-way communication channel. You can use it to talk to the card reader OR the PC. Not both.
Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1761
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it should be a TTL serial device

It is not necessary. It come with preconfig either RS-232 or TTL. confirm yourself.

English Version:
manufactory web site

Chinese Version:
manufactory web site ( In Chinese)

Translate Version( English from Chinese):
manufactory web site( Google version)

neither Chinese nor English version is complete, one is no good, two is better.









Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 149
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I'm not wrong the ic card reader has a RS-232 out with TTL level. Is it correct?
If it'is which is the best strategy to connect it to arduino?

As PaulS told I can not talk with the card reader and pc at the same time, but i need to print somewhere the data in order to verify the correct communication...how to achieve it?
Thank you
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Look up a software serial emulator libary, there are a few to choose from.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 149
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

could you share some links?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 602
Posts: 33375
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/en/Reference/SoftwareSerial
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 149
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

During last days I focused a bit my target, I need to read a smartcard based on ISO-7816 with that ic card reader. I googled a bit around but nothing clear, at least for me, could someone point me in the right direction?

Basically I should insert the card in the reader, send the reset command via arduino and read a specified memory section.

Is there any library to accomplish this?
Thank you
Logged

Pages: [1]   Go Up
Jump to: