ICODE SLIX & SLIX2 SET EAS on Swift

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

ICODE SLIX & SLIX2 SET EAS on Swift

ソリューションへジャンプ
3,969件の閲覧回数
Rega32
Contributor I

Hi, there. 

I have two NFC Tags. (SLIX, SLIX2) and ISO15693. 

I want to develop a app on IOS using Swift. 

 

I can Tag Read and Write AFI. 

But I want to SET EAS (9.5.3.12 ) && RESET EAS (9.5.3.13)  on Tags.

I read the Spec documents. But I don't understand.. 

( I attached the file that I read. ) 

My code is here.  (SET EAS) 

My tags didn't change SET EAS (0xA2) and RESET EAS (0xA3). 

 

iso15693Tag.select(requestFlags: [.highDataRate, .address], completionHandler: { (error) in
   iso15693Tag.customCommand(requestFlags: [.highDataRate, .address], customCommandCode: 0xA2,
customRequestParameters: Data([0x00, 0x00, 0x01, 0x00, 0x04]),
resultHandler: { (result: Result<Data, Error>) in
     switch result {
         case .success(let data) :
             print("Data:: \(data)")
         case .failure(let error):
             print("customCommandError :: \(error)")
      }
    })
})

 

 

My tag SLIX2 Tag scan Img.

Capture+_2021-08-02-19-04-19 copy.pngCapture+_2021-08-02-19-03-04 copy.png

  

Please help me.. 

Thanks to read and apologize to my english...

タグ(4)
0 件の賞賛
返信
1 解決策
3,945件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Rega32 ,

 

The spec should be clear on the definition of SET EAS and  RESET EAS, but would you specify what is your question regarding these two commands?

 

Thanks for your patience!

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
3,130件の閲覧回数
tusharv
Contributor I

Hello, I have ICode Slix and Slix 2 NFC tags. I'm working on an iOS app for reading and writing data to these tags. I've tried various approaches, but I'm having trouble with the writing part. Could you please assist me in understanding how to write text or URLs to these tags? Here's my current code.

 

 

func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {

        print("Connecting To Tag")

             if tags.count > 1 {

            session.alertMessage = "More Than One Tag Detected, Please try again"

            session.invalidate()

            return

        }

        

        let tag = tags.first!

        

        session.connect(to: tag) { error in

            if let error = error {

                session.invalidate(errorMessage: "Connection Failed: \(error.localizedDescription)")

                return

            }

            

            if case let .iso15693(sTag) = tag {

                let textToWrite = "hello"

                

                if let textData = textToWrite.data(using: .utf8) {

                    sTag.writeSingleBlock(requestFlags: [.highDataRate], blockNumber: 0x05, dataBlock: textData) { error in

                        if let error = error {

                            print("Error writing to NFC tag: \(error.localizedDescription)")

                        } else {

                            print("Data successfully written to NFC tag.")

                        }

                        session.invalidate()

                    }

                } else {

                    print("Error encoding text to data")

                    session.invalidate()

                }

            }

        }

    }

0 件の賞賛
返信
3,946件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Rega32 ,

 

The spec should be clear on the definition of SET EAS and  RESET EAS, but would you specify what is your question regarding these two commands?

 

Thanks for your patience!

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
3,938件の閲覧回数
Rega32
Contributor I

Thank you for your reply.

I solved this problem. 

my code had mistake.

Sorry for my hastry question.

 

0 件の賞賛
返信