Pages: [1]   Go Down
Author Topic: Interfacing with Fingerprint Scanner  (Read 553 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
/** 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(){
}
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm pretty sure there's a question in there somewhere but I don't see it....  smiley-razz
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Code:
  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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
  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.smiley-razz

Ill get back on you once i tested it.
Logged

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

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: