How to read and write MIFARE Ultralight pages with PN7150

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to read and write MIFARE Ultralight pages with PN7150

ソリューションへジャンプ
1,811件の閲覧回数
owenl
Contributor I

I am looking for the command sequence to read/write MIFARE Ultralight pages with a PN7150. I'm struggling with the PN7150 user manual - I see a sequence diagram for MIFARE Classic (with authentication) but not for the MIFARE Ultralight. Can anyone enlighten me or point to some sample code.

(The DH is a micro-controller running FreeRTOS)

0 件の賞賛
返信
1 解決策
1,797件の閲覧回数
owenl
Contributor I

Answering myself. Something along the lines of:

uint8_t ReadPage[] = {0x00, 0x00, 0x02, 0x30, page};
esp_err_t err = i2c_manager_write(port_, deviceAddress_, I2C_NO_REG, ReadPage, sizeof(ReadPage));
 
Send the 3 byte header and 2 byte payload - (0x30 == READ cmd) and page number. Then handle the returned CORE_CONN_CREDITS_NTF followed by the NCI_DATA_MSG response containing 16 bytes starting from the page address.

元の投稿で解決策を見る

1 返信
1,798件の閲覧回数
owenl
Contributor I

Answering myself. Something along the lines of:

uint8_t ReadPage[] = {0x00, 0x00, 0x02, 0x30, page};
esp_err_t err = i2c_manager_write(port_, deviceAddress_, I2C_NO_REG, ReadPage, sizeof(ReadPage));
 
Send the 3 byte header and 2 byte payload - (0x30 == READ cmd) and page number. Then handle the returned CORE_CONN_CREDITS_NTF followed by the NCI_DATA_MSG response containing 16 bytes starting from the page address.