Re: A question about BlueCove

0 views
Skip to first unread message

Vlad Skarzhevskyy

unread,
Sep 1, 2008, 4:29:26 PM9/1/08
to bluecove-users
On BlueZ You can use function BlueCoveImpl.getLocalDevicesID
http://www.bluecove.org/apidocs/com/intel/bluetooth/BlueCoveImpl.html#getLocalDevicesID()

The LocalDevice.getProperty("bluecove.local_devices_ids") will return
the same value as comma separated string with all IDs for your
devices.

Also the stack initialization in your case is failing because it is
already initialized. If you want different local devices in the same
thread call releaseThreadBluetoothStack()
http://www.bluecove.org/apidocs/com/intel/bluetooth/BlueCoveImpl.html#releaseThreadBluetoothStack()
But my idea was to have only one stack (local device) attached to one tread.

On Mon, Sep 1, 2008 at 9:26 AM, Rogelio Canedo <rogelio...@gmail.com> wrote:
> Hi,
>
> I'm trying to make a pool of devices with bluecove.
>
> <code>
>
> private void updateDeviceList(){
> if(deviceNumber > 0){
> deviceList.clear();
>
> for(int indice = 0; indice < deviceNumber; indice++){
> BlueCoveImpl.useThreadLocalBluetoothStack();
> BlueCoveImpl.setConfigProperty("bluecove.deviceID",
> Integer.toString(indice));
> try {
> deviceList.add(indice,
> BlueCoveImpl.getThreadBluetoothStackID());
> } catch (BluetoothStateException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
>
> }
>
> }
>
> </code>
>
> but I have an Exception in thread "main" java.lang.IllegalArgumentException:
> BlueCove Stack already initialized
>
> is it possible to make a pool of devices?
>
> I need this to allow hot plug devices.
>
> thanks
>
> Rogelio Canedo
>

--
Vlad

Reply all
Reply to author
Forward
0 new messages