Are multiple Bluetooth adapters under Android possible? - android

Are multiple Bluetooth adapters under Android possible (e.g in order to be able to connect to more than 7 devices through these adapters)? Android API does not even mention the possibility of accessing more than one adapter: https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getDefaultAdapter()
I have no restrictions on root or running native code.

Even it's not possible with Android API, if Android device has OTG then USB BT dongle can be attached to that device (at least is possible connect to Android several BT SPP devices).

Related

Android bluetooth settings show duplicate names for same bluetooth device

I am working with a firmware team that writes firmware on a QCC3056 Qualcomm chipset that supports earbuds and I develop an android application that supports the BLE earbud Bluetooth device. The earbuds also support google fast pair and this feature requires the BLE mac address to be rotated every 15 min.
So the issue I am seeing here is the android Bluetooth settings recognize two Bluetooth devices with the same name(one is classic and the other one is BLE). I can tell by the mac addresses that one belongs to classic and the other belongs to the BLE address. We are able to connect to the classic instance. However, we are unable to connect to the BLE instance. We would like just one name to show up and the user should be able to connect to it. The firmware team thinks this is expected behavior(two names showing up). As far as I know, from the android end, we don't have any control over the Bluetooth settings. So I wanted to understand if this behavior is expected. I have tested this scenario with SONY WF-1000XM3 which supports Google Fast Pair and I have noticed only one name showing up.
It would be great if anyone can suggest the best possible approach I can take here.

Communcation between devices using only BLE

I want to connect two android phone only via BLE. Is it possible? because as per my understanding using Android API I can only connect with BLE enabled devices like smartwatches headphones etc. If I run startLescan() method it only shows my fitness band and headphone.
It does not show other android phones.
Yes its possible. As the hardware equally supports to act as a master or slave, but it depends on whether the OS has provide you the required interface to make a device act as master as well as slave. THe BLE in android phone is equally capabale of becoming a master or peripherical but it depends on whehter android has exposed some interface to make it work ortherwise if not you have to root/reflash your device and make changes at OS level.
Yes, two BLE devices can communicate and has been ever since the original 4.0 release.
The change in 4.1 states that a single device can act as both a master and as a slave simultaneously to two different devices. Once device has to act as periphiral and other as master.
See this: http://www.blemobileapps.com/ble-mobile/
For android this link might be helpful for you: https://code.tutsplus.com/tutorials/how-to-advertise-android-as-a-bluetooth-le-peripheral--cms-25426
Reference: Chipsets/Devices supporting Android 5 BLE peripheral mode
Let me know if this answers your question.
It is possible to connect to Android phone with BLE.
One of the phones has to be a BLE Server and must advertise itself
(a role usually performed by devices like smartwatches and headphones) to be discovered by the other phone.
To advertise itself the app uses the BluetoothLeAdvertiser class.
Such API was added starting from level 21 Lollipop so your server phone should be at least a 5.0 Android device.
Personally I found this tutorial by Andrew Lunsford very useful for understanding how to realize such functionality.

Android ADK bluetooth device compatibility

I am trying to get started with Android ADK.
My goal is to connect Arduino UNO + blue-tooth and Android devices via blue-tooth.
I discovered that ADK needs Linux kernel 2.6.35+ which is used for Android 2.3.4 to allow communication via USB.
So it's clear that all devices should support this requirement for USB communication.
But what about blue-tooth? Does it mean that the same rules applies to blue-tooth interaction?
Is it possible to establish connection and data exchange with device for instance with Android 2.1 (API level 7).
So, any explanations are warmly appreciated
UPDATE#1
My primary goal is to connect Android 2.1 device with Arduino via blue-tooth.
My first thoughts were that I should use ADK but I discovered that at least for USB it depends on linux kernel version.
But I think it still may be possible to use blue-tooth instead of USB and possibly I may still use ADK, if not how can I connect Arduino with android via blue-tooth without ADK.
Well.. Not sure I understand your problem exactly but I try to give you the best possible answer I can.
There is no relationship between ADK and Bluetooth. You need ADK if you use a USB cable to connect your ADK compatible development board with your Android mobile. The USB compatible board or the ADK shield contains a USB peripheral controller so it can control the USB devices through cable.
In your case you don't need any physical connection between your Arduino and the android device so it is a matter of Bluetooth connectivity. You just have to use a cheap Bluetooth Module with your mobile (Not needs to be an Android anyway).
Now you have to connect the Bluetooth module with your Arduino. Now you have two Bluetooth enabled equipment so you are ready to communicate. I found some good tutorials on web that you can use as a starting point.
How to control Arduino over bluetooth
Arduino Android Bluetooth Communication
Let me know if you need further clarification.
Bluetooth functionality seems to have been a part of the Android APIs since level 5. Thus Android 2.1 should work just fine!

Can Android 2.X devices connect to an Android 4.0 Wifi Direct AP?

I'll explain the problem I'm trying to solve first. I have two Adobe AIR applications that can be deployed to Android (Receiver App and Broadcaster App). The Receiver App sits on one Android device and waits for any Android devices running the Broadcaster App (on the local network). This is all currently working and I can have the devices talking over a local WiFi connection with no problem.
The issue is I need to be able to do this without an external router/AP. I was able to setup a third Android device as a Wireless AP and have two other Android devices communicate over the WiFi connection just fine. However, the device setting up the Wireless AP connection is not able to join the network.
After searching google and stackoverflow I came up with a few solutions.
(1) Set up an Ad-Hoc network using a rooted Android device and running Barnacle. I was able to try this and set up an Ad-Hoc network successfully between two devices but they were not able to establish a connection in the Adobe AIR apps (using Adobe P2P support).
(2) If I can get my hands on the new Android 4.0 Galaxy Nexus I understand I'll have access to WiFi-Direct. I'm curious if this will solve my problem. Can I set up AND join a Wireless AP using the Galaxy Nexus, and connect to the Wireless AP from my older 2.X devices? Reading this makes me believe I can, but I wanted to know if anyone can confirm.
P.S. I am using NetConnection/NetGroup/NetStreams on the Adobe AIR side over a serverless rtmfp connection.
Thanks.
Sean, this may not answer your question, but I've used rtmfp for serverless p2p also (of the kind described in this blogpost by Tom Krcha) and have a couple data points for you:
Many HTC devices and other smartphones have a multicast issue that prevents them from communicating in this way. Google 'htc multicast' and read about it on this blog. Interestingly, these devices can work in such a group as long as there are non-impaired devices also, because they can transmit multicast, just not receive it. So the other devices initiate the group and all can participate. But the impaired devices can't initiate the group by themselves.
I had no trouble communicating between a range of devices, from Android to iOS to desktop, so I assume you should be fine across versions of Android.
I have a rooted phone that I run an app called 'wireless tether' to create a hotspot / wifi access point, and when two other devices connect to that hotspot, they can communicate with each other using this method, but they cannot communicate with the phone that is creating the hotspot network.

Android ADK - Connect multiple devices

Is it possible, to connect more than one accessory to my device using the ADK? For example using a nexus and a usb hub. Could I connect two arduino boards?
This is currently not possible, but the APIs do allow for this feature to be supported whenever the underlying system can.

Categories

Resources