Go Down

Topic: Interfacing with Fingerprint Scanner (Read 875 times) previous topic - next topic

asa_com

I'm trying to send a command to my fingerprint scanner (turn on its LED) but it doesnt seem to ack it. The FPS is set to 115200bps connection.

I tested its sample program by uploading a blank sketch in my Arduino Mini and connecting its pins to RX/TX and the board to PC via USB. The program was helpful enough to display the hex codes its using in sending commands.

Here is the command to turn on the sensor LED:

Code: [Select]
0x55, 0xAA, 0x24, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x01

And here is the command packet structure :

PREFIXCOMMANDLENDATACHK
0x55 0xAA0x24 0x010x02 0x000x01 0x00 ... 0x000x27 0x01


And here is my test code :

Code: [Select]
/** Turn on the LED **/

byte ledturnon[] = {
 0x55, 0xAA, 0x24, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x01};

void setup()  
{
 Serial.begin(115200);
 Serial.println("Begin Connection");
 Serial.write(ledturnon, 24);
}

void loop(){
}

JimboZA

I'm pretty sure there's a question in there somewhere but I don't see it....  :P
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/

No PMs for help please

asa_com

Im sorry, I was asking; is there something wrong with my code? I think the issue is with the baudrate being to fast for the board but im not certain.

Just now i was able to change the scanner's baudrate from 115200 to 9600 via SerialMon program. I uploaded my code with the corresponding baudrate but still, no response.

PaulS

Code: [Select]
  Serial.println("Begin Connection");
  Serial.write(ledturnon, 24);

What is the fingerprint scanner supposed to do with "Begin Connection<cr><lf>"?

You aren't really trying to talk to the fingerprint scanner AND the PC on the same serial port, are you?

asa_com


Code: [Select]
  Serial.println("Begin Connection");
  Serial.write(ledturnon, 24);

What is the fingerprint scanner supposed to do with "Begin Connection<cr><lf>"?

You aren't really trying to talk to the fingerprint scanner AND the PC on the same serial port, are you?


Oh, so I can't send a command to my scanner with the board using my USB to Serial Adaptor as a power source? That was silly of me.:P

Ill get back on you once i tested it.

PaulS

Quote
Oh, so I can't send a command to my scanner with the board using my USB to Serial Adaptor as a power source?

No. That's fine. It's using the other two wires in the USB cable to send data back to the PC that you can't do, if the TX and RX pins are connected to some other device.

Unless you have a Leonardo, that is.

asa_com

Still no response from the scanner even after connecting to DC Power. SerialMon shows my code is sending the correct commands as with the sample program.

Go Up