×
Namespaces

Variants
Actions
(Difference between revisions)

Deactivate NVC connection to NFC Tag type 4 before closing to avoid app crash (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
mahbub_s60 (Talk | contribs)
(Mahbub s60 -)
hamishwillee (Talk | contribs)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
[[Category:Near Field Communication (NFC)]][[Category:Qt Mobility]][[Category:Code Snippet]][[Category:Symbian]][[Category:Known Issue]]
 
[[Category:Near Field Communication (NFC)]][[Category:Qt Mobility]][[Category:Code Snippet]][[Category:Symbian]][[Category:Known Issue]]
{{Abstract|This article provides a workaround to avoid application crashes when closing the connection to an NFC Tag Type 4 on Symbian Belle.}}
+
{{Abstract|This article provides a workaround to avoid application crashes when closing the connection to an NFC Tag Type 4 on Nokia Belle.}}
  
 
{{ArticleMetaData <!-- v1.1 -->
 
{{ArticleMetaData <!-- v1.1 -->
Line 27: Line 27:
  
 
== Introduction ==
 
== Introduction ==
When an NFC tag is lost/separated from the device a handler should be called to close the connection. Due to a bug in the NFC implementation on Symbian Belle, we need to first deactivate the connection before closing it, or the application will panic.
+
When an NFC tag is lost/separated from the device a handler should be called to close the connection. Due to a bug in the NFC implementation on Nokia Belle, we need to first deactivate the connection before closing it, or the application will panic.
 
+
The bug is fixed in the mainline and should appear in firmware  in future released.  
+
  
 
== How to produce the bug ==
 
== How to produce the bug ==
 
# Implement your code to handle the tag lost event as below. Note that this is the ''correct'' way to handle the event:
 
# Implement your code to handle the tag lost event as below. Note that this is the ''correct'' way to handle the event:
#: <code cpp>
+
#: <code cpp-qt>
 
void CNfcHandler::TagLost()  
 
void CNfcHandler::TagLost()  
 
{  
 
{  
Line 48: Line 46:
 
== Workaround ==
 
== Workaround ==
  
The following code can be used to workaround this crash on Symbian Belle:
+
The following code can be used to workaround this crash on Nokia Belle:
  
<code cpp>
+
<code cpp-qt>
 
void CNfcHandler::TagLost()  
 
void CNfcHandler::TagLost()  
 
{  
 
{  
Line 63: Line 61:
  
 
== Device SW used to test==
 
== Device SW used to test==
Use C7 with FW 022.013  and FW022.014
+
* C7 with FW 022.013  and FW022.014
 +
 
 +
Note, this is tracked internally as "Failure 880652: [mcl]NFC 3rd party application crashes"

Latest revision as of 04:23, 11 October 2012

This article provides a workaround to avoid application crashes when closing the connection to an NFC Tag Type 4 on Nokia Belle.

Article Metadata
Tested with
Devices(s): Nokia C7 (firmware FW 022.013 and FW022.014)
Compatibility
Platform(s):
Symbian
Article
Created: mahbub_s60 (06 Feb 2012)
Last edited: hamishwillee (11 Oct 2012)

Contents

[edit] Introduction

When an NFC tag is lost/separated from the device a handler should be called to close the connection. Due to a bug in the NFC implementation on Nokia Belle, we need to first deactivate the connection before closing it, or the application will panic.

[edit] How to produce the bug

  1. Implement your code to handle the tag lost event as below. Note that this is the correct way to handle the event:
    void CNfcHandler::TagLost() 
    {
    iTag->CloseConnection(*iIso14443Connection);
    delete iIso14443Connection;
    iIso14443Connection = 0;
    }
  2. Run the application
  3. Touch an NFC tag type 4 to the device (for example, a Nokia C7) and then remove it

The NFC app is closed due to a panic (Symbian unexpected exception).

[edit] Workaround

The following code can be used to workaround this crash on Nokia Belle:

void CNfcHandler::TagLost() 
{
if(iIso14443Connection->IsActivated()) {
iIso14443Connection->Deactivate();
}
iTag->CloseConnection(*iIso14443Connection);
delete iIso14443Connection;
iIso14443Connection = 0;
}

[edit] Device SW used to test

  • C7 with FW 022.013 and FW022.014

Note, this is tracked internally as "Failure 880652: [mcl]NFC 3rd party application crashes"

This page was last modified on 11 October 2012, at 04:23.
117 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×