Put /lib/bluetooth_ext.jar under the ext folder of your webwork project.
Add this line into your config.xml
<feature id="vxmt.bluetooth.basic" required="true" version="1.0.0" />
Then everything just works.
<script>
var handle = vxmt.bluetooth.basic;
//Store your array here:
alert(handle.service_list);
</script>
<script>
function call_back(mess) {
//You can do anything else here:
alert(mess);
}
var handle = vxmt.bluetooth.basic;
handle.connect('BLUETOOTH_SERIVICE_NAME', 'call_back');
bluetooth.connect('uniq_key', 'BLUETOOTH_SERIVICE_NAME', 'call_back');
// for example bluetooth.connect('abc', 'DEVICE_BLABLA', 'bluetooth_mess_arrived');
</script>
<script>
// for example, 'abc' is the key you used to connect previously
var bluetooth = vxmt.bluetooth.basic;
bluetooth.write_back('abc', 'message string');
</script>
The software is released under the MIT license: www.opensource.org/licenses/MIT