Smartcard tutorial change : TC_PRT -> dlog_print
authorJihoon Jung <jh8801.jung@samsung.com>
Wed, 23 Sep 2015 02:19:29 +0000 (11:19 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Wed, 23 Sep 2015 02:20:13 +0000 (11:20 +0900)
Signed-off-by: Ji-hoon Jung <jh8801.jung@samsung.com>
Change-Id: I37e1f4c2af0a1439fad8cfe48d9e7fc07d03d09c

org.tizen.tutorials/html/native/network/smartcard_tutorial_n.htm

index 60c27a9..ebc0ad5 100644 (file)
@@ -89,9 +89,9 @@ int ret;
 ret = smartcard_initialize();
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard initialize successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard initialize successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard initialize failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard initialize failed&quot;);
 </pre>
 <p>The service is no longer needed, deinitialize it:</p>
 <pre class="prettyprint">
@@ -99,9 +99,9 @@ int ret;
 ret = smartcard_deinitialize();
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard deinitialize successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard deinitialize successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard deinitialize failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard deinitialize failed&quot;);
 </pre>
 </li>
 
@@ -114,15 +114,12 @@ ret = smartcard_get_readers(&amp;phReaders, &amp;pLength);
 
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_get_readers successful&quot;);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;readers length : %d&quot;, pLength);
-&nbsp;&nbsp;&nbsp;if (pLength &gt; 0) {
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;reader handle : %d&quot;, phReaders[0]);
-&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_get_readers successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;readers length : %d&quot;, pLength);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_get_readers failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_get_readers failed : %d&quot;, ret);
 }
 
 if(phReaders != NULL)
@@ -144,12 +141,12 @@ char * pReader = NULL;
 ret = smartcard_reader_get_name(reader, &amp;pReader);
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_get_name successful&quot;);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;reader name : %s&quot;, pReader);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_get_name successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;reader name : %s&quot;, pReader);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_get_name failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_get_name failed : %d&quot;, ret);
 }
 </pre>
 </li>
@@ -163,12 +160,12 @@ bool is_present = false;
 ret = smartcard_reader_is_secure_element_present(reader, &amp;is_present);
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_is_secure_element_present successful&quot;);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;reader secure element present : %d&quot;, is_present);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_is_secure_element_present successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;reader secure element present : %d&quot;, is_present);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_is_secure_element_present failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_is_secure_element_present failed : %d&quot;, ret);
 }
 </pre>
 </li>
@@ -186,16 +183,16 @@ if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;ret = smartcard_reader_close_sessions(reader);
 &nbsp;&nbsp;&nbsp;if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_close_sessions successful&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_close_sessions successful&quot;);
 &nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;else
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_reader_close_sessions failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_reader_close_sessions failed : %d&quot;, ret);
 &nbsp;&nbsp;&nbsp;}
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;open session failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;open session failed : %d&quot;, ret);
 }
 </pre></li>
 </ol>
@@ -215,12 +212,12 @@ ret = smartcard_session_get_reader(session, &amp;reader);
 ret = smartcard_reader_get_name(reader, &amp;pReader);
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_get_reader successful&quot;);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;reader name : %s&quot;, pReader);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_get_reader successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;reader name : %s&quot;, pReader);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_get_reader failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_get_reader failed&quot;);
 }
 </pre></li>
 <li>Retrieve the answer to reset (ATR) of the SE:
@@ -234,13 +231,13 @@ ret = smartcard_session_get_atr(session, &amp;pAtr, &amp;pLength);
 
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_get_atr successful : %d&quot;, pLength);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_get_atr successful : %d&quot;, pLength);
 &nbsp;&nbsp;&nbsp;for (i = 0; i &lt; pLength; i++)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;%x &quot;, (int)pAtr[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;%x &quot;, (int)pAtr[i]);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_get_atr failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_get_atr failed&quot;);
 }
 </pre></li>
 <li>Open a basic or logical channel.
@@ -254,17 +251,17 @@ int channel;
 ret = smartcard_session_open_basic_channel(session, aid, 4, 0x00, &amp;channel);
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_open_basic_channel successful : %d&quot;, channel);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_open_basic_channel successful : %d&quot;, channel);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_open_basic_channel failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_open_basic_channel failed&quot;);
 
 // Open logical channel
 ret = smartcard_session_open_logical_channel(session, aid, 12, 0x04, &amp;channel);
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_open_logical_channel successful : %d&quot;, (channel);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_open_logical_channel successful : %d&quot;, (channel);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_open_logical_channel failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_open_logical_channel failed : %d&quot;, ret);
 </pre>
 </li>
 <li>Close all channels opened for a specific session:
@@ -274,9 +271,9 @@ int ret;
 ret = smartcard_session_close_channels(session);
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_close_channels successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_close_channels successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_close_channels failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_close_channels failed&quot;);
 </pre>
 </li>
 <li>Close a session and check that it is truly closed:
@@ -288,16 +285,16 @@ bool is_closed;
 ret = smartcard_session_close(session);
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_close successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_close successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_close failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_close failed&quot;);
 
 ret = smartcard_session_is_closed(session, &amp;is_closed);
 
 if (ret == SMARTCARD_ERROR_NONE &amp;&amp; is_closed == true)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_is_closed successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_is_closed successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_session_is_closed failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_session_is_closed failed&quot;);
 </pre>
 </li></ul>
 
@@ -318,9 +315,9 @@ if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;ret = smartcard_channel_get_session(channel, &amp;session_handle);
 
 &nbsp;&nbsp;&nbsp;if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_get_session successful: %d&quot;, session_handle);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_get_session successful: %d&quot;, session_handle);
 &nbsp;&nbsp;&nbsp;else
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_get_session failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_get_session failed&quot;);
 }
 </pre></li>
 
@@ -332,9 +329,9 @@ bool is_basic;
 ret = smartcard_channel_is_basic_channel(channel, &amp;is_basic);
 
 if (ret == SMARTCARD_ERROR_NONE &amp;&amp; is_basic == false)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_is_basic_channel successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_is_basic_channel successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_is_basic_channel failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_is_basic_channel failed&quot;);
 </pre></li>
 
 <li>Select the next applet on the specific channel that matches to the partial Application ID (AID):
@@ -345,9 +342,9 @@ if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;bool is_next = true;
 &nbsp;&nbsp;&nbsp;ret = smartcard_channel_select_next(channel, &amp;is_next);
 &nbsp;&nbsp;&nbsp;if (ret == SMARTCARD_ERROR_NONE &amp;&amp; is_next == false)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_select_next successful&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_select_next successful&quot;);
 &nbsp;&nbsp;&nbsp;else
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_select_next failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_select_next failed&quot;);
 }
 </pre>
 <p>To get a response for the selection command, use the <span style="font-family: Courier New,Courier,monospace;">smartcard_channel_get_select_response()</span> function:</p>
@@ -360,13 +357,13 @@ ret = smartcard_channel_get_select_response(channel, &amp;pSelectResponse, &amp;
 
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_get_select_response successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_get_select_response successful&quot;);
 &nbsp;&nbsp;&nbsp;for (i = 0; i &lt; pLength; i++)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g_print(&quot;%x &quot;, (int)pSelectResponse[i]);
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_get_select_response failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_get_select_response failed&quot;);
 }
 </pre>
 </li>
@@ -381,9 +378,9 @@ ret = smartcard_channel_close(channel);
 ret = smartcard_channel_is_closed(channel, &amp;is_close);
 
 if (ret == SMARTCARD_ERROR_NONE &amp;&amp; is_close == true)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_is_closed successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_is_closed successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_is_closed failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_is_closed failed&quot;);
 </pre>
 </li>
 <li>Close the channel opened for a specific SE:
@@ -394,9 +391,9 @@ int ret;
 ret = smartcard_channel_close(channel);
                         
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_close successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_close successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_close failed : %d&quot;, ret);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_close failed : %d&quot;, ret);
 </pre>
 </li>
 <li>Transmit an APDU command (as per ISO/IEC 7816-4) to the SE:
@@ -412,15 +409,15 @@ ret = smartcard_channel_transmit(channel, command, 4, &amp;response, &amp;resp_l
 
 if (ret == SMARTCARD_ERROR_NONE)
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit successful&quot;);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;response is &quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;response is &quot;);
 &nbsp;&nbsp;&nbsp;for (i = 0; i &lt; resp_len; i++)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;%x &quot;, (int)response[i]);
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;\n&quot;); 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;%x &quot;, (int)response[i]);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\n&quot;); 
 }
 else
 {
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit failed&quot;);
 }
 </pre>
 <p>To get a response for the transmission, use the <span style="font-family: Courier New,Courier,monospace;">smartcard_channel_transmit_retrieve_response()</span> function:</p>
@@ -436,15 +433,15 @@ if (ret == SMARTCARD_ERROR_NONE)
 
 &nbsp;&nbsp;&nbsp;if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit_get_response successful&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;response is &quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit_get_response successful&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;response is &quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; pLength; i++)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;%x &quot;, (int)ptransmitResponse[i]);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;\n&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;%x &quot;, (int)ptransmitResponse[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;\n&quot;);
 &nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;else
 &nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit_get_response failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit_get_response failed&quot;);
 &nbsp;&nbsp;&nbsp;}
 }
 </pre>
@@ -470,9 +467,9 @@ int resp_len = 50;
 
 ret = smartcard_initialize();
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard initialize successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard initialize successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard initialize failed&quot;);</pre>
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard initialize failed&quot;);</pre>
 </li>
 
 <li>Get the available readers:
@@ -501,15 +498,15 @@ if (ret == SMARTCARD_ERROR_NONE &amp;&amp; pLength != 0)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret = smartcard_channel_transmit(channel, command, 4, &amp;response, &amp;resp_len);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (ret == SMARTCARD_ERROR_NONE)
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit successful&quot;);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;response is &quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit successful&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;response is &quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; resp_len; i++)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;%x &quot;, (int)response[i]);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;\n&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;%x &quot;, (int)response[i]);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG,&quot;\n&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard_channel_transmit failed&quot;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard_channel_transmit failed&quot;);
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
 &nbsp;&nbsp;&nbsp;}</pre>
@@ -525,9 +522,9 @@ if (ret == SMARTCARD_ERROR_NONE &amp;&amp; pLength != 0)
 ret = smartcard_deinitialize();
 
 if (ret == SMARTCARD_ERROR_NONE)
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard deinitialize successful&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard deinitialize successful&quot;);
 else
-&nbsp;&nbsp;&nbsp;TC_PRT(&quot;smartcard deinitialize failed&quot;);
+&nbsp;&nbsp;&nbsp;dlog_print(DLOG_INFO, LOG_TAG, &quot;smartcard deinitialize failed&quot;);
 </pre>
 </li>