I am using "android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT" intent to get device specific AT commands. But the broadcastreciever didn't fire when I send AT command from MY Bluetooth Kit.
When I send AT+CHUP\r from my kit the android work on this command internally and disconnects the call. But when I send AT+XEVENT=foo,3\r from kit but I am not getting any thing in receiver.
Help me out
Related
Hi Everyone,
So I'm having problems pairing my Mogul to my TomTom Eclipse (aka TomTom Duo) via bluetooth for handsfree calling.
Here's what happens: I set the Mogul to discoverable on the bluetooth, the have the Eclipse search for phones. It will find the phone (though it recognizes it by the owner name and not by the make and model number) and asks if I want to connect, I say yes. Then, a notification pops up on the Mogul, indicates the attempted contact, and asks if I want to add the Eclipse to my devices. I say yes, then enter the passcode to begin the process. It goes downhill from here.
The Eclipse screen says it is determining the phones features (i.e. handsfree, contacts, wireless services, etc.) and essentially spins its wheels. The Mogul starts to repeatedly give me the same notice regarding whether I want to pair the two devices. Each time I say yes and enter the passcode, and one pair process ends while another starts up. Eventually the Eclipse will timeout, saying it is unable to determine the phone features and will not pair up.
After reading this thread here ( http://forum.xda-developers.com/showthread.php?t=314371 ) and installing the .cab for DUN, the Eclipse will say it recognizes that the device has wireless data capabilities. In addition, there was one instance when I got the two to pair, and the Eclipse recognized the phone as a phone and even downloaded contacts. When I tried to make a call I could initiate the call from the Eclipse, however, the sound and voice still went through the Mogul and not through the Eclipse system like it should have. I have not been able to replicate the feat since.
I have also tried the COM ports method with no success.
Anyone have any suggestions? I'm at my wits end here.
My Imagio won't pair with the factory hands-free Bluetooth in my 2010 Nissan Frontier. Everything goes fine until I enter the requested PIN, at which point the Frontier tells me "invalid PIN". I'm entering the correct sequence.
The phone pairs ok with our 2007 Nissan Altima, and paired mostly-ok with my prior 2007 Nissan Sentra, other than the annoying but tolerable delayed hang-up problem that has been documented by others.
Our LG phones pair fine with the Frontier.
HTC tells me it is a Nissan problem. I was able to talk with a Nissan Bluetooth specialist who told me my phone has not yet been tested for compatibility (nor had the LG's that pair ok) and "probably is not compatible". Finger pointing both ways.
The phone pairs ok with the Altima and other hands-free devices.
I think it is related to the Imagio Bluetooth stack implementation coupled with a not-totally-compliant Nissan interface. I suspect that the phone is sending the PIN data in some format that the Frontier doesn't interpret correctly.
Does anyone have any suggestions for diagnosing this or making it work? Maybe some sort of packet/frame monitor for Bluetooth that would let me view the data packets being exchanged?
Can the Imagio Bluetooth stack be replaced by one that is more compatible?
I'd really like to get this working...
Thanks,
Steve
hello,
i search a solution to detect a bluetooth connection, device is equal.
all what i found is getBondedDevices() from BluetoothAdapter, but pairing this is not a connection...
thanks 4 help
Solved!
i use ACTION_ACL_CONNECTED and ACTION_ACL_DICONNECTED from class BluetoothDevice.
Code:
getApplicationContext().registerReceiver(receiver,
new IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED));
getApplicationContext().registerReceiver(receiver,
new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED));
Android-Wireless
Helo Sir,
How to switch On Bluetooth and Wireless programatically? Even i can't switch on bluetooth and wireless manually in android.
Emulator shows error.
dineshsubramanian said:
Helo Sir,
How to switch On Bluetooth and Wireless programatically? Even i can't switch on bluetooth and wireless manually in android.
Emulator shows error.
Click to expand...
Click to collapse
Emulator actualy dosn't support Bluetooth, WLan and GPS!
CodeFlatter said:
i use ACTION_ACL_CONNECTED and ACTION_ACL_DICONNECTED from class BluetoothDevice.
Code:
getApplicationContext().registerReceiver(receiver,
new IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED));
getApplicationContext().registerReceiver(receiver,
new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED));
Click to expand...
Click to collapse
This only works if the device isn't yet connected. If the device is ALREADY connected when your app starts, how do you detect that, without starting a discovery?
been searching for a few days for an answer to this. Anyone got one?
Thanks
Scott
No one has any ideas on this? A month of searching has so far proven futile, but I can't believe it's not possible...
On the Google android developers site there is a complete example (a bluetooth chat).
http://developer.android.com/intl/de/resources
Hi!
I'm trying to connect my phone (HTC desire running Opendesire last update or HTC stock 2.2) to a serial to bluetooth converter module.
It seems to me that BluetoothChat sample is a good point to start as this application sends bytes over bluetooth.
That's just what i want to do: send some bytes from phone, receive some bytes from the module
I tried to run the Bluetoothchat sample on my phone:
Discovering and pairing the module is ok, but I'm unable to open a connection.
Anyone ever tried (and get success) to do same things as me?
Thank you.
Delvorak said:
This only works if the device isn't yet connected. If the device is ALREADY connected when your app starts, how do you detect that, without starting a discovery?
been searching for a few days for an answer to this. Anyone got one?
Thanks
Scott
Click to expand...
Click to collapse
Take a look at my SpeakerProximity Project => http://code.google.com/p/speakerproximity/
I faced the same problem and the solution that fitted the best was using BT connect/disconnect receivers that always get triggered and update a shared preference.
Hi,
I'm still having some issue with the bluetoothchat sample from sdk and bluetooth to serial converter module.
Now it works fine with AOSP rom but i'm still unable to make connection with HTC stock rom.
I've tried with a friend to run the application on a galaxy spica and we had the same issue. First the application didn't even start on spica and we had to change permissions to avoid Force Close.
Somebody knows what's wrong with bluetooth and HTC or Samsung?
Thank you
detecting bluetooth STATE_ON
in your OnStart() use :
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter != null) //if null device does not support bluetooth
{
if (mBluetoothAdapter.getState()==BluetoothAdapter.STATE_ON) {
//do stuff
}
}
I use a bluetooth listener for the STATUS_CHANGED event to check if BT is switched on.
If so, i enable my scanning avtivities, else i disable them.
Greetz,
Mike
STATE_ON is not the same as connected, though. (I think).
Personally, I've be having trouble figuring out the disconnect event to listen for, but I think the ACL one is what I need. Will try to remember to post back if I get it working. Damn WiFi process always interupts my transfers epecially when email decides it's time to sync.
Anyways, one tip for those having trouble with the BluetoothChat example is that for some reason you dont want to be listening for a connection at the same time as trying to make one. If you try the BluetoothChat example it actually almost always fails to connect. But if you make sure only one device is using listenforRfcomm... and the other is connecting, you'll connect fine.
The Spica thing is some bug with that phone specifically, though I think some people have solved it with some type of strange method reflection. Check stackoverflow for spica/bluetooth.
Just an update for my problem the ACL braodcasts were just what I was looking for though the diconnect broadcast is sometimes very slow to trigger.
I have my Nexus 7 installed in my car and I'm trying to get it to auto connect to my head unit. I've tried different apps, Tasker, and different settings and I believe the issue is because its a "media only" bluetooth device. Is there a way to add the "Phone Profile" like I have on my GNex to the Nexus 7?
I believe tablet talk has an option. I'll check and post A screenie
Sent from my SPH-L710 using xda premium
Sent from my SPH-L710 using xda premium
Thanks for the tip...I'll give it a shot. Hopefully this gives me the Phone profile in the Bluetooth settings.
Doesn't look like Tablet Talk will give the Nexus 7 the Phone Profile in the default bluetooth settings. Any other ideas?
Not really sure I don't have a Bluetooth headset. I just seen that in the settings.
Sent from my SPH-L710 using xda premium
You could try adding these services in the terminal:
Code:
% sdptool add HS
Headset service registered
% sdptool add HF
Handsfree service registered
% sdptool add HFAG
Handsfree AG service registered
You can also try to change the device class to "Phone, Smart phone":
Code:
% hciconfig hci0 class 0x5a020c
None of these changes will be visible in the GUI, but they might convince your car kit that it wants to auto connect. If it works, you can run these commands with Tasker and the Secure Settings plugin.
elmicha said:
You could try adding these services in the terminal:
Code:
% sdptool add HS
Headset service registered
% sdptool add HF
Handsfree service registered
% sdptool add HFAG
Handsfree AG service registered
You can also try to change the device class to "Phone, Smart phone":
Code:
% hciconfig hci0 class 0x5a020c
None of these changes will be visible in the GUI, but they might convince your car kit that it wants to auto connect. If it works, you can run these commands with Tasker and the Secure Settings plugin.
Click to expand...
Click to collapse
I'm having the same issue like the OP. I have android 4.2.1 and I can't find sdptool in system/bin/
I'm looking to do something similar here, and I know this topic has come up before. I want the N7 to act as a bluetooth "headset" for my N4 for a car install. It definitely lacks a phone profile.
Mega props if anyone figures out how to do that well.
YES!
SQurel23 said:
I have my Nexus 7 installed in my car and I'm trying to get it to auto connect to my head unit. I've tried different apps, Tasker, and different settings and I believe the issue is because its a "media only" bluetooth device. Is there a way to add the "Phone Profile" like I have on my GNex to the Nexus 7?
Click to expand...
Click to collapse
Finally, others who know my pain! It is really frustrating because I am trying to have my Nexus 7 basically stand in for my head unit. Its pretty annoying if you have to set it up each and every time you get in and out of the car though. I'm on the verge of returning the JVC unless someone has made some headway.
Edit - tried sdptool from the command prompt and it did not work. Tried before and after rebooting. Working to find out more about hciconfig. This doesn't work right away from the command prompt. Time to thread crawl some more.
AW: Can the Nexus 7 be recognized as a bluetooth phone device?
sdptool and hciconfig are parts of the "old" Bluetooth stack Bluez. With Android 4.2 a new Bluetooth stack by Broadcom has been introduced, and I guess the old Bluez commands don't work anymore. And nobody confirmed that these commands were even helpful in this situation.
Count me among those who desparately want the N7 to auto connect to my car radio.
*Bump*
I have a problem with pairing Bluetooth components.
In the smartphone we recognize the CarKit immediately and can then be connected via the PIN code smartphone side.
My problem is that I can't connect any other hardware to the CarKit.
Devices such as cash terminal, printer, or headphones are displayed in a list, but cannot be connected to the CarKit.
I despair. because I simply need certain components.
Maybe someone can give me a tip on how to solve the problem.
Have other car systems in operation where this is not a problem.
The Bluetooth hardware we recognized by the K1.
However, no connection can be made.
There is no possibility to enter the pairing code.
Why is this not possible with the K1?
What does reseller suggest when contacted for support
The seller says my devices will not be supported.
However, the devices are listed via BT.
(first photo)
However, there is no way to connect.