My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
~~ @version $Revision$ ($Author$) $Date$
~~ See this file format http://maven.apache.org/doxia/references/apt-format.html

------------------
BlueCove test application
------------------


BlueCove test application

This Project is used to test BlueCove. We are using this application in addition to {{{../../tck/}JSR 82 TCK tests}} because it is simple to start and we can add implementation specific cases. There are also automated set of tests {{{../../bluecove-tests/}BlueCove tests}} that are executed during build.

The goals of this project:

* Verify BlueCove communication with other devices

* Verify BlueCove stability using {{{./results.html}long running tests}}

* Simplify the start of {{{https://opensource.motorola.com/sf/sfmain/do/viewProject/projects.jsr82}JSR 82 TCK Agent}} using BlueCove

* Test Bluetooth {{{./speed.html}transfer speed}}

[]

Test application can also be used as simple Bluetooth client for Device and Service Discovery.

Tests contains {{{#MIDlet}MIDlet}} application and {{{#Start}J2SE AWT application}}. We are testing BlueCove before release on WinXP connecting to Nokia, Motorola and Sony Ericsson phones.

Server and Client application can be started directly from this page using Java Web Start.

First Client discovers server. During ServiceSearch client verify the server Service attributes values.
Then client connects to server and sends and receives different types of data. This includes int, long, bytes, byte array, Strings.
This is communication test code {{{http://bluecove.googlecode.com/svn/trunk/bluecove-examples/bluecove-tester/src/main/java/net/sf/bluecove/CommunicationTester.java}CommunicationTester.java}}.
The same functions are called from server and from client. E.g. sendString() and readString(). In first test Client sendString over established connection and server readString. In second the direction is reversed.

For tests you need two devices. One device should run as server another as client. You can switch roles in the application.

There is no fancy GUI! Just communication log windows. While client is running you will see the log like this:

---
Client started...21:52:02
Starting Device inquiry
deviceDiscovered 00123755ae71
Device inquiry took 11 sec
Search Services on Nokia6265i
*found server btspp://00123755ae71:25;authenticate=false;encrypt=false
service Attr found
Common Service Attr OK
Found BlueCove SRV:Nokia6265i
Services Search took 01 sec
Services search completed 02 sec
connect:Nokia6265i btspp://00123755ae71:25;authenticate=false;encrypt=false
connected:1
read server status
test 3 BYTE: OK
...
Test time 01:42:28
*Success:966 Failure:0
---

<<Failure:0>> is good and <<Failure:1>> may be bad.

To see the failure list after app was running for some time select "Print FailureLog" from menu.

---
Client failure 2
21:59:24 Nokia6265i test 3 java.io.IOException: Failed to connect
00:21:32 Nokia6265i test 3 BYTE junit.framework.AssertionFailedError: Server reply expected:<77> but was:<-1>
Server failure 0
---


* {Start} BlueCove tester Web Start

You can start Java Web Start with MIDlet application and see how it communicates with application running on another computer or cell phone. <<<{{{../bluecove-webstart/open-local/~/bluecove-tester/bctest.jnlp}\u00bbStart MIDlet now}}>>>.

Also AWT test application can be used in Java Web Start. <<<{{{./awt-bctest.jnlp}\u00bbStart application now}}>>>.

You can start two Java Web Start applications and see how they communicate if you have two different Bluetooth Stacks. e.g. Winsock (Microsoft) and WIDCOMM (Broadcom).
More information on {{{http://code.google.com/p/bluecove/wiki/stacks}BlueCove supported stacks here}}

* <<<{{{./awt-bctest-winsock.jnlp}\u00bbStart with Microsoft Winsock}}>>>

* <<<{{{./awt-bctest-widcomm.jnlp}\u00bbStart with Broadcom WIDCOMM}}>>>

* <<<{{{./awt-bctest-bluesoleil.jnlp}\u00bbStart with IVT BlueSoleil}}>>>

* Web Start with {{{#previous} previous releases of BlueCove}}


On Linux BlueZ bluecove supports multiple local devices so you can start more then one applications and see how they communicate.

* <<<{{{./awt-bctest-device-0.jnlp}\u00bbStart bluecove-gpl with Local Bluetooth device 0}}>>>

* <<<{{{./awt-bctest-device-1.jnlp}\u00bbStart bluecove-gpl with Local Bluetooth device 1}}>>>

* <<<{{{./awt-bctest-device-2.jnlp}\u00bbStart bluecove-gpl with Local Bluetooth device 2}}>>>

Generic web start (Mac OS X/Windows/Linux)

* <<<{{{./awt-bctest.jnlp}\u00bbStart generic (auto detect stack) test application}}>>>

If for some reason Java Web Start is not working for you. Try downloading this {{{./bluecove-tester-app.jar}bluecove-tester-app.jar}} application.

Run it like this:

---
java -jar bluecove-tester-app.jar
---

To start application with no GUI

---
java -jar bluecove-tester-app.jar --console
---

To test JSR-82 implemenation other then BlueCove e.g. avetana. Run test application like this:

---
java -cp avetanaBluetooth.jar;bluecove-tester-app.jar net.sf.bluecove.se.Main
---

You can download the {{{./bluecove-tester.jar}bluecove-tester.jar}} application jar and run it with or without BlueCove JSR-82 in calsspath.

On Linux

---
java -cp bluecove-#version#.jar:bluecove-gpl-#version#.jar:bluecove-tester.jar net.sf.bluecove.se.Main
or using D-Bus
java -cp bluecove-#version#.jar:bluecove-bluez-#version#.jar:dbus-java-2.5.1.jar:unix.jar:bluecove-tester.jar net.sf.bluecove.se.Main
---

---
java -cp avetanaBluetooth.jar:bluecove-tester.jar net.sf.bluecove.se.Main
---

N.B. On Windows replace : with ; for path separator

bluecove-tester-app.jar is the same application as bluecove-tester.jar only BlueCove classes are included.


* This is the test {MIDlet}. It can run on a {{{http://code.google.com/p/bluecove/wiki/phones} cell phone with JSR-82}}

* {{{./bctest.jar}bctest.jar}}

* {{{./bctest.jad}bctest.jad}}

* {{{../bluecove-webstart/open-local/~/bluecove-tester/bctest.jnlp}\u00bbStart MIDlet in emulator}}

[]

You can upload this MIDlet to your cell phone and use it as responder for BlueCove application on PC.

<<<{{{../obex-install/push-local/~/bluecove-tester/bctest.jnlp}\u00bbInstall MIDlet now}}>>>

See {{{http://code.google.com/p/bluecove/wiki/phones}complete list of the JSR-82 compliant phones}}

MIDlet application hot {keys}:

* <<<2>>> - Start Client

* <<<3>>> - Stop Client

* <<<5>>> - Start Server

* <<<6>>> - Stop Server

* <<<*>>> - Run Discovery

* <<<Arrows>>> - Scroll log

* <<<#>>> - Clear log

* <<<0>>> - Scroll to the end of the log

[]

* Windows Mobile

We are using Motorola MPx220 and Dell Axim X30 to test BlueCove. {{{http://code.google.com/p/bluecove/wiki/WindowsMobile} BlueCove supported devices}}

{{{http://www2s.biglobe.ne.jp/~dat/java/project/jvm/index_en.html}Mysaifu JVM}} - An open-source (GPL v.2 license) Java VM is used during tests.

The same AWT {{{./bluecove-tester-mobile.jar}bluecove-tester-mobile.jar}} or {{{./bluecove-tester-phone.jar}bluecove-tester-phone.jar}} application that you just run on Windows can be uploaded to your mobile and started there.

Those jars been made smaller to exclude Linux and Max OS X code.

Start application like this:

---
"\Storage Card\Mysaifu JVM\jre\bin\jvm.exe" -jar "\bluecove\bluecove-tester-mobile.jar"
---

We tried IBM's J9 VM and NSICOM's CrEme JVM and BlueCove works there.

If you run test application Mysaifu on Windows Mobile Phone Edition application Menu will not appear in AWT application! Use {{{#keys}hot keys}}. # key two times will exit the application.

On Windows Mobile you may create link file to start application.

IBM J9 Personal Profile:

---
132#"\Program Files\J9\PPRO10\bin\j9.exe" "-jcl:ppro10" -cp "\Storage Card\bluecove\bluecove-tester-mobile.jar" net.sf.bluecove.awt.Main
---

132# means that the command line contains 132 characters,

IBM J9 MIDP 2.0 Profile: (Follow BlueCove {{{http://code.google.com/p/bluecove/wiki/Documentation}installation instruction}})

---
107#"\Program Files\J9\MIDP20\bin\emulator.exe" "-Xdescriptor:\Storage Card\bluecove\bctest.jad" "-Xjam:force"
---

FYI: on diferent version of Windows Mobile path <<<\Storage Card>>> should be replaced with <<<\SD Card>>>

* Web Start with {previous} releases of BlueCove

* <<<{{{./awt-bctest-1.2.3.jnlp}\u00bbStart with Microsoft Winsock v 1.2.3}}>>>

* <<<{{{./awt-bctest-2.0.0.jnlp}\u00bbStart with BlueCove v 2.0.0}}>>>

* <<<{{{./awt-bctest-2.0.1.jnlp}\u00bbStart with BlueCove v 2.0.1}}>>>

* <<<{{{./awt-bctest-2.0.2.jnlp}\u00bbStart with BlueCove v 2.0.2}}>>>

* <<<{{{./awt-bctest-2.0.3.jnlp}\u00bbStart with BlueCove v 2.0.3}}>>>

* <<<{{{./awt-bctest-2.1.0.jnlp}\u00bbStart with BlueCove v 2.1.0}}>>>

* Servers in this application can be used as traffic generator

To initialize the server send special initialization 4 bytes sequence to it. "7, 100, 45, 90, 1", 45 is sleep in microseconds between each array sent; and 90 is size of the array to send (min 16, max 255); 1 duration in minutes .

To send this data using BlueCove Tester use menu "More" -> "Client Connection" Near Send select from drop down "as parseByte(text)"

Array size special values: 251 = 1K (1024 bytes); 252 = 2K; 253 = 3K; 254 = 4K; 255 = 5K;

Using this generators we collected this {{{./speed.html}speed test results}}

* BlueCove test lab

[testing-bluecove-small.jpg] bluecove test lab}

{{{./testing-bluecove.jpg}details}}

Change log

r2937 by skarzhevskyy on Mar 20, 2009   Diff
tests on Windows Mobile
Go to: 
Project members, sign in to write a code review

Older revisions

r2873 by skarzhevskyy on Mar 9, 2009   Diff
N.B. On Windows replace : with ; for
path separator
r2840 by skarzhevskyy on Mar 4, 2009   Diff
More tests
r2816 by skarzhevskyy on Feb 28, 2009   Diff
add older version webstart
All revisions of this file

File info

Size: 9831 bytes, 244 lines

File properties

svn:mime-type
text/plain
svn:eol-style
native
svn:keywords
Date Author Id Revision
Powered by Google Project Hosting