Samsung Galaxy bluetooth drivers
Asked Answered
B

2

3

I have written an application for Android. the main part being that it communicates via bluetooth. I have four devices:
1. Samsung Galaxy S2
2. Samsung Galaxy Gio
3. Netsurfer touch (A REALLY low end locally [South Africa] produced android tablet)
4. A Motorolla ET1

Now I have written my app - I need to test the complete structure.

I first wrote the bluetooth side (since that was what I had the least experience in) - and the only device I can get to work is the Netsurfer touch. It uses standard bluetooth drivers and it works PERFECTLY - I can receive the signal on the PC and deal with it perfectly well.

The OTHER part of my app, cannot be done on the Netsurfer because it is too low spec (it actually doesn't have the required hardware). I have tried the Motorlla and the entire app works as expected.

But now the Galaxy phones (both Gio and S2) refuse to connect with any computers. They will PAIR fine, but when I use the bluetooth code to connect I just get an IOException: Service discovery failed

Since it is not my code, I started looking an there is a driver missing on my computer: "Bluetooth peripheral Device" - the error code The drivers for this device are not installed. (Code 28)

I have tried using Windows update, and that fails, I have Samsung Kies installed, AND I have verified the problem on two separate computers - both running Windows 7 x64

The hardware id's are:
BTHENUM{00001132-0000-1000-8000-00805f9b34fb}_VID&0001000f_PID&0000
BTHENUM{00001132-0000-1000-8000-00805f9b34fb}_LOCALMFG&000f

I do not believe there to be a problem with the code, but with the drivers of the devices. But if you need code, I am using the code found here: http://code.google.com/p/backport-android-bluetooth/source/browse/trunk/backport-android-bluetooth201/src/backport/android/bluetooth/chat/?r=49

Bushelman answered 7/3, 2012 at 6:48 Comment(0)
V
6

In my app i have bluetooth, working on stock galaxy S (both 1 and 2), Nexus One, HTC Desire, asus tablet and some other device. My app is from android 2.1, and i have this reflaction in my code (with the SDK, it somtimes failed for uknown reason to me, with the "Service discovery failed" error message) that fixed the error:

BluetoothSocket mSocket = null;
mBluetoothAdapter.cancelDiscovery();

Method method;
try {
            method = mBluetoothDevice.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
            mSocket = (BluetoothSocket) method.invoke(mBluetoothDevice,1);
    } catch (NoSuchMethodException e1) {
            e1.printStackTrace();
    } catch (IllegalArgumentException e) {
            e.printStackTrace();
    } catch (IllegalAccessException e) {
            e.printStackTrace();
    } catch (InvocationTargetException e) {
            e.printStackTrace();
    }

mSocket.connect();

but other then that, i use the sdk, and everything works.

Viscounty answered 15/3, 2012 at 14:20 Comment(0)
I
2

The problem is, that newer Samsung devices (and HTC sense devices) don't have the full Bluetooth stack.

That is why for example apps like this one don't work on these devices either. The only solution would be to flash a full Bluetooth stack, eg by flashing a Cyanogenmod Rom.

Inviting answered 9/3, 2012 at 10:2 Comment(5)
Hi there, can you provide me with a reference for this information?Bushelman
For HTC devices: community.htc.com/na/htc-forums/android/f/91/p/2336/… For Samsung and others: sites.google.com/site/metawatchdev/bluetooth-compatibilityInviting
But these are forums. Why do the manufacturers have statements about this?Bushelman
There are no "official" statements - no one actually knows why the manufacturers don't include the full BlueZ stack. But they do it, so the only way to solve the problem is to flash a custom one.Inviting
yes e1 1 hv been struggling with the same problem havnt found a workaround yet... hv tried using AIDL,BluezIme,tried doing It as RFcom,Havent tried it using NDK and creating lib for same.guess flash is the only option.:(Gruel

© 2022 - 2024 — McMap. All rights reserved.