BlueCove test application

This Project is used to test BlueCove. We are using it in addition to JSR 82 TCK tests because it is simple to start and we can add implementation specific cases.

The goals of this project:

  • Verify BlueCove communication with other devices
  • Verify BlueCove stability using long running tests
  • Simplify the start of JSR 82 TCK Agent using BlueCove

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

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 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.awt.Main

on Linux

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

You can download the bluecove-tester.jar application jar and run it without BlueCove JSR-82 in calsspath.

java -cp avetanaBluetooth.jar;bluecove-tester.jar;junit-3.8.1.jar net.sf.bluecove.awt.Main

bluecove-tester-app.jar is the same application as bluecove-tester.jar only JUnit and 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 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.

BlueCove test lab

bluecove test lab}

details