My favorites | Sign in
Logo
                
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
~~ @version $Revision$ ($Author$) $Date$
~~ See this file format http://maven.apache.org/doxia/references/apt-format.html

------------------
BlueCove JSR-82 Emulator module
------------------

BlueCove JSR-82 Emulator module

bluecove-emu is additional module for BlueCove to simulate Bluetooth stack.

bluecove-emu is a pure Java implementation of JSR-82 without Bluetooth hardware. Fully tested using TCK {{{../tck/}JSR-82 TCK test results}}

bluecove-emu requires Java 5 Standard Edition and uses RMI for interprocess communication.

N.B. This is experimental module and have no monitoring GUI. Another module bluecove-emu-gui is in developement. {{{http://groups.google.com/group/bluecove-developers}Help us make it}}.

The diagram below shows the architecture used by this module

[images/diagram-emulator.png] JSR-82 emulator diagram

* Usage

Start local bluetooth air simulator server

---
java -cp bluecove-#version#.jar;bluecove-emu-#version#.jar com.intel.bluetooth.emu.EmuServer
---

Start jsr-82 application that connects to air simulator server

---
java -Dbluecove.stack=emulator -cp bluecove-#version#.jar;bluecove-emu-#version#.jar;yourApp.jar org.your.app.Main
---

Start MIDP jsr-82 application that connects to air simulator server

---
java -Dbluecove.stack=emulator -cp microemulator.jar;bluecove-#version#.jar;bluecove-emu-#version#.jar org.microemu.app.Main btApp.jad
---

* Emulator in Unit tests

Emulator has been designed to be used during unit test to help in automation of tests for JSR-82 applications.

For unit tests air simulator server can be started as in process server. {{{apidocs/com/intel/bluetooth/EmulatorTestsHelper.html#startInProcessServer()}EmulatorTestsHelper.startInProcessServer()}}

Documentation for BlueCove API that enables the use of Multiple Adapters and Bluetooth Stacks in parallel in the same JVM can be found {{{../bluecove/apidocs/com/intel/bluetooth/BlueCoveImpl.html#useThreadLocalBluetoothStack()}here}}.

Complete JUnit test example can be found here {{{xref-test/net/sf/bluecove/ExampleTest.html}ExampleTest}}

* Configuration options

System properties:

* `bluecove.stack=emulator` force BlueCove to use Emulator instead of real Bluetooth stack

* `bluecove.deviceID=1` bluecove supports multiple local devices, this will force it to select second one.

* `bluecove.deviceAddress=btaddr` select local devices by Bluetooth address

* `bluecove.emu.rmiRegistryHost=localhost` air simulator server can be on remote computer

* `bluecove.emu.rmiRegistryPort=8090` air simulator server listen on different port. Use 0 on the client to enable in process server (no rmi)

* `bluecove.emu.rmiRegistry=true` air simulator server and RMI registry can be started inside client JVM

Emulator Configuration properties:

This is the resource file 'bluecove.emulator.properties' loaded by air simulator server.
Defines devices address and names assignment.
It also can define LocalDevice properties returned to the client application.

See {{{apidocs/com/intel/bluetooth/emu/EmulatorConfiguration.html}EmulatorConfiguration}}
Show details Hide details

Change log

r2972 by skarzhevskyy on Mar 29, 2009   Diff
diagram for the emu module
Go to: 
Project members, sign in to write a code review

Older revisions

r2599 by skarzhevskyy on Dec 16, 2008   Diff
Emulator configuration properties
r2523 by skarzhevskyy on Dec 08, 2008   Diff
Started TCK for JSR 82 1.1.1
r2421 by skarzhevskyy on Oct 09, 2008   Diff
site corrections
All revisions of this file

File info

Size: 3308 bytes, 74 lines

File properties

svn:mime-type
text/plain
svn:eol-style
native
svn:keywords
Date Author Id Revision
Hosted by Google Code