Go Down

Topic: ic card reader and serial port (Read 1 time) previous topic - next topic

bl4d3

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: [Select]

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

PaulS

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.

sonnyyu

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.










bl4d3

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

Grumpy_Mike

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

bl4d3



bl4d3

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

Go Up