Pn5180 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A PN5180 class offering RFID and NFC functionalities. Implement the CardTransceiver class to allow Mifare, Credit Card support
public class Pn5180 : Iot.Device.Card.CardTransceiver, IDisposable
type Pn5180 = class
inherit CardTransceiver
interface IDisposable
Public Class Pn5180
Inherits CardTransceiver
Implements IDisposable
- Inheritance
- Implements
Constructors
Pn5180(SpiDevice, Int32, Int32, GpioController, Boolean) |
Create a PN5180 RFID/NFC reader |
Pn5180(SpiDevice, Int32, Int32, GpioController, Boolean, LogLevel) |
Create a PN5180 RFID/NFC reader |
Fields
DefaultSpiMode |
Only SPI Mode supported is Mode0 |
MaximumSpiClockFrequency |
PN532 SPI Clock Frequency |
RadioFrequencyConfigurationSize |
A radio Frequency configuration element size is 5 bytes Byte 1 = Register Address next 4 bytes = data of the register |
SupportedProtocols |
The set of NFC protocols that are supported by this transceiver. |
Properties
CrcReceptionTransfer |
Set on of off the CRC calculation for the Transfer and Reception Switch off is needed for anticollision operation on type A cards. Otherwise normal state is on |
LogLevel |
The Log level |
LogTo |
The location to log the info |
MaximumReadSize |
The maximum number of bytes that can be read from the card in a single transaction, (excluding CRC). This is constrained by the operating mode as well as transceiver limitations (such as the size of a FIFO buffer in the transceiver). |
MaximumReadSize |
The maximum number of bytes that can be read from the card in a single transaction, (excluding CRC). This is constrained by the operating mode as well as transceiver limitations (such as the size of a FIFO buffer in the transceiver). (Inherited from CardTransceiver) |
MaximumWriteSize |
The maximum number of bytes that can be written to the card in a single transaction, (excluding CRC). This is constrained by the operating mode as well as transceiver limitations (such as the size of a FIFO buffer in the transceiver). |
MaximumWriteSize |
The maximum number of bytes that can be written to the card in a single transaction, (excluding CRC). This is constrained by the operating mode as well as transceiver limitations (such as the size of a FIFO buffer in the transceiver). (Inherited from CardTransceiver) |
RadioFrequencyCollision |
True to disable the Radio Frequency collision avoidance according to ISO/IEC 18092 False to use Active Communication mode according to ISO/IEC 18092 |
RadioFrequencyField |
Get or set the radio frequency field. True for on, false for off |
Methods
CalculateCrcA(ReadOnlySpan<Byte>, Span<Byte>) |
Provide a calculation of CRC for Type A cards |
CalculateCrcB(ReadOnlySpan<Byte>, Span<Byte>) |
Provide a calculation of CRC for Type B cards |
DeselectCardTypeB(Data106kbpsTypeB) |
Deselect a 14443 Type B card |
Dispose() |
Dispose |
GetIdentifier(Span<Byte>) |
Get the PN5180 identifier, this is a 16 byte long |
GetNumberOfBytesReceivedAndValidBits() |
Get the number of bytes to read and the valid number of bits in the last byte If the full byte is valid then the value of the valid bit is 0 |
GetRadioFrequencyConfigSize(ReceiverRadioFrequencyConfiguration) |
Get the size of the configuration of a specific receiver configuration |
GetRadioFrequencyConfigSize(TransmitterRadioFrequencyConfiguration) |
Get the size of the configuration of a specific transmitter configuration |
GetRadioFrequencyStatus() |
Get the radio frenquency status |
GetVersions() |
Get the Product, Firmware and EEPROM versions of the PN5180 |
IsRadioFrequencyFieldExternal() |
Is the external field activated? |
ListenToCardIso14443TypeA(TransmitterRadioFrequencyConfiguration, ReceiverRadioFrequencyConfiguration, Data106kbpsTypeA, Int32) |
Listen to any 14443 Type A card |
ListenToCardIso14443TypeB(TransmitterRadioFrequencyConfiguration, ReceiverRadioFrequencyConfiguration, Data106kbpsTypeB, Int32) |
Listen to any 14443 Type B card |
LoadRadioFrequencyConfiguration(TransmitterRadioFrequencyConfiguration, ReceiverRadioFrequencyConfiguration) |
Load a specific radio frequency configuration |
MifareAuthenticate(ReadOnlySpan<Byte>, MifareCardCommand, Byte, ReadOnlySpan<Byte>) |
Specific function to authenticate Mifare cards |
MifareAuthenticate(Span<Byte>, MifareCardCommand, Byte, Span<Byte>) |
Specific function to authenticate Mifare cards |
ReadAllEeprom(Span<Byte>) |
Read the full EEPROM |
ReadDataFromCard(Span<Byte>) |
Read data from a card. |
ReadDataFromCard(Span<Byte>, Int32) |
Read all the data from the card |
ReadEeprom(EepromAddress, Span<Byte>) |
Read a specific part of the EEPROM |
ReselectTarget(Byte) |
Once you have an authentication operation failing with Mifare cards or a read/write, the card stop. TYhe only way to have it back is to send the unselect and anti collision. This function provides this feature |
ReselectTarget(Byte) |
Once you have an authentication operation failing with Mifare cards or a read/write, the card stop. TYhe only way to have it back is to send the unselect and anti collision. This function provides this feature (Inherited from CardTransceiver) |
RetrieveRadioFrequencyConfiguration(ReceiverRadioFrequencyConfiguration, Span<Byte>) |
Retrieve the radio frequency configuration |
RetrieveRadioFrequencyConfiguration(TransmitterRadioFrequencyConfiguration, Span<Byte>) |
Retrieve the radio frequency configuration |
SendDataToCard(Span<Byte>, Int32) |
Send data to a card. |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>) |
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards. |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>) |
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards. (Inherited from CardTransceiver) |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>, NfcProtocol) |
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards. |
Transceive(Byte, ReadOnlySpan<Byte>, Span<Byte>, NfcProtocol) |
This function has to be implemented by all NFC/RFID/Card readers. This function is used in exchange of data with the reader and the cards. (Inherited from CardTransceiver) |
UpdateRadioFrequencyConfiguration(ReceiverRadioFrequencyConfiguration, Span<Byte>) |
Update the radio frequency configuration |
UpdateRadioFrequencyConfiguration(TransmitterRadioFrequencyConfiguration, Span<Byte>) |
Update the radio frequency configuration |
WriteAllEeprom(Span<Byte>) |
Write all the EEPROM |
WriteEeprom(EepromAddress, Span<Byte>) |
Write the EEPROM at a specific address |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for