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.
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. 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
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.1-SNAPSHOT.jar:bluecove-gpl-2.1.1-SNAPSHOT.jar:bluecove-tester.jar net.sf.bluecove.se.Main or using D-Bus java -cp bluecove-2.1.1-SNAPSHOT.jar:bluecove-bluez-2.1.1-SNAPSHOT.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.
You can upload this MIDlet to your cell phone and use it as responder for BlueCove application on PC.
MIDlet application hot keys:
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.
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.
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 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
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