Need help trying to make BLE device be discovered - bluetooth

I am trying to create a custom device to connect to an app via BLE. The device can be discovered using nRF connect and other BLE scanners, but not with the app i'm trying to use. Any idea what the issue is? Could it be something with the UUID?

Related

Connecting to a custom device via Bluetooth when its SDK is unavailable

I am building an Android app in which I need to connect to an custom device over classic Bluetooth (preferably). My problem is SDK for that device is not created to facilitate the connection. Now I am stuck onto the part where I need to create a Socket which will be opened by the custom device which is acting as a server and other Android devices will act as clients and connect to it.
I am stuck at the part where we need to have identical UUIDs at both client and server for the socket connection to work. I am following the BleutoothChatApp as reference for this but I cannot always make sure that both my app and custom device will have identical UUIDs. Because I may or may not be able to hard code the UUID in custom device.
What can I do in such case.?
Also when I try to use BLE and search for services, I discover only one service which has no description or anything.
What can I do in such cases. What will be the best approach to create a connection to that device.?
You get multiple UUIDs for the same device because the devices offer multiple services. Base UUID for Bluetooth is "00000000-0000-1000-8000-00805F9B34FB".
If you find this UUID in a device, it means it supports Bluetooth Service. Use the UUID for connecting to the device.

Send a string from Arduino to Windows Store App via Bluetooth?

I am trying to get a Unity3d Windows Store App game to read a string of text that is sent from an Arduino Uno Rev3 over Bluetooth.
Unfortunately, the Windows Store App platform does not allow use of the System.IO.Ports namespace, so I am not sure how to get it to read the Bluetooth data.
Does anybody know how to read data from Bluetooth in a Windows Store App?
Any help is appreciated,
Thanks
If your HC-06 has COM-port capabilities, then you can use: [https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication
there is a sample on Github:
[https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/SerialArduino
To find out if your device has COM-port capability on windows 10 go to settings/Bluetooth, pair device and go to more settings, tab com-ports and try to add port. If the list is empty unfortunately you can not use Windows.Devices.SerialCommunication APIs to communicate with an Arduino device.
Another way is to use the Bluetooth GATT protocol for communication.
It allows you to read and write data and subscribe to indicate and notify events.
For this there is also a sample on github:
[https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLEClient
It depends on your HC-06 what Gatt-services are available but there is most likely a service that can reed and write and get notifications.
Hope this can help you,
Groover
I ended up using a BLE solution based on this example:
https://www.simplicity.be/article/eddy-and-his-stones-diy-arduino-beacon-mobile-apps/

MIT App Inventor Bluetooth connect with unpaired device

I am using MIT App Inventor 2 to do some bluetooth connection. I am trying to connect to my Arduino Bluetooth hc05.
I noticed that if I didn't pair my device, the app I wrote can't connect to the device.
Below is the code that I used to connect to my Bluetooth device.
Is there any way to use the code to connect with the Bluetooth device without having to pair it first?
Or is there any way to use the code to input the pairing password using MIT App Inventor 2?
The devices must be paired before being able to connect.
There is no Pairing method available in the App Inventor Bluetooth components. But you could write your own extension, which does the pairing.
More information about how to create an extension see here.
However that will be more advanced and will require some Java skills...

Custom UUID for bluetooth using bluez

I'm trying to pair my iPhone with my ubuntu computer over bluetooth. I'd like to use CoreBluetooth. I have bluez configured correctly, but I need a UUID for CoreBluetooth to connect to my computer. How do I go about setting a custom UUID in bluez?
Ultimately, I'd like to send commands with my iPhone to my pc and then use https://github.com/eelcocramer/node-bluetooth-serial-port to access the transferred data. Is there a better way to do this? I'm new to bluetooth.
Does your computer supports bluetooth 4.0? You can search for
[centralManager scanForPeripheralsWithServices:nil options:nil];
and every reachable device will be found.
With your other problem i can't help you sry.
You need to use bluetooth classic not the low energy for serial port communication

I am using Sample App of Bluetooth Chat.I want to search only those devices on which "BluetoothChat" is installed

I am using Sample App of Bluetooth Chat.I Have one problem I want to search only those devices on which "BluetoothChat" is installed. Please help I am new in android.
It can't be done. All you can do is try connecting them all, if the connection is refused, you will know that this device is not running your app.
That is not possible.because you did not check package name of your application in another device before connectivity via bluetooth.If you want to connect only tab or mobile device then this can easily possible.

Resources