

If not (PN532_ACK_FRAME = response.tostring()): # Check frame starts with 0x01 and then has 0x00FF (preceeded by optional # Read frame with expected length of data. Returns the data inside the frame if found, otherwise raises an exception """Read a response frame from the PN532 of at most length bytes in size.

"""Busy wait for the specified number of milliseconds.""" """Add two values as unsigned 8-bit values.""" r = serial.Serial(uart_port, uart_baudrate, timeout=2000) # Prefixes for NDEF Records (to identify record type) PN532_RESPONSE_INLISTPASSIVETARGET = 0x4B PN532_COMMAND_TGRESPONSETOINITIATOR = 0x90 PN532_COMMAND_TGGETINITIATORCOMMAND = 0x88 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # copies or substantial portions of the Software. # The above copyright notice and this permission notice shall be included in all # furnished to do so, subject to the following conditions: # copies of the Software, and to permit persons to whom the Software is # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

# in the Software without restriction, including without limitation the rights # of this software and associated documentation files (the "Software"), to deal # Permission is hereby granted, free of charge, to any person obtaining a copy # Author: Manuel Fernando Galindo Copyright (c) 2016 Manuel Fernando Galindo # Example of detecting and reading a block from a MiFare NFC card.
