cancel
Showing results for 
Search instead for 
Did you mean: 

How the FW update demo works on the IOS ST25 App?

Hi,

I am working on a project with a STM32 + ST25DV NFC tag + mobile app, I developed a bootloader that receives the new binary through FTM and it works well with the app we are developing (using the transceive API from Android), but we are having trouble making it work on IOS, the person that was developing the app does not have any experience with swift and the app is being developed in Flutter, using a plugin to translate the actions to native API (like the transceive), it is partially working but with some annoying limitations:

  • The IOS NFC window is always on the front while the NFC transaction happens, not allowing to display any progress bar
  • The IOS NFC section seems to have a timeout of around 30s, after that the sending process is interrupted, this is our major bottleneck

I saw in the IOS version of the ST25 app that it allows the fw update demo, but I don't have the NFC demo kit now (we used only NFC04 and nucleo64 boards for development), I also searched online for a video showing how the IOS version of the app behaves during the fw update demo, but could not find...

And I tried inspecting the IOS ST25 source code, but, as I said, no one here has any experience with swift and I could not understand how things are done there..

So here are my questions:

  • How the demo works on IOS when transferring big binaries which takes more than 40s to complete?
  • Is there any video of this fw update demo running on the IOS APP? so I could at least see how ST managed it, if not, could someone from ST be kindly enough to record it and post here?
  • If necessary I will buy the demo board just to see how the fw update routine works, could someone from ST tell me which demo board(s) are indicated to test the fw update demo from the st25 app?

Thanks

Gustavo

1 ACCEPTED SOLUTION

Accepted Solutions
victor laraison
ST Employee

Hi gustavo,

Sorry for my late reply...I just have been notified ...

Regarding your questions :

  • For big binary transfer, we detect the coreNFC Timeout Session. We save the address "pointer" of buffer to write, then wait a short time before restarting coreNFC session and buffer transmission.

If you have a look into ST25DVFirmwareUpdateViewController.swift file, line 571, we handles the Timeout session as follow :

"if errorNFC.code == NFCReaderError.readerSessionInvalidationErrorSessionTimeout {

      // session Timeout detected

      // restart a session to continu

      DispatchQueue.main.sync {

        transfertOnGoingAlert()

      }

      if (mTaskToDo == .startTransfer || mTaskToDo == .resume ) {

        mTransferTask?.pause()

         self.miOSReaderSession = iOSReaderSession(atagReaderSessionViewControllerDelegate: self)

         continuTransferSession()

      }

     }

"

  • We have a video showing how transferring a picture from Tag into iPhone : it uses same mechanism as FW binary file. I have attached here the video.

  • For the board, I will forward request to board responsible

For information :

in iOS NFC Tap application, FW update uses 3 files :

  • controller/ST25DVFirmwareUpdateViewController.swift : it is the main entry point of FW update Demo in iOS. It handles the storyboard , and uses the ComStSt25pcModelST25DVTransferTask.
  • st25sdklib\include\com\st\st25pc\model\ST25DVTransferTask.m : it is a javaToObjc Translated file. So, it is quite obscure to read and understand !!! But it contains all the algorithm and protocol for FW update.
  • I have attached here the JAVA file used before translation into ObjectiveC : hope it will help to better undertand !! !more readable !!
  •  

Hope all these information help you.

Thx and br,

View solution in original post

4 REPLIES 4
victor laraison
ST Employee

Hi gustavo,

Sorry for my late reply...I just have been notified ...

Regarding your questions :

  • For big binary transfer, we detect the coreNFC Timeout Session. We save the address "pointer" of buffer to write, then wait a short time before restarting coreNFC session and buffer transmission.

If you have a look into ST25DVFirmwareUpdateViewController.swift file, line 571, we handles the Timeout session as follow :

"if errorNFC.code == NFCReaderError.readerSessionInvalidationErrorSessionTimeout {

      // session Timeout detected

      // restart a session to continu

      DispatchQueue.main.sync {

        transfertOnGoingAlert()

      }

      if (mTaskToDo == .startTransfer || mTaskToDo == .resume ) {

        mTransferTask?.pause()

         self.miOSReaderSession = iOSReaderSession(atagReaderSessionViewControllerDelegate: self)

         continuTransferSession()

      }

     }

"

  • We have a video showing how transferring a picture from Tag into iPhone : it uses same mechanism as FW binary file. I have attached here the video.

  • For the board, I will forward request to board responsible

For information :

in iOS NFC Tap application, FW update uses 3 files :

  • controller/ST25DVFirmwareUpdateViewController.swift : it is the main entry point of FW update Demo in iOS. It handles the storyboard , and uses the ComStSt25pcModelST25DVTransferTask.
  • st25sdklib\include\com\st\st25pc\model\ST25DVTransferTask.m : it is a javaToObjc Translated file. So, it is quite obscure to read and understand !!! But it contains all the algorithm and protocol for FW update.
  • I have attached here the JAVA file used before translation into ObjectiveC : hope it will help to better undertand !! !more readable !!
  •  

Hope all these information help you.

Thx and br,

Hi Victor,

Thank you for the comprehensive answer!

It gives a pretty good overview of the process and where to look, the piece of code that you pointed out shows exactly how it deals with the timeout :thumbs_up:

Could you please attach the JAVA file used to translate into ObjectiveC?

We will jump again into this development soon, all this information will help a lot

Thanks!

victor laraison
ST Employee

hoopppsss...Sorry for forgetting !!!!

Here attached JAVA file.

Hope it helps.

Thx and br,

Thanks!

BR

Gustavo