FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight.cpp
Go to the documentation of this file.
00001 /*---------------------------------------------------------
00002 |                                                         |
00003 |      FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight.cpp |
00004 |                                                         |
00005 -----------------------------------------------------------
00006 
00007 Copyright © 2009-2010   FEIG ELECTRONIC GmbH, All Rights Reserved.
00008                                                 Lange Strasse 4
00009                                                 D-35781 Weilburg
00010                                                 Federal Republic of Germany
00011                                                 phone    : +49 6471 31090
00012                                                 fax      : +49 6471 310999
00013                                                 e-mail   : obid-support@feig.de
00014                                                 Internet : http://www.feig.de
00015                                         
00016 Author                  :       Markus Hultsch
00017 Begin                   :       30.03.2009
00018 
00019 Version                 :       03.01.00 / 10.02.2010 / M. Hultsch
00020 
00021 Operation Systems       :       independent
00022 
00023 Function                        :       class for OBID® classic-pro transponder ISO14443-3 MIFARE Ultralight
00024 
00025 NOTE                            :       this class supports only selected or addressed mode in Host-Mode
00026 
00027 
00028 Trademarks:
00029 -----------
00030 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00031 Other Trademarks: see FEDM.h
00032 */
00033 
00034 #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)
00035 
00036 #include "FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight.h"
00037 #include "../FEDM_ISCReader.h"
00038 #include "../FEDM_ISOTabItem.h"
00039 #include "../FEDM_ISCReaderID.h"
00040 #include "../FEDM_ISC.h"
00041 
00042 
00043 #if _MSC_VER >= 1400
00044         #pragma warning(disable : 4996)
00045 #endif
00046 
00047 
00048 
00049 //####################################################################
00050 // class FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight
00051 // >> supports only ISO Host Commands <<
00052 //####################################################################
00053 
00054 FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight::FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight(
00055         FEDM_ISCReader* pReader,
00056         FEDM_ISOTabItem* pTabItem )
00057         : FedmIscTagHandler_ISO14443_3(pReader, FedmIscTagHandler::TYPE_ISO14443_3_MIFARE_ULTRALIGHT, pTabItem)
00058 {
00059         m_sTagName = "ISO 14443-3 Type A : MIFARE Ultralight";
00060 }
00061 
00062 FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight::FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight(
00063         FEDM_ISCReader* pReader,
00064         unsigned int uiTagHandlerType,
00065         FEDM_ISOTabItem* pTabItem )
00066         : FedmIscTagHandler_ISO14443_3(pReader, uiTagHandlerType, pTabItem)
00067 {
00068         m_sTagName = "ISO 14443-3 Type A : MIFARE Ultralight";
00069 }
00070 
00071 FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight::~FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight()
00072 {
00073 }
00074 
00075 // set all data members to 0
00076 /*void FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight::Init()
00077 {
00078 }*/
00079 
00080 
00081 /***************************************************************************
00082   Begin                 :       31.03.2009 / M. Hultsch
00083 
00084   Version               :       03.01.00 / 11.05.2009 / M. Hultsch
00085 
00086   Function                      :       [0xB2][0xB2] Authent Mifare Ultralight C with key from reader
00087 
00088                                                 NOTE: only for selected tags
00089 
00090   Parameters            :       unsigned char ucKeyIndex                - [in] reader key index
00091 
00092   Return value          :       0                               - if tramsmission was successful
00093                                                 status byte (>1)- if the reader signals a problem
00094                                                 error code (<0) - if something goes wrong
00095 ***************************************************************************/
00096 int FedmIscTagHandler_ISO14443_3_MIFARE_Ultralight::Authent(
00097         unsigned char ucReaderKeyIndex )
00098 {
00099         int iErr = 0;
00100 
00101         FEDM_CHK1(iErr, m_pReader->SetData(FEDM_ISC_TMP_B2_CMD, (unsigned char)0xB2));
00102         FEDM_CHK1(iErr, m_pReader->SetData(FEDM_ISC_TMP_B2_MODE, (unsigned char)FEDM_ISC_ISO_MODE_SEL));
00103 
00104         FEDM_CHK1(iErr, m_pReader->SetData(FEDM_ISC_TMP_B2_REQ_KEY_INDEX, ucReaderKeyIndex));
00105 
00106         // ... and execute
00107         return m_pReader->SendProtocol(0xB2);
00108 }
00109 
00110 #endif // #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)


maggie_rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:05:30