[Q] NFC - Bluetooth pairing - General Questions and Answers

Hi all,
We have a number of Samsung Galaxy S2 devices (i9100p with built in nfc), and a number of bluetooth RFID scanners.
I am trying to simplify the pairing of the bluetooth scanners. My idea is to use an NFC tag on the back of each scanner, which the user can tap their phone against, and enter the passcode presented on the phone in to the scanner to pair (as per the normal bluetooth pairing).
I have tried a few applications including BT Tag writer and TagWriter, but cannot seem to get either working consistently, on all devices. (I have installed the app on each device, but it only seems to work on the phone that wrote the tag although all phones have the software installed). In the case of BT Tag Writer, the application launches but it is unable to connect to the device.
However, on my note 2 running 4.1.2, it seems to be working fine. I seem to remember seeing something that jellybean introduces extra api's for bluetooth pairing via nfc? Is there a work around for 4.0.4?
Thanks
edit
Ahh just seen on BT Tag Writer that it only supports A2DP devices. The reader we have connects as a HID / keyboard.

Related

[Q] Bluetooth Issues

I have an TF101 running 4.0.3 stock rom, rooted with ViperMOD.
I have a bluetooth speaker, HMDX Audio HX-P230.
It won't pair with my device.
My tablet will see the speaker, but when I try to pair them it gives me an error: cannot communicate with [bluetooth ID].
Now, I know the bluetooth in my tablet works because I use a PS3 control via bluetooth.
I tried resetting my tablet, and disabling and reenabling the bluetooth.
I made ABSOLUTELY sure Sixaxis Controller was not running or started or active in any way.
I know the speakers work because they will pair with my phone.
So why won't they work together?!?!?!?
BornInTheJunkyard said:
I have an TF101 running 4.0.3 stock rom, rooted with ViperMOD.
I have a bluetooth speaker, HMDX Audio HX-P230.
It won't pair with my device.
My tablet will see the speaker, but when I try to pair them it gives me an error: cannot communicate with [bluetooth ID].
Now, I know the bluetooth in my tablet works because I use a PS3 control via bluetooth.
I tried resetting my tablet, and disabling and reenabling the bluetooth.
I made ABSOLUTELY sure Sixaxis Controller was not running or started or active in any way.
I know the speakers work because they will pair with my phone.
So why won't they work together?!?!?!?
Click to expand...
Click to collapse
I'm going to assume that you have tried the pass code of 0000 when pairing the 2 devices. While they are SUPPOSED to work with "all tablets," the majority of the time the manufacturers think ONLY of a tablet as an iPad, instead of the many Android variants out there. Some tablets in the settings you HAVE to enable audio over bluetooth, while others do it automatically.
Also I've found often times when trying to pair devices the one that you want to pair with i/e your speaker, turn it off wait 15 seconds, turn it back on and make sure that the lights are flashing showing it is searching for a host. Then under the tablet settings have the tablet search for the device, and try to pair with it. It will either do 1 of 3 things. Auto pair without prompting for the pass code, or it will put the pairing on hold until you input the pass code, in this case 0000, or it will fail.
You might have to go into your phone and "forget" the pairing connection with the speaker for it to be able to be found and used by another device.

One click - Connect 2 Specific Bluetooth device for A2DP and Phone app

An amazing One click - Connect 2 Specific Bluetooth device for A2DP and Phone app:
Bluetooth Pair
https://play.google.com/store/apps/details?id=com.gnssoftworks.bluetoothpair
found it very useful for swapping bluetooth headphones between devices WITHOUT turning off Bluetooth entirely or going into the settings menu.
Example Use Case:
I have one Stereo Bluetooth headset with mic (two profiles - phone and A2DP audio)
I have one Android Phone and one Android Tablet.
Phone Profile is always connected to the Android Phone, but the A2DP audio changes depending on which device you want to listen to music from.
Normally, if you want to listen to audio from the Tablet when your headset's A2DP profile is connected to the phone, you'd have to first go to the settings menu of the phone, and disconnect the A2DP, leaving Phone Profile connected. Then go to the settings menu on your tablet and connect the A2DP only.
Then you'd have to do the opposite if you want to listen to audio from the Phone again.
Takes a long time.
With Bluetooth Pair, you can specifically connect or disconnect to a specific device and specific profile (phone / a2dp) by widgets.
So you won't have to turn off the bluetooth completely on one device just to allow your headset to connect another device. Nor do you need to go into settings anymore.
1.) Just tap on the A2DP device specific widget on the phone to disconnect, the A2DP Profile from the phone
2.) go to the Tablet, and tap on the A2DP device specific widget to connect the A2DP profile of the headset to the Tablet
Two taps!
Would you mind sharing a code snippet on how you achieve this? I've been working on a little program that I intend to use around the house and this is the missing piece that I can't figure out. Basically, I have some NFC tags spread around the house and a receiver app that triggers various actions. One of them enables bluetooth on my device (if off), turns on my home audio receiver (over telnet), connects to the receiver's A2DP device (this is the missing piece), and launches a music app.
I've seen examples where this works using an AIDL method, but from what I've gathered this no longer works under Android 4.2. Does your app work on 4.2? Any hints you can provide?
Thanks!
Brian
I'm not the writer of this app.
You could try contacting them via the email listed on Google Play.
BTW, while you're making your app, please dedicate a thread to it on XDA so we can all beta test and buy it later!
klau1 said:
I'm not the writer of this app.
You could try contacting them via the email listed on Google Play.
BTW, while you're making your app, please dedicate a thread to it on XDA so we can all beta test and buy it later!
Click to expand...
Click to collapse
Oh, OK. I just assumed this was your app.
After reading the Play Store description more carefully, I don't think this app actually does what I'm trying to do (programmatically establish an A2DP connection). It appears this app enables / disables certain profiles but the actual connection is still handled by the OS.
As far as the app I'm making, I was intending it to just be something for personal use. I'm planning on keeping it very lightweight and tailored specifically to my needs. For it to be used by anyone else they would have to have the same brand of A/V receiver as me (Pioneer) that supports the same telnet commands. Most of the rest of the functionality of the app can be duplicated by using some of the existing NFC apps like NFC Task Launcher. If I ever develop it into something interesting that could be used by a wider audience I probably will post it on XDA for feedback though.

[Q] Android 5.0 Bluetooth Visibiltiy

I'm pretty sure I remember this setting being available in the preview versions just like in kitkat, but on the recently released images I cannot find the setting to change the bluetooth visibility setting to never time-out. The pioneer bluetooth stereo in my car absolutely will not recognize the presence of my phone unless it is discoverable.
Am I missing something, or has this option simply been removed.
If it has been removed I'm hoping maybe there is something I can modify to get this option back.
Thank you
xxrzdxx said:
I'm pretty sure I remember this setting being available in the preview versions just like in kitkat, but on the recently released images I cannot find the setting to change the bluetooth visibility setting to never time-out. The pioneer bluetooth stereo in my car absolutely will not recognize the presence of my phone unless it is discoverable.
Am I missing something, or has this option simply been removed.
If it has been removed I'm hoping maybe there is something I can modify to get this option back.
Thank you
Click to expand...
Click to collapse
If you open the bluetooth settings it says, that your device is visible to all devices as long bluetooth is enabled. Only in this screen your bluetooth device is visible to other devices.
I hope google fixes this, because its too confusing.
Yes, unfortunately that's the only reference to bluetooth visibility I have found.
My understanding in 5.0 is that your device's Bluetooth is only visible to paired devices, except when the Bluetooth Settings page is open. When the Bluetooth Settings page is open on your device it will be visible to all nearby Bluetooth devices (which is what you need when pairing). Have you paired the Pioneer Bluetooth stereo with your device?
There no longer appears to be an option as there was on 4.4 to permanently set 'Visible to all nearby Bluetooth devices'. However, why would you want that, other than when setting up pairing? It's a security risk.
xxrzdxx said:
I'm pretty sure I remember this setting being available in the preview versions just like in kitkat, but on the recently released images I cannot find the setting to change the bluetooth visibility setting to never time-out. The pioneer bluetooth stereo in my car absolutely will not recognize the presence of my phone unless it is discoverable.
Am I missing something, or has this option simply been removed.
If it has been removed I'm hoping maybe there is something I can modify to get this option back.
Thank you
Click to expand...
Click to collapse
I'm in your same situation, I was googling around and I found this... I'm on CM12 and wish that we can find a solution for make the bluetooth always discoverable on AOSP roms. I own a Lg G3 and on the stock Android 5.0 rom the option (like in KitKat) it still there!
The only reason I was really looking for this features is that my older Pioneer head-unit in my car (DEH-P9800BT) won't connect automatically to my phone unless the phone is discoverable. I've managed to adapt my other bluetooth connections that were set this way to work without the option, but I've tried for years (since my Palm Treo 650p) to get the head unit to connect automatically with no luck.
I am also wondering why they have hid this feature...
Looks like they are trying to go like (cr)Apple, whereas your iPhone is only discoverable within the Bluetooth menu.

[Completed] Bluetooth HID problem: nonkeyboard devices detected as hardware keyboard

With Android L and M, this problem seem to be more prevalent.
I have a Bluetooth headset, 4.1 and all that. it works fine, except on Android, it registered itself as an HID device, not as BT headset. (In BT settings, it shows as keyboard) though it works fine as a headset it is very problematic as this also means the phone will not show me the soft keyboard until I go into IME and turn off hardware keyboard.
I've since seen other people reported this happening with Selfie sticks (BT version) and possibly other devices.
How can this be resolved permanently, i.e. ignore hardware button on device X? Or does this require a patch, Xposed module, etc.? If replacing the device is not practical? Or is there something in Bluetooth settings that can be manipulated? Root / tasker / Xposed?
kschang said:
With Android L and M, this problem seem to be more prevalent.
I have a Bluetooth headset, 4.1 and all that. it works fine, except on Android, it registered itself as an HID device, not as BT headset. (In BT settings, it shows as keyboard) though it works fine as a headset it is very problematic as this also means the phone will not show me the soft keyboard until I go into IME and turn off hardware keyboard.
I've since seen other people reported this happening with Selfie sticks (BT version) and possibly other devices.
How can this be resolved permanently, i.e. ignore hardware button on device X? Or does this require a patch, Xposed module, etc.? If replacing the device is not practical? Or is there something in Bluetooth settings that can be manipulated? Root / tasker / Xposed?
Click to expand...
Click to collapse
Greetings,
Thank you for using XDA Assist. For further assistance, please ask your questions here:
Android Q&A, Help & Troubleshooting
Good luck!
Actually I answered my own question:
Regarding the headset, I went into bluetooth device settings (the little gear next to the device in Bluetooth) and turned off "input device" profile.
Selfie stick is another problem. Turns out those are ONLY meant to work inside camera apps, preferably Stock camera (not Google Camera, which can be a problem on Nexus devices). They HAVE to act as input device. No other way around it, unless Bluetooth SIG want to define a category just for remote triggers / selfie sticks.

Bluetooth paired devices - disable multimedia sound on Huawei

Hello,
I have a simple case:
- I have PX5 radio in car
- and Huawei Mate 20 Lite as a phone
Both devices are paired with bluetooth.
Since PX5 radio is full Android device that can run Google Play apps itself.
I would like to use bluetooth only for calling and as trigger for Tasker(start WiFi hotspot).
But since it is possible my phone sends also multimedia sound(but it won't be played on radio, since specific app for A2DP is not working - and I'm fine with that), I would like my phone to simply play multimedia itself, not via bluetooth.
I know it is possible in vanilla Android(https://fscl01.fonpit.de/userfiles/6983662/image/androidpit-lollipop-bluetooth-forget-w628.jpg) but since Huawei has it's "awesome" custom settings menu it is not there, do You guys have any idea how to change that settings?
ADB or any application would be great.
I'm not interested about any solution with root.
Apparently there is small "i" button on the right of paired device in bluetooth settings - not that easy to click(because when I tried to hit it for a first time I couldn't hit it correctly - that why I created that topic) - where You can change what sound is passed via bluetooth.

Categories

Resources