1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
4<head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta http-equiv="Content-Style-Type" content="text/css" />
7    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
8</head>
9<body>
10
11<h1>cec - cec_demo1 Demo</h1>
12
13<h2>Description</h2>
14
15<div class="section">
16    <p>This sample runs the daemon for communication via StreetPass.<BR> The demo sets data in the StreetPass box, searches for a StreetPass partner, and exchanges data. <BR> At least two CTR systems are required to run this demo.</p>
17</div>
18
19<h2>Required Environment</h2>
20
21<div class="section">
22    <p>None.</p>
23</div>
24
25<h2>How to Use</h2>
26
27<div class="section">
28    <table>
29        <thead>
30        <tr>
31            <th>Input</th>
32            <th>Operation</th>
33        </tr>
34        </thead>
35        <tr>
36            <td>A Button</td>
37            <td>Adds one instance of data to the outbox.<br /> To add data, the StreetPass box must already be open.</td>
38        </tr>
39        <tr>
40            <td>B Button</td>
41            <td>Displays the current usage status of the inbox and outbox.<BR> To display status, the StreetPass box must already be open.</td>
42        </tr>
43        <tr>
44            <td>Up on the +Control Pad</td>
45            <td>Opens the StreetPass box.</td>
46        </tr>
47        <tr>
48            <td>Down on the +Control Pad</td>
49            <td>Closes the StreetPass box.</td>
50        </tr>
51        <tr>
52            <td>X Button</td>
53            <td>Deletes one message in the outbox. Messages are deleted beginning from the top of the outbox.</td>
54        </tr>
55        <tr>
56            <td>Y Button</td>
57            <td>Deletes all messages in the inbox. </td>
58        </tr>
59        <tr>
60            <td>START Button</td>
61            <td>The demo closes after all data in the StreetPass box is deleted.</td>
62        </tr>
63        <tr>
64            <td>Close the system</td>
65            <td>The system will enter Sleep Mode. Opening the system restores it to the waking state.</td>
66        </tr>
67    </table>
68</div>
69
70<h2>Notes</h2>
71
72<div class="section">
73    <ul>
74        <li>The <B>Agree Version</B> must be set to 1.0 or higher using the <B>Eula Setting</B> of the Config tool before using this demo.<BR> If not set, the LED will not flash and communication will not be carried out, even if StreetPass starts.</li>
75    </ul>
76
77    <ul>
78        <li>If communication via StreetPass has been restricted by Parental Controls settings, the StreetPass daemon will not work. <BR> Be sure to set this using the <B>Ctr Info Setting</B> of the Config tool before running the demo.</li>
79    </ul>
80
81    <ul>
82        <li>When using StreetPass, once StreetPass information has been exchanged between parties, it takes an average of four hours (and a maximum of eight hours) to perform StreetPass communication again with that party.<br /> Both systems must be reset by implementing <CODE>StartScanning(true)</CODE> or a similar operation in order to communicate again.  However, resets are only enabled for <CODE>StartScanning(true)</CODE> when in debugging mode (when <CODE>DebugMode</CODE> is set to <CODE>true</CODE> in the Config tool).</li>
83    </ul>
84
85    <p class="notice">Use $CTR-SDK/tools/TargetTools/CTR-TS/Development/CecLotcheckTool.[cia|csu] to reset the list of the CTR that is performing StreetPass.</p>
86
87    <ul>
88        <li>Sometimes the StreetPass sample demo cannot run normally if a wireless access point setting has been made for the CTR system. <BR> Be sure to run the StreetPass communication demo in Sleep Mode in this case.</li>
89    </ul>
90    <ul>
91        <li>You can confirm whether StreetPass data has been received under the Data Management section of the HOME Menu.</li>
92    </ul>
93</div>
94
95<h2>Execution Procedure</h2>
96
97<div class="section">
98    <p>This section describes the procedure required when using two CTR systems. Perform the same steps on both systems.</p>
99    <p>The following log is displayed when the demo is run.</p>
100
101    <pre class="code">START: nnMain @ c:\SampleDemos\cec\cec_demo1\cec_Main.cpp (Build: Dec 17 2010 09:41:23)
102Cec: nn::cec::Initialize()
103---- Cec Demo ----
104A: Write data
105B: Show box data
106UP   : Open  Box
107DOWN : Close Box
108X    : Delete OutBox Message
109Y    : Delete All InBox Messages
110START: Delete Box and Exit
111-------------------</pre>
112
113    <p>StreetPass communication is not carried out if there is no StreetPass data in the outbox.<BR> First, press Up on the +Control Pad to open the StreetPass box.<BR> A log such as the following is displayed.
114</p>
115
116<pre class="code">Cec: Open MessageBox
117CecTest_CreateAndOpenBox : START
118CecTest_CreateAndOpenBox(158): Open Box[0x01223300] Failed.
119CecTest_CreateAndOpenBox(161): Box Not Found. -&gt; Create [0x01223300]
120CecTest_CreateAndOpenBox(216): Open Box [0x01223300].
121CecTest_CreateAndOpenBox : END</pre>
122
123    <p>Next, press the A Button to add StreetPass data to the outbox.<BR> A log such as the following is displayed.</p>
124
125    <pre class="code">CecTest_CreateMessage : START
126Put Mess OutBox[223C5DC2AC03C352]
127CecTest_CreateMessage : END</pre>
128
129    <p>Press the B Button to confirm that the data has been registered to the outbox.<BR> A log such as the following is displayed.</p>
130
131     <pre class="code">GetMessageBoxInfoFlag: 0x01
132GetBoxSizeMax: 		IN: 524288		OUT: 524288
133GetBoxSize:    		IN:      0		OUT:  36256
134GetMessNumMax: 		IN:     99		OUT:     99
135GetMessNum:    		IN:      0		OUT:      1
136GetGroupNumMax:		IN:     99		OUT:     99
137 OUTBOX Message[0]
138  GetMessageMessId [223C5DC2AC03C352]
139  GetMessageMessSize:         36256
140  GetMessageBodySize:         32768
141  GetMessageGroupId:          0
142  GetMessageSessionId:        0
143  GetMessageMessTypeFlag:     0x01
144  GetMessageSendMode:         0x03
145  GetMessageSendCount:        255
146  GetMessagePropagationCount: 1
147  GetMessIndex:               0</pre>
148
149    <p>Check that StreetPass data has been registered to the outbox, and then press Down on the +Control Pad to close the StreetPass box.</p>
150
151    <pre class="code">Cec: Close MessageBox</pre>
152
153    <p>StreetPass communication will start. <BR> After StreetPass starts, the wireless LED indicator will start flashing for several seconds. Do nothing during this period. <BR> When StreetPass communication occurs, a log such as the following is displayed.</p>
154
155    <pre class="code">============= Receive Check!!!!!! =============
156&lt;&lt;AWAKE&gt;&gt;
157 Recv Count:[1] Num:[1]
158(00)[2011/01/01(6) 00:29:43.0946][0x01223300][HoE7P-B-988]
159=============================================== </pre>
160
161    <p>Press Up on the +Control Pad to open the StreetPass box.。<br /> After that, press the B Button to confirm that StreetPass data has been received in the inbox of the receiving CTR.<br /> A log such as the following is displayed. <br /> The following log shows that one instance of data has been registered to the outbox and one to the inbox.</p>
162
163    <pre class="code">Cec: Open MessageBox
164CecTest_CreateAndOpenBox : START
165CecTest_CreateAndOpenBox(216): Open Box [0x01223300].
166CecTest_CreateAndOpenBox : END
167 ===== (00) messageId [1E813B3FF07FF7CF]
168  Icon size:3200
169   Len[32]----------
170    55 55 55 55 55 55 55 55  55 55 55 55 55 55 55 55  UUUUUUUU UUUUUUUU
171    55 55 55 55 55 55 55 55  55 55 55 55 55 55 55 55  UUUUUUUU UUUUUUUU
172
173   ----------
174  Info Str: Message:CEC_DEMO_1
175  Send Count: 255
176  Propagation Count: 0
177  Data body Size: 32768
178   Len[32]----------
179    04 04 04 04 04 04 04 04  04 04 04 04 04 04 04 04  ........ ........
180    04 04 04 04 04 04 04 04  04 04 04 04 04 04 04 04  ........ ........
181
182   ----------
183GetMessageBoxInfoFlag: 0x01
184GetBoxSizeMax: 		IN: 524288		OUT: 524288
185GetBoxSize:    		IN:  36256		OUT:  36256
186GetMessNumMax: 		IN:     99		OUT:     99
187GetMessNum:    		IN:      1		OUT:      1
188GetGroupNumMax:		IN:     99		OUT:     99
189 INBOX Message[0]
190  GetMessageMessId [1E813B3FF07FF7CF]
191  GetMessageMessSize:         36256
192  GetMessageBodySize:         32768
193  GetMessageGroupId:          0
194  GetMessageSessionId:        1434417002
195  GetMessageMessTypeFlag:     0x01
196  GetMessageSendMode:         0x03
197  GetMessageSendCount:        255
198  GetMessagePropagationCount: 0
199  GetMessIndex:               0
200 OUTBOX Message[0]
201  GetMessageMessId [223C5DC2AC03C352]
202  GetMessageMessSize:         36256
203  GetMessageBodySize:         32768
204  GetMessageGroupId:          0
205  GetMessageSessionId:        0
206  GetMessageMessTypeFlag:     0x01
207  GetMessageSendMode:         0x03
208  GetMessageSendCount:        255
209  GetMessagePropagationCount: 1
210  GetMessIndex:               0</pre>
211
212
213    <p>After confirming that data has been exchanged via StreetPass, end the demo.<BR> To delete all data in the StreetPass box and then end the demo, press the START button. A log such as the following is displayed at this time.</p>
214
215    <pre class="code">Cec: delete Box
216Cec: END : nnMain @ c:\SampleDemos\cec\cec_demo1\cec_Main.cpp</pre>
217
218
219</div>
220
221<h2>Revision History</h2>
222
223<div class="section">
224    <dl class="history">
225        <dt>2011/04/14</dt>
226        <dd>Added explanation that <CODE>StartScanning(true)</CODE> is enabled in debugging mode.</dd>
227        <dt>2011/02/16</dt>
228        <dd>Added that the <CODE>CecLotcheckTool</CODE> is included in the SDK package.</dd>
229        <dt>2011/02/02</dt>
230        <dd>Initial version.</dd>
231    </dl>
232</div>
233
234
235<hr><p>CONFIDENTIAL</p></body>
236</html>