10 #import <Foundation/Foundation.h> 174 @protocol ACRAudioJackReaderDelegate;
191 @property (nonatomic, weak) id<ACRAudioJackReaderDelegate>
delegate;
200 - (id)initWithMute:(BOOL)mute;
211 - (void)resetWithCompletion:(
void (^)(
void))completion;
240 - (BOOL)setSleepTimeout:(NSUInteger)timeout;
247 - (void)authenticateWithMasterKey:(const uint8_t *)masterKey length:(NSUInteger)length;
257 - (void)authenticateWithMasterKey:(const uint8_t *)masterKey length:(NSUInteger)length completion:(
void (^)(NSInteger))completion;
276 - (BOOL)setCustomId:(const uint8_t *)customId length:(NSUInteger)length;
295 - (BOOL)setMasterKey:(const uint8_t *)masterKey length:(NSUInteger)length;
307 - (BOOL)setAesKey:(const uint8_t *)aesKey length:(NSUInteger)length;
325 - (BOOL)setDukptOption:(BOOL)enabled;
339 - (BOOL)initializeDukptWithIksn:(const uint8_t *)iksn iksnLength:(NSUInteger)iksnLength ipek:(const uint8_t *)ipek ipekLength:(NSUInteger)ipekLength;
371 - (BOOL)piccPowerOnWithTimeout:(NSUInteger)timeout cardType:(NSUInteger)cardType;
381 - (BOOL)piccTransmitWithTimeout:(NSUInteger)timeout commandApdu:(const uint8_t *)commandApdu length:(NSUInteger)length;
397 - (BOOL)setPiccRfConfig:(const uint8_t *)rfConfig length:(NSUInteger)length;
410 - (NSData *)powerCardWithAction:(
ACRCardPowerAction)action slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
425 - (
ACRCardProtocol)setProtocol:(
ACRCardProtocol)preferredProtocols slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
437 - (NSData *)transmitApdu:(NSData *)command slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
450 - (NSData *)transmitApdu:(const uint8_t *)command length:(NSUInteger)length slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
463 - (NSData *)transmitControlCommand:(NSData *)command controlCode:(NSUInteger)controlCode slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
477 - (NSData *)transmitControlCommand:(const uint8_t *)command length:(NSUInteger)length controlCode:(NSUInteger)controlCode slotNum:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
486 - (void)updateCardStateWithSlotNumber:(NSUInteger)slotNum timeout:(NSTimeInterval)timeout error:(NSError **)errorPtr;
493 - (NSData *)getAtrWithSlotNumber:(NSUInteger)slotNum;
500 - (
ACRCardState)getCardStateWithSlotNumber:(NSUInteger)slotNum;
516 - (BOOL)sendCommand:(const
void *)buffer length:(NSUInteger)length;
524 - (NSData *)createFrame:(const
void *)buffer length:(NSUInteger)length;
532 - (BOOL)sendFrame:(NSData *)frameData;
542 - (BOOL)verifyData:(const
void *)buffer length:(NSUInteger)length;
550 @protocol ACRAudioJackReaderDelegate <NSObject>
571 - (void)reader:(
ACRAudioJackReader *)reader didSendFirmwareVersion:(NSString *)firmwareVersion;
599 - (void)reader:(
ACRAudioJackReader *)reader didSendRawData:(const uint8_t *)rawData length:(NSUInteger)length;
614 - (void)reader:(
ACRAudioJackReader *)reader didSendCustomId:(const uint8_t *)customId length:(NSUInteger)length;
622 - (void)reader:(
ACRAudioJackReader *)reader didSendDeviceId:(const uint8_t *)deviceId length:(NSUInteger)length;
647 - (void)reader:(
ACRAudioJackReader *)reader didSendPiccAtr:(const uint8_t *)atr length:(NSUInteger)length;
655 - (void)reader:(
ACRAudioJackReader *)reader didSendPiccResponseApdu:(const uint8_t *)responseApdu length:(NSUInteger)length;
This is the mask of ISO defined transmission protocols.
Definition: ACRAudioJackReader.h:72
Success.
Definition: ACRAudioJackReader.h:17
T=1 is the active protocol.
Definition: ACRAudioJackReader.h:62
Cycle power and reset the card.
Definition: ACRAudioJackReader.h:40
ISO14443 Type B.
Definition: ACRAudioJackReader.h:28
The ACRAudioJackReader class represents ACS audio jack readers.
Definition: ACRAudioJackReader.h:181
Control code for sending APDU to the reader.
Definition: ACRAudioJackReader.h:149
Timeout.
Definition: ACRAudioJackReader.h:19
BOOL getDeviceId()
Gets the device ID from the reader.
ACRCardState
Card state.
Definition: ACRAudioJackReader.h:94
BOOL sleep()
Sets the reader to sleep.
Enable the masked track 2 data.
Definition: ACRAudioJackReader.h:165
Enable the encrypted track 2 data.
Definition: ACRAudioJackReader.h:159
The library is unaware of the current state of the reader.
Definition: ACRAudioJackReader.h:99
BOOL piccPowerOff()
Powers off the PICC.
Use the default transmission parameters or card clock frequency.
Definition: ACRAudioJackReader.h:77
NSUInteger ACRCardProtocol
Card protocol.
Definition: ACRAudioJackReader.h:89
Raw is the active protocol.
Definition: ACRAudioJackReader.h:67
Enable the masked track 1 data.
Definition: ACRAudioJackReader.h:162
T=0 is the active protocol.
Definition: ACRAudioJackReader.h:57
FeliCa 424kbps.
Definition: ACRAudioJackReader.h:30
The ACRStatus class represents the status.
Definition: ACRStatus.h:17
Use optimal transmission parameters or card clock frequency.
Definition: ACRAudioJackReader.h:83
ACRAuthError
Authentication error.
Definition: ACRAudioJackReader.h:15
There is no card in the reader.
Definition: ACRAudioJackReader.h:104
BOOL getTrackDataOption()
Gets the track data option from the reader.
BOOL getDukptOption()
Gets the DUKPT option from the reader.
ACRPiccCardType
PICC card type.
Definition: ACRAudioJackReader.h:25
id< ACRAudioJackReaderDelegate > delegate
The delegate object specified to receive the audio jack reader events.
Definition: ACRAudioJackReader.h:191
There is no active protocol.
Definition: ACRAudioJackReader.h:52
The card has been reset and specific communication protocols have been established.
Definition: ACRAudioJackReader.h:133
NSUInteger ACRTrackDataOption
Track data option.
Definition: ACRAudioJackReader.h:169
Failure.
Definition: ACRAudioJackReader.h:18
FeliCa 212kbps.
Definition: ACRAudioJackReader.h:29
Power is being provided to the card, but the library is unaware of the mode of the card...
Definition: ACRAudioJackReader.h:122
There is a card in the reader, but it has not been moved into position for use.
Definition: ACRAudioJackReader.h:110
BOOL getStatus()
Gets the status.
The ACRResult class represents the result.
Definition: ACRResult.h:35
ACRCardPowerAction
Card power action.
Definition: ACRAudioJackReader.h:37
Enable the encrypted track 1 data.
Definition: ACRAudioJackReader.h:156
BOOL getFirmwareVersion()
Gets the firmware version.
BOOL getCustomId()
Gets the custom ID from the reader.
Control code for sending escape command to the reader.
Definition: ACRAudioJackReader.h:144
BOOL mute
YES to mute the audio output, otherwise NO.
Definition: ACRAudioJackReader.h:186
ISO14443 Type A.
Definition: ACRAudioJackReader.h:27
Force a reset on the card.
Definition: ACRAudioJackReader.h:41
The ACRTrackData class represents the track data after swiping a card from the reader.
Definition: ACRTrackData.h:39
Power down the card.
Definition: ACRAudioJackReader.h:39
The card has been reset and is awaiting PTS negotiation.
Definition: ACRAudioJackReader.h:127
void reset()
Resets the reader.
Auto RATS.
Definition: ACRAudioJackReader.h:31
There is a card in the reader in position for use.
Definition: ACRAudioJackReader.h:116