BlueCove test application

This Project is used to test BlueCove. We are using this application in addition to 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 that are executed during build.

The goals of this project:

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

Tests contains MIDlet application and 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 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. Once 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. »Start MIDlet now .

Also AWT test application can be used in Java Web Start. »Start 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 BlueCove supported stacks here

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

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

If for some reason Java Web Start is not working for you. Try downloading this 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 application jar and run it with or without BlueCove JSR-82 in calsspath.

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

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 cell phone with JSR-82

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

»Install MIDlet now

See 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. BlueCove supported devices

Mysaifu JVM - An open-source (GPL v.2 license) Java VM is used during tests.

The same AWT bluecove-tester-mobile.jar or 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 hot keys . # key two times will exit the application.

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 test results

BlueCove test lab

bluecove test lab}

details