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_demo2 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.<br/>Whereas <CODE>cec_demo1</CODE> is used to verify each API operation separately, <CODE>cec_demo2</CODE> is an application sample to send and receive simple messages using StreetPass.
17   </p>
18</div>
19
20<h2>Required Environment</h2>
21
22<div class="section">
23<p>None.</p>
24</div>
25
26<h2>How to Use</h2>
27
28<div class="section">
29    <br/>
30
31StreetPass Box Generation Screen
32    <table>
33        <thead>
34        <tr>
35<th>Input</th>
36<th>Operation</th>
37        </tr>
38        </thead>
39        <tr>
40<td>A Button.</td>
41<td>Creates the StreetPass box.<br/>Transitions to the Write Send Message screen.</td>
42        </tr>
43        <tr>
44<td>Close the system.</td>
45<td>The system will enter Sleep Mode. Opening the system restores it to the waking state.</td>
46        </tr>
47    </table>
48    <br />
49
50Write Send Message screen
51    <table>
52    <thead>
53        <tr>
54<th>Input</th>
55<th>Operation</th>
56        </tr>
57    </thead>
58    <tr>
59<td>A Button.</td>
60<td>Adds a message to the outbox.<br/>Transitions to the Read Received Message screen.</td>
61    </tr>
62    <tr>
63<td>B Button.</td>
64<td>Deletes the StreetPass box.<br/>Transitions to the Create StreetPass Box screen.</td>
65    </tr>
66    <tr>
67<td>+Control Pad Left/Right</td>
68<td>Select the title and body to write to the send message.</td>
69    </tr>
70    </table>
71    <br/>
72
73Read Received Message screen
74    <table>
75        <thead>
76            <tr>
77<th>Input</th>
78<th>Operation</th>
79            </tr>
80        </thead>
81        <tr>
82<td>B Button.</td>
83            <td>
84Deletes all messages in the outbox.<br/>Transitions to the Write Send Message screen.
85            </td>
86        </tr>
87        <tr>
88<td>X Button.</td>
89            <td>
90Deletes all read messages in the inbox.
91            </td>
92        </tr>
93        <tr>
94<td>Y Button.</td>
95            <td>
96Loads a message from the inbox.<br/>Deletes sent messages from the outbox.<br/>
97            </td>
98        </tr>
99        <tr>
100<td>+Control Pad Up/Down</td>
101            <td>
102Selects a read message from the inbox.<br/>The title and content of the selected message are displayed.
103            </td>
104        </tr>
105    </table>
106</div>
107
108<h2>Notes</h2>
109
110<div class="section">
111    <ul>
112<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>
113    </ul>
114
115    <ul>
116<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>
117    </ul>
118
119    <p class="notice">
120Use the <CODE>CecLotcheckTool</CODE> included in the CTR-SDK to reset the list of the CTRs that are performing StreetPass.
121    </p>
122
123    <ul>
124<li>You cannot restart communications with a previous StreetPass partner for an average of 4 hours (maximum of 8 hours).<br />To restart communication after a shorter time interval, you must execute <CODE>CecControl::StartScanning(true)</CODE>. You must use the Config tool to switch to debugging mode (set <CODE>Debug Mode</CODE> to <CODE>true</CODE>) in order to use the <CODE>StartScanning(true)</CODE> function embedded in this demo application.</li>
125    </ul>
126
127    <ul>
128<li>The CTR system might not switch to StreetPass mode after configuring a wireless access point. Be sure to run the StreetPass communication demo in Sleep Mode in this case.</li>
129    </ul>
130    <ul>
131<li>You can confirm whether StreetPass data has been received under the Data Management section of the HOME Menu.</li>
132    </ul>
133</div>
134
135<h2>Execution Procedure</h2>
136
137    <div class="section">
138        <p>
139This section describes the procedure required when using two CTR systems. Perform the same steps on both systems. The following <B>Create StreetPass Box Screen</B> is displayed when the demo is run. If a StreetPass Box has already been created, then the screen transitions to the <B>Write Send Message Screen</B>.
140        </p>
141
142
143<pre class="code">
144PRESS A TO CREATE MESSAGEBOX
145
146
147
148
149
150
151
152
153
154</pre>
155<pre class="code">
156
157
158
159
160
161
162
163
164
165A:CREATE_BOX
166</pre>
167        <p>
168When the A Button is pressed on the <B>Create StreetPass Box Screen</B>, a new StreetPass box is created. If a StreetPass Box already exists, the existing box is used. When processing completes, the <B>Write Send Message Screen</B> is displayed as shown below. If there already is a message written in the outbox, then the screen transitions to the <B>Write Received Message Screen</B>.
169        </p>
170
171<pre class="code">
172AT FIRST,  PRESS LEFT/RIGHT TO SELECT CONTENT
173AT SECOND, PRESS A TO SET SEND MESSAGE
174
175
176
177
178
179
180
181
182
183</pre>
184<pre class="code">
185TITLE:Japan
186-----------------BODY-----------------
187AREA       377,887 sq km
188POPULATION 127,508,000
189CAPITAL    Tokyo
190LANGUAGE   Japanese
191CURRENCY   yen
192
193A:SET MESSAGE B:DELETE_BOX
194LEFT/RIGHT:SELECT_CONTENT
195</pre>
196
197        <p>
198An outbox and inbox exist in the StreetPass Box. With the <B>Write Send Message Screen</B>, a message is written to the outbox. A message can be selected by pressing the LEFT/RIGHT buttons on the +Control Pad and then written to the outbox by pressing the A button. When finished writing, the following <B>Read Received Message Screen</B> is displayed. The B Button can also be pressed to delete the StreetPass Box and return to the <B>Create StreetPass Box Screen</B>.
199        </p>
200
201<pre class="code">
202----------------------------------INBOX
203TITLE         ReceiveDate
204
205
206
207
208
209--------------------------------OUTBOX
210TITLE         CreateDate
211Japan         20xx/xx/xx xx:xx xx.xxx
212</pre>
213<pre class="code">
214TITLE:
215-----------------BODY-----------------
216
217
218
219
220
221
222Y:RECEIVE_MESSAGE X:DELETE_MESSAGE
223B:BACK UP/DOWN:SELECT_MESSAGE
224</pre>
225
226        <p>
227In the R<B>ead Received Message Screen</B>, messages in the inbox are read. The upper screen displays a list of read messages and messages written to the outbox. The lower screen shows the content of the received message. With the <B>Read Received Message Screen</B> displayed, the following alert is displayed on the lower screen when discovering a partner's CTR and then communicating with it. This alert is a notification that a message is in the inbox.
228        </p>
229
230<pre class="code">
231TITLE:
232-----------------BODY-----------------
233
234
235          ///NEW MESSAGE///
236      PRESS Y TO RECEIVE MESAGE
237
238
239A:SET MESSAGE B:DELETE_BOX
240LEFT/RIGHT:SELECT_CONTENT
241</pre>
242
243        <p>
244If the Y button is pressed while the alert is displayed, the message in the inbox is loaded to the demo application and then can be displayed in the inbox list. At the same time, the message in the inbox is deleted. Messages in the outbox are also updated, and messages that have been sent are deleted. When the B Button is pressed to return to the <B>Write Send Message Screen</B>, the message in the outbox is deleted at the same time.<br/>By writing a message to the outbox from the <B>Write Send Message Screen</B>, StreetPass communication is performed again. However, you must wait up to 8 hours to exchange data again with the same communication peer. Switch to debugging mode to verify if StreetPass is working in a shorter amount of time. (See the Notes section.)<br/> When there are two or more messages in the received list, the UP/DOWN buttons on the +Control Pad can be used to select and confirm message content from the inbox list. For messages in rows displayed in green in the message list, the content is shown on the lower screen, a description of the message in TITLE, and the data in BODY.
245        </p>
246
247<pre class="code">
248----------------------------------INBOX
249TITLE         ReceiveDate
250Italy         20xx/xx/xx xx:xx xx.xxx
251France        20xx/xx/xx xx:xx xx.xxx
252<div style="color:green">United States 20xx/xx/xx xx:xx xx.xxx</div>
253
254
255--------------------------------OUTBOX
256TITLE         CreateDate
257Japan         20xx/xx/xx xx:xx xx.xxx
258</pre>
259<pre class="code">
260TITLE:United States
261-----------------BODY-----------------
262AREA       9,826,630 sq km
263POPULATION 291,512,000
264CAPITAL    Washington D.C.
265LANGUAGE   English, Spanish
266CURRENCY   US dollar
267
268A:SET MESSAGE B:DELETE_BOX
269LEFT/RIGHT:SELECT_CONTENT
270</pre>
271
272
273        <p>
274Press the X Button to delete all received messages that have been read. The demo application can only handle a maximum of 25 messages, so delete them periodically.
275        </p>
276
277    </div>
278
279<h2>Revision History</h2>
280
281<div class="section">
282    <dl class="history">
283        <dt>2011/04/14</dt>
284<dd>Added explanation that <CODE>StartScanning(true)</CODE> is enabled in debugging mode.</dd>
285        <dt>2011/03/09</dt>
286<dd>Updated documentation to match the latest sample messages.</dd>
287        <dt>2011/02/16</dt>
288<dd>Initial version.</dd>
289    </dl>
290</div>
291
292
293<hr><p>CONFIDENTIAL</p></body>
294</html>