Forum Replies Created
-
Re: Reply To: Read Apple wallet NFC pass with PN5180
21. December 2018 at 8:14 in reply to: Read Apple wallet NFC pass with PN5180Hi Richard,
Thank you for your response. I’m for sure interrested in quick demo, I will fill the form. Have a nice day!
Jan
+ 0 | - 0
Re: Reply To: Mifare Classic MAD1 CRC8 Generation
18. September 2018 at 11:11 in reply to: Mifare Classic MAD1 CRC8 GenerationIt looks that everything within angle brackets gets cut, so I will use normal brackets instead to declare crc8 variable from boost::crc_optimal template (I hope it will work finally :-) )
// init vector defined in MAD appnote is 0xE3. This didn't work, but bit-swapped value 0xC7 works
boost::crc_optimal(8, 0x1D, 0xC7, 0, false, false) crc8;
+ 0 | - 0
Re: Reply To: Mifare Classic MAD1 CRC8 Generation
18. September 2018 at 10:14 in reply to: Mifare Classic MAD1 CRC8 GenerationThe most important part in the previous post was cut (boost::crc_optimal), so I will try to post that line again without marking it as code (no idea how could I edit the post):
// init vector defined in MAD appnote is 0xE3. This didn't work, but bit-swapped value 0xC7 works
boost::crc_optimal crc8;
+ 0 | - 0
Re: Reply To: Mifare Classic MAD1 CRC8 Generation
18. September 2018 at 10:11 in reply to: Mifare Classic MAD1 CRC8 GenerationHi, it's some time ago, but maybe it will help somebody anyway. I use this code to calculate MAD CRC:
uint8_t CalculateCRC8_MAD(uint8_t *in_pData, uint8_t in_nDataLength)
{
if (in_pData == nullptr)
return 0;
if (in_nDataLength == 0)
return 0;
// init vector defined in MAD appnote is 0xE3. This didn't work, but bit-swapped value 0xC7 works
boost::crc_optimal crc8;
uint8_t *pStart = in_pData;
uint8_t *pEnd = in_pData + in_nDataLength;
crc8 = std::for_each(pStart, pEnd, crc8);
return crc8.checksum();
}
Regards
Jan
+ 0 | - 0
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)