3

This is hardware related question. But also software related.

I am making an Android app using bluetooth. And I tested my devices with wifi and bluetooth.

And the result is:

 1. Wifi ON, connected & Bluetooth ON(possibile)
 2. Wifi ON, connected & Bluetooth ON, connecting to bluetooth product such as ear buds (possible)
 3. Wifi ON, connected & Bluetooth ON, connecting to other mobile devices (impossible)
 4. Wifi ON, disconnected & Bluetooth ON, connecting to other mobile devices (impossible)

When I try 3 and 4 cases. I get a popup message

Can't use Bluetooth tethering while connected to Wi-Fi network

I'd like to make an app that send data between two devices. And each device might be connected to Wifi.

For example, the app uses Bluetooth to connect other mobile phone and also internet for getting & sending data to the server.

At that time, the internet connection could be Wifi. So, It shouldn't be disconnected.

One of the reason that I found says Bluetooth uses 2.4Hz, and it is the same Hz of 802.11.

according to here, It's kind of true.

It says,

802.11 Provides up to 2Mbps transmission in the 2.4GHz band
802.11b Provides up to 11Mbps transmission in the 2.4GHz band
802.11a Provides up to 54Mbps transmission in the 5GHz band
802.11g Provides up to 54Mbps transmission in the 2.4GHz band
802.11n Provides up to 450Mbps transmission in the 2.4/5GHz band

However, I don't get it because we can connect it to wireless ear phones over Wifi.

Could you explain its behaviour? And what can I do? Or should I just make an app that uses only Bluetooth without wifi?

c-an
  • 3,543
  • 5
  • 35
  • 82
  • Please post your code. You might do something wrong. Bluetooth tethering is a function for sharing your internet connection. So if you share your internet connection by bluetooth, the bluetooth socket is blocked to that device. You also have to know that you only have one bluetooth hardware, not to. I don't know what kind of connection Bluetooth 3 or 4 is used for tethering. But it is tricky to use a 3 and a BLE connection at the same time on one bluetooth chip. Check also the source code of the Android BluetoothAdapter, if you get the default adapter you get always the same adapter. – Erythrozyt Aug 01 '19 at 06:43
  • @Erythrozyt I don't need `tethering`. `Device A` and `Device B` need to be connected each other by bluetooth and each of them can be connected to `Wifi`. And this is about android behaviour, I haven't implemented anything in code yet. – c-an Aug 01 '19 at 06:51
  • maybe the devices detect the other as `tethering` or `network sharing`. Not as a bluetooth module such as `wireless speakers` or `wireless ear buds`. And I want each mobile device detects the other like that. – c-an Aug 01 '19 at 06:56

0 Answers0