Android phone and Bluetooth module sepecificatoin - android

I am quite new with Bluetooth communication using Android. I want to develop a sample project that is to ON and OFF different LEDs via Bluetooth by using Android phone, for this I would need a Bluetooth module to communicate with the LEDs.
Now my questions are:
1) What technical specification are required for Bluetooth module to communicate with android phones(I have two android phones having Bluetooth version V2.1 and V3.0)?
2) which company's Bluetooth module would be better for me in the above situation?
Please help me in this respect I would be very thankful to you for this act of kindness. Thanks in advance.

http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html
Use the UUID specified there for SPP
The bluetooth adapter will work as a Server by default.So you should do Client programming on android side.
My project deals with sending data continuously,so I had to use HandlerThreads so that I don't block the UIThread.Since you don't need to send much data you can work directly on UIThread.So connecting as a client section of android documentation will do.

Related

I want to send text data through Ios to android using Bluetooth Low Energy Protocol through Advertisements

I want to send text data through Ios to android using Bluetooth Low Energy Protocol through Advertisements. I have tried alot of code examples but nothing find useful. Please suggest me any working example so i can transmit data in connection less transmissions through advertisements from Ios to android and android to ios. please help my guys. I will be thankful to you !!!
What you want to do is doable but you may need some digging and trial-and-error as there isn't any ready example that I am aware of. To achieve what you want, you have to:-
Send custom data from iOS via BLE advertisements.
Read the custom data from Android via BLE scanning.
You can achieve the first part through one of the examples below:-
Sending bluetooth LE data in advertisement on iOS
Custom BLE Advertisement on iOS
And info on the second part can be found here:-
How can I read the Bluetooth LE advertisement data in Android at the time of scanning
Read advertisement packet in Android
Some other useful references:-
Ble: Send advertise data to iOS from Android
Ultimate Guide to Apple's Core Bluetooth
Ultimate Guide to Android BLE Development

Transfer Data Using BLE with same application with in different android device

I need to transfer data from android phone to each other through my application using BLE. When a device comes near to me and my application is already installed in it, So my phone will establish a connection and send some data in strings and also receive from that device without notify user. Is it possible to do with BLE and I have studied BLE from
https://developer.android.com/guide/topics/connectivity/bluetooth-le
But I am new so I dont know from where to start and what should i have to do? Kindly let me know about BLE more easy for my better understanding and refer me some tutorials where I can learn that how will fulfill my application functionalities.
Thanks
I suggest starting with the Central-Peripheral example. Here you have an simple application:
https://github.com/itanbp/android-ble-peripheral-central
And tutorial with basis:
https://www.bignerdranch.com/blog/bluetooth-low-energy-on-android-part-1/
In the case you described, if there are not defined roles for the android phones (master, slave), the program will have to work in alternately in two modes: central and peripheral.
This is possible form the BLE side. However, there may be a problem with the application wroking as a background service. Since Android 8 there are new restrictions and limitations in background sericves:
https://developer.android.com/about/versions/oreo/background
Bluetooth Low Energy on Adnroid is very troublesome technology. A lot depends on the version of Android, processor and antenna system of the phone.

How can I retrieve my Bluetooth device UUID over BLE?

This is likely a very basic question. Our device has a new Bluetooth module.
After retrieving my device from a list of bonded devices I can no longer find a UUID. I can, however, find the device and retrieve its MAC Address, which I know is commonly used to connect over BLE.
Old module:
https://www.microchip.com/wwwproducts/en/BM78#additional-features
New module:
https://www.microchip.com/wwwproducts/en/bm70#additional-features
Is this simply because my new module doesn't support communication over SPP?
My app is written using the Android Bluetooth classic library.
Does this mean I need to rewrite the Bluetooth communication portion of my app for BLE?
Yes you'll need to rewrite your app to handle BLE, just follow this guide.
You can use BLE-Scanner app to debug BLE and to see what data is being used.

Bluetooth Beacon Device Suggestions

Hi new to the form always use it but never needed to ask anything, i just need advice on the following. thanks in advance!
Is it possible to connect a Bluetooth beacon to a visual studio c# application and use a android phone to send a message to the beacon where the application updates a database? many devices will be sending messages to the same beacon (my project idea). I know the android and messaging part will work but not sure if i can connect the beacon to the VS desktop c# app.
And this is the beacon i have been looking at, need something with a good range. (contacted manufacture about connecting it as they just show an app to configure. no reply lol)
https://accent-systems.com/product/ibks-105/
Open to suggestions.
Sorry, what you are describing won't work. Bluetooth beacons are essentially transmit-only devices. You can't send messages to them. All beacons do is transmit a unique identifier.
It's unclear what your project is trying to accomplish here, but you can use web services as an intermediary for mobile devices to communicate with a C# Desktop app. You can trigger this communication to happen when the mobile devices detect the bluetooth beacons.

How to send file / message between two android device with out any intermediate server

I want to send files between two devices using internet connection with out use any intermediate /server. For example there are two device A and B both have internet connection and both device have installed my application, now need to send a file from Device A to Device B. Device A can know all the detail about the Device B.
Is this possible means guide me in the correct way. Thanks in advance.
You can use a Peer to Peer architecture to achieve this. Basically every phone is a client and a server the same time. See here for a basic implementation.
If the internet is not a prerequisite, you can follow Minav Patel's suggestion and use the Android Bluetooth implementation.
Another solution would be the WiFi-Direct feature (if the phone support it). See here for an example.
You can implement file transfer between two android devices using android bluetooth implementation.Go through following links it will help
android bluetooth implementation basics
http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html
http://developer.android.com/guide/topics/connectivity/bluetooth.html

Categories

Resources