hyperionjv / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

Long waiting for finding the first BT device #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Choose to live with problems with getpeername, when using BT stack-MS.
2. Using version 2.0.3 and change BluetoothStackMicrosoft.java to
public void deviceDiscoveredCallback(DiscoveryListener listener, long
deviceAddr, int deviceClass, String deviceName, boolean paired) {
        RemoteDevice remoteDevice = RemoteDeviceHelper.createRemoteDevice(this,
deviceAddr, deviceName, paired);
        if ((currentDeviceDiscoveryListener == null) || 
                (currentDeviceDiscoveryListener != listener)) {
            return;
        }
        listener.deviceDiscovered(remoteDevice, null);
    }
3. Print to screen with: public void deviceDiscovered(RemoteDevice
btDevice, DeviceClass cod)

What is the expected output? What do you see instead?
After finding first device, all other device is found on about 1 second.
But finding the first device takes from 10 to 15 seconds.
I hoped to get this below 5 seconds, but is this possible?

What version of the product are you using? On what operating system?
BlueCove 2.0.3
WM5 on HTC P3300

Please provide any additional information below.
I need a very fast scan, just returning BT mac address.
The application is doing a ping to known devices, when they are in range,
and do it again and again.
On Sony Ericsson mobiles, I can get the ping-cycle down on about 4 seconds
and finding the 1-2 BT device nearly every time.
To get down on about 4 seconds, I have to cancelInquiry.

Is this possible on a PPC ?

Original issue reported on code.google.com by mrt...@gmail.com on 25 Feb 2008 at 10:45

GoogleCodeExporter commented 9 years ago
Forgot to mention, that my appliction is running on IBM J9.

Original comment by mrt...@gmail.com on 25 Feb 2008 at 11:31

GoogleCodeExporter commented 9 years ago
This is how function WSALookupServiceBegin works in Microsoft. See MSDN for 
details.
You may try and change Line 238 (query.length = 11;) in intelbth.cpp

If this solved the problem I can move the declaration of this (11 sec) constant 
to
the properties in java.

Original comment by skarzhev...@gmail.com on 25 Feb 2008 at 3:48

GoogleCodeExporter commented 9 years ago
I have changed query.length = 3;
And after installation of Visual C++ 2008, I started build-native-intelbth.cmd
But that only gives me a new intelbth.dll, and not intelbth_ce.dll which my 
device uses.
I know, because I have to accept that intelbth_ce.dll can run.

Is the query.length a part of intelbth_ce ?

I would really appreciate if you could make an option in Java to manipulate the 
11 sec. 

Original comment by mrt...@gmail.com on 26 Feb 2008 at 10:03

GoogleCodeExporter commented 9 years ago
The build-native-intelbth.cmd only create dll for Windows. You need to open VC
project and select the target platform. Then build. Note The WinCE build is not
available in VC Express Edition!  Please use user groups to ask question like 
this.

Original comment by skarzhev...@gmail.com on 26 Feb 2008 at 9:01

GoogleCodeExporter commented 9 years ago
Configuration options

    System properties:
    (Since v2.0.3)
        # `bluecove.inquiry.duration` Device Inquiry time in seconds defaults to 11
seconds. MS Stack and OS X only.

Dll and java code for win in SVN.
Will force a new build on build server once done the same for OSx. ETA 2 hours.

Original comment by skarzhev...@gmail.com on 27 Feb 2008 at 4:54

GoogleCodeExporter commented 9 years ago
# `bluecove.inquiry.duration` Device Inquiry time in seconds defaults to 11

seconds. MS Stack and OS X only.

have you considered implementing this in linux?

thanks

Original comment by dand...@gmail.com on 17 Sep 2009 at 10:03