Bluetooth not discovering device

Bluetooth device not discoverable

I’d like to establish a Bluetooth communication between an Android phone and a remote device. The class of the remote device is a basic one just a simple Bluetooth adapter. When I use the Bluetooth scan devices function, the phone recognizes devices from different class (ex. computer, phone, Bluetooth headset) but not this one. I tried it on a Samsung Galaxy Theos and a HTC Wildfire with Android 2.1 but I got the same result with both. Is that possible that the phone manufacturer or Android filters certain class of devices? Otherwise, is there another way to make this device discoverable? Thanks in advance. lorenth

Did you check that your remote device is discovarable? I had problems with a bluetooth headset in the past; it just required the right button presses to make it publicly visible.

Hi dorzey, thanks for answering me back. This one has no button. It’s a very basic Bluetooth adapter powered by a RJ45 cable. A green light notices that is powered and consequently visible by other devices. Actually I tried on a Nokia 3109 with J2ME embedded before and it recognized the remote device without problem. So I think the problem does not come from the remote device. Thanks for your help

Thanks for answering me back Dennis. It’s a Bluetooth dongle adapter using Bluetooth Serial Port Profile for communication. The device is not a commercial one.

4 Answers 4

I was able to work around the issue not by changing things at the Android end but by changing the class of the bluetooth adapter. I know this doesn’t solve the original issue of class 0x00 devices being blocked, but at least you can use a BT serial device with android despite the bug.

I bought a Bluetooth serial converter from ebay (link here: http://www.ebay.co.uk/itm/Bluetooth-RS232-serial-Converter-Module-Adapter-Board-/190508188703?pt=LH_DefaultDomain_0&hash=item2c5b2c441f ) which, as expected, wasn’t recognized by my HTC Desire in its default configuration.

I didn’t want to try the app by Zorn software mentioned above, because some people reported it messing up their HTC phones. Instead, I found from the BT device’s AT commands datasheet that you can change, among other parameters, the device’s class number by using an UART connection and a terminal program.

It took me a while to figure out that you can’t use the Bluetooth serial connection to access the configuration interface, but that you must use the physical RX and TX pins on the device instead. You also need to connect the pin named «Key» to Vcc to activate the command mode. So I used an AVR serial programmer device’s RS232 to UART interface to connect to the RX/TX pins and used Realterm as the terminal program. This got the AT command interface working once I had the right baudrate, 38400, and swapped the RX and TX leads which I initially connected the wrong way around.

Читайте также:  Телефон разрывает bluetooth соединение

I used the generator here http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html to get a valid non-zero class number (I used object transfer/computer/desktop workstation, which amounts to 0x100104), and entered it to the device with the command

where \r\n indicates Enter (see the datasheet).

After switching the BT adapter off, disconnecting the «Key» pin and switching on again, I was able to pair it with my phone the normal way. Data transfer also worked. I again used the AVR programmer’s UART and Realterm to send some data (a Hello World message in ASCII) to the RX/TX pins of the adapter. In the Android end, I used the app SENA Bterm to receive the data.

I hope this helps someone do interesting things with their phones and embedded systems.

Источник

[Fixed] Bluetooth not detecting devices on Windows 10

If you’re on Windows 10 and your Bluetooth devices are not showing, don’t panic. Here are 4 solutions to try.

Try these fixes:

You may not have to try them all; just work your way down the list until you find the one that does the trick for you.

  1. Remove all Bluetooth device
  2. Run the Bluetooth troubleshooter
  3. Set the Bluetooth support service to automatic
  4. Update your Bluetooth driver

Fix 1: Remove all Bluetooth devices

If you’ve connected multiple Bluetooth devices to your PC, chances are that one or more of your devices is preventing your PC from detecting other Bluetooth devices.

To see if that’s the problem for you, try removing all Bluetooth devices on your computer and pair only the desired devices. Here is how to do it:

1) On your keyboard, press the Windows Logo Key.

2) Type control panel, then hit the Enter key.

3) Under View by, select Category, then click View devices and printers.

4) Right-click your Bluetooth device and select Remove device.

5) Click Add a device to see if your Bluetooth works properly now.

If your problem persists, then move on and try the fix below.

Fix 2: Run the Bluetooth troubleshooter

Another quick fix to this problem is running the Bluetooth troubleshooter. The Bluetooth troubleshooter is a Windows built-in utility that can detect and fix common Bluetooth issues automatically.

1) On your keyboard, press the Windows logo key and type troubleshoot. Then hit the Enter key on your keyboard.

Читайте также:  Блютуз ниссан патфайндер r51

2) Select Bluetooth, then click Run the troubleshooter.

3) Wait for this process to be complete. Then, try pairing your Bluetooth devices to your PC again.

If your Bluetooth still won’t discover devices, then read on and try the next fix.

Fix 3: Set the Bluetooth support service

You’re likely to encounter the Bluetooth not detecting devices error if the Bluetooth service isn’t running properly on your PC. To see if that’s the core issue, follow the instructions below:

1) On your keyboard, press the Windows logo key and R at the same time.

2) Type services.msc, then hit the Enter key.

3) Right-click Bluetooth Support Service. If the service is running, click Restart; if the service isn’t running, click Start.

4) Right-click Bluetooth Support Service and select Properties.

5) Set the Startup Type to Automatic, then click OK.

6) Try connecting your Bluetooth devices to test your problem.

If your issue continues to occur, then try the next solution, below.

Fix 4: Update Bluetooth driver

You might run into this issue when you’re using a faulty Bluetooth driver, or the driver is outdated. Try updating your Bluetooth driver to see if that’s the problem for you.

There are two ways you can get the right driver for your Bluetooth: manually or automatically.

Manual driver update – You can update your driver manually by going to the manufacturer’s website for your Bluetooth, and searching for the most recent correct driver. Be sure to choose only driver that is compatible with your Windows version.

Automatic driver update – If you don’t have the time, patience or computer skills to update your driver manually, you can, instead, do it automatically with Driver Easy. Driver Easy will automatically recognize your system and find the correct driver for your device, and your Windows version, and it will download and install them correctly:

1) Download and install Driver Easy.

2) Run Driver Easy and click the Scan Now button. Driver Easy will then scan your computer and detect any problem drivers.

3) Click the Update button next to the Bluetooth driver to automatically download the correct version of that driver, then you can manually install it (you can do this with the FREE version).

Or click Update All to automatically download and install the correct version of all the drivers that are missing or out of date on your system. (This requires the Pro version which comes with full support and a 30-day money back guarantee. You’ll be prompted to upgrade when you click Update All.)

4) Restart your PC, then try reconnecting your Bluetooth devices to test your issue.

Читайте также:  Блютуз колонка сони srs xb23

Hopefully, this article helped in resolving your issue. Please feel free to leave a comment below if you have any questions or suggestions.

Источник

Android — Bluetooth discovery doesn’t find any device

Actually no device is found when i launch the .onDiscovery() method, even though devices are found from Settings/Bluetooth on my Nexus 5.

public class MainActivity extends AppCompatActivity

The filter is working well as far as i could try, i.e ACTION_STATE_CHANGED (on bluetooth enabling) and the two ACTION_DISCOVERY_***.

The following method is then successfuly called:

public void onDiscovery(View view)

And then i have my bluetooth receiver:

private final BroadcastReceiver mReceiver = new BroadcastReceiver() < public void onReceive(Context context, Intent intent) < String action = intent.getAction(); if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) < final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); if (state == BluetoothAdapter.STATE_ON) < showToast("ACTION_STATE_CHANGED: STATE_ON"); >> else if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(action)) < mDeviceList = new ArrayList<>(); showToast("ACTION_DISCOVERY_STARTED"); mProgressDlg.show(); > else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action) && !bluetoothSwitchedOFF) < mProgressDlg.dismiss(); showToast("ACTION_DISCOVERY_FINISHED"); Intent newIntent = new Intent(MainActivity.this, DeviceListActivity.class); newIntent.putParcelableArrayListExtra("device.list", mDeviceList); startActivity(newIntent); >else if (BluetoothDevice.ACTION_FOUND.equals(action))
    androidbluetoothreceiver
)" data-controller="se-share-sheet" data-se-share-sheet-title="Share a link to this question" data-se-share-sheet-subtitle="" data-se-share-sheet-post-type="question" data-se-share-sheet-social="facebook twitter devto" data-se-share-sheet-location="1" data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f" data-se-share-sheet-license-name="CC BY-SA 3.0" data-s-popover-placement="bottom-start">Share
)" title="">Improve this question
)">edited Jan 24, 2016 at 15:08
asked Jan 23, 2016 at 16:50
1
    I had the location permission in my manifest using Nexus 5 and I was not finding any devices. The missing thing for me was not asking for location permission in the MainActivity (or whatever activity hosting the search) before searching for devices. That solved the issue for me
    – Khash
    Sep 1, 2019 at 19:30
Add a comment|

3 Answers 3

Reset to default
88

What version of Android are you running this on? If it is Android 6.x, I believe you need to add the ACCESS_FINE_LOCATION permission to your manifest. For example:

I had a similar issue and this fixed it for me.

UPDATE: Adding documentation direct from Google on this:

To access the hardware identifiers of nearby external devices via Bluetooth and Wi-Fi scans, your app must now have the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permissions

UPDATE 2020: We recently updated our application to target SDK Version 29. In doing this, our application stopped being able to discover Bluetooth devices again. We have been using ACCESS_COARSE_LOCATION since this answer was originally written. Changing to ACCESS_FINE_LOCATION appears to fix the issue. I now recommend developers try ACCESS_FINE_LOCATION if targeting 29+. Answer updated to reflect this.

Источник

Оцените статью
Adblock
detector