mirror of
https://github.com/RfidResearchGroup/ChameleonMini.git
synced 2026-05-12 11:20:37 -07:00
Fixed nasty bug in ISO15693PrepareFrame, removed unnecessary includes and implemented failsafe to command not supported to fix problems with Android apps. Everything just works.
This commit is contained in:
@@ -72,8 +72,11 @@ bool ISO15693PrepareFrame(uint8_t* FrameBuf, uint16_t FrameBytes, CurrentFrame*
|
||||
/* following declarations are not dependent on addressed/unaddressed state */
|
||||
FrameStruct -> Flags = &FrameBuf[ISO15693_ADDR_FLAGS];
|
||||
FrameStruct -> Command = &FrameBuf[ISO15693_REQ_ADDR_CMD];
|
||||
FrameStruct -> Addressed = ( !(FrameBuf[ISO15693_ADDR_FLAGS] & ISO15693_REQ_FLAG_INVENTORY) & (FrameBuf[ISO15693_ADDR_FLAGS] & ISO15693_REQ_FLAG_ADDRESS) );
|
||||
/* "inventory" flag must be 0, otherwise "addressed" flag have a different meaning (see ISO15693-3) */
|
||||
|
||||
if(!(FrameBuf[ISO15693_ADDR_FLAGS] & ISO15693_REQ_FLAG_INVENTORY)) /* if inventory flag is not set */
|
||||
FrameStruct -> Addressed = (FrameBuf[ISO15693_ADDR_FLAGS] & ISO15693_REQ_FLAG_ADDRESS); /* check for addressed flag */
|
||||
else /* otherwise always false */
|
||||
FrameStruct -> Addressed = false;
|
||||
|
||||
if (FrameStruct -> Addressed)
|
||||
/* UID sits between CMD and PARAM */
|
||||
@@ -89,4 +92,4 @@ bool ISO15693PrepareFrame(uint8_t* FrameBuf, uint16_t FrameBytes, CurrentFrame*
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,8 @@
|
||||
* - Check actual tag's response (error?) when trying to LOCK out of bound sectors
|
||||
*/
|
||||
|
||||
#include "TITagitstandard.h"
|
||||
#include "../Codec/ISO15693.h"
|
||||
#include "../Memory.h"
|
||||
#include "Crypto1.h"
|
||||
#include "../Random.h"
|
||||
#include "ISO15693-A.h"
|
||||
#include "TITagitstandard.h"
|
||||
|
||||
static enum {
|
||||
STATE_READY,
|
||||
@@ -229,4 +225,4 @@ void TITagitstandardFlipUid(ConfigurationUidType Uid)
|
||||
*Uid++ = *tail;
|
||||
*tail-- = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#define TITAGITSTANDARD_H_
|
||||
|
||||
#include "Application.h"
|
||||
#include "ISO15693-A.h"
|
||||
|
||||
#define TITAGIT_STD_UID_SIZE ISO15693_GENERIC_UID_SIZE //ISO15693_UID_SIZE
|
||||
#define TITAGIT_STD_MEM_SIZE 44 //TAG-IT STANDARD MAX MEM SIZE
|
||||
@@ -27,4 +26,4 @@ void TITagitstandardGetUid(ConfigurationUidType Uid);
|
||||
void TITagitstandardSetUid(ConfigurationUidType Uid);
|
||||
void TITagitstandardFlipUid(ConfigurationUidType Uid);
|
||||
|
||||
#endif /* VICINITY_H_ */
|
||||
#endif /* TITAGITSTANDARD_H_ */
|
||||
|
||||
Reference in New Issue
Block a user