- Wed Aug 10, 2016 11:24 am
#191065
I am trying to get my GT-511C3 to work on R-Pi Zero.
Setup:
FP scanner is powered by the 5V pin from the Pi, and Rx/Tx are connected to 3.3V Tx/Rx pins of the R-Pi.
Code:
No matter what command I send, it always responds with '0x100F' error code. Please, advise.
Setup:
FP scanner is powered by the 5V pin from the Pi, and Rx/Tx are connected to 3.3V Tx/Rx pins of the R-Pi.
Code:
Code: Select all
Response:
#!/usr/bin/env python
import wiringpi as wp
from struct import *
# 'Open' Command (little endian)
opn = pack('<BBHIH', 0x55, 0xAA, 0x01, 0x00, 0x01)
# Compute checksum
chk = sum(map(ord, list(opn)))
chk = map(chr, [chk % 256, chk / 256])
opn += chk[0] + chk[1]
wp.wiringPiSetup()
serial = wp.serialOpen('/dev/ttyAMA0', 9600)
print serial
wp.serialPuts(serial, opn)
res = []
while True:
resp = wp.serialGetchar(serial)
print hex(resp)
if resp == -0x1:
break
res.append(resp)
# See the result
print map(hex, res)
Code: Select all
Problem:'\x55\xaa\x01\x00\x00f\x10\x00\x00\x31\x00\x50\x01'
No matter what command I send, it always responds with '0x100F' error code. Please, advise.