How can I connect two android phones? - android

I want to connect two android phones via Bluetooth low energy but, I dont know how to create characteristic uuids and service uuid in android; I Googled a lot that I could connect the two android phones via Bluetooth low energy but, could not find useful stuff.
Please guide me that how could I solve the issue. I would be very thankful for this act of kindness. Thanks in advance.

From what i understood:
Upload BluetoothChat sample codes to both devices using Eclipse or Android studio
Pair them
Open BluetoothChat sample app
Connect to each other
Bingo, you are connected and even can chat in a range.
Regards

Related

How to make multiple bluetooth connections in android

I have been trying to connect multiple android phones to my app using bluetooth multiple connections concurrenlty.
Have followed the solution of a chatting app shared on android samples for bluetooth.
But I am able to only connect my phone to only one device(phone) at a time.
My code is exactly the same as that given in the sample demo on android devloper site.
any help would be really appreciated.
Thanks in advance.

Arduino not forming Bluetooth connection/sending sensordata from arduino to android

I'm using arduino Mega ADK and RedBear BLE shield.
The goal is to make arduino send sensordata to androidphone(nexus 7) via bluetooth. Sensor should be accelerometer/Gyro type.
I have used RedBears SimpleChat as a starting point to get understanding how this is suppose to work, but i'm having some problems. When i use RedBears own app from google play store and the examples that they distribute, everything works just fine. App finds arduino and i can connect to it that way.
But i can't connect to arduino without the app, it just... rejects it. I have tried changing my tablet settings anyway possible but that just doesn't seem possible.
Additionaly if i run any other code(not from the redbear i mean) to arduino, tablet cant find arduino from bluetooth connections anymore and neither can any app that has BT finding properties.
So what i'm trying to figure out is:
A way to connect my tablet to arduino without redBear app.
Does the redBear BLE shield somehow prevent other codes to be passable?
Does the redBear have some kind of BT method that is better than others?
Any help, examples or answers are much appreciated.
Sorry for the bad English -_-
Here is a SDK provided by RedBearLab for Android https://github.com/RedBearLab/Android. It also contains examples.

Bluetooth device detection disconnected/connected alert in android(eclipse)

I am an student developing an android application that will need to access the Bluetooth connection/disconnection.
I am new to android but I'm studying hard to be more familiar in creating android application.
please can anyone help me how to check if Bluetooth device is connected or not?
and also i want to detect if device is suddenly disconnected.
Please see these docs:
http://developer.android.com/guide/topics/connectivity/bluetooth.html
Specifically you're looking for:
Querying Paired Devices
and
Discovering devices
Also see this question:
How to programmatically tell if a Bluetooth device is connected? (Android 2.2)
EDIT: Some tutorials for you:
http://developer.android.com/training/index.html
http://www.tutorialspoint.com/android/android_bluetooth.htm

How do I connect external sensors to android mobile?

I want to connect a number of external sensors (temperature sensor,pressure sensor , etc..) to an android mobile. What are the different ways for this? How do I read data from these sensors? Thanks in advance
You need device like Arduino to connect sensors to android, which then connected via network and can communicate with each other.
You could use a cheap Arduino Nano from China, with a cheap HC-06 BlueTooth module, also from China.
Then read the values in a 10 mt range.
Or you could use a networked solution, to read values all over the Web.
Probably a bit late for this, but you should really try the IOIO-OTG board. Its purpose is to do exactly what you asked for: connect Android devices to sensors and actuators. The Android device can connect to the IOIO-OTG board via Bluetooth or USB/OTG cable. The programming is made in JAVA ( e.g. by using Eclipse ADT). Just google IOIO-OTG for more details or ask here and I can help you.
Have fun!

Android tablet communicate with ARM development board via bluetooth

I am new to embedded programming and I am given a project to establish Bluetooth communication between an Android tablet and an ARM development board with Bluetooth capabilities.
Please tell me whether this project can be done or not ??
If it can be done then how should I approach it ??
Thanks
Check out this page: http://www.amarino-toolkit.net/
They are using the arduino board with a bluetooth component to connect to android. You can check the source code of their library to see how they establish and use the connection here:
http://code.google.com/p/amarino/
If what you want is a simple and robust communication method over Bluetooth then SPP is definitely the way to go.
The only issue could be the bandwidth, but if the throughput of a traditional serial cable connection is enough for your application then there certainly won't be any problems there. IIRC then most modules have > 1 Mbit throughput using SPP.
Some information about using SPP on Android is here.
But we need a little bit more information to give suggestions about what you need to do on your ARM kit. Maybe you could post a few details about its type, which Bluetooth module is in use there, how it is connected to the ARM MCU etc.
If you're lucky then your kit's BT module can function as a serial cable replacement and you can treat it as if the Android device is connected to your MCU's UART. Of course prior to that, some configuration is needed over some interface (could be the same UART, depending on module type) to establish a Bluetooth connection.
Oh and to answer your first question: yes, it certainly can be done :)
I haven't worked with Android to ARM board via bluetooth but I have done some work communicating between an Android device and an Arduino using bluetooth. I tried to document what I learned in a series of examples. There are several that might be helpful.
http://digitalhacksblog.blogspot.com/2012/05/arduino-to-android-basic-bluetooth.html
http://digitalhacksblog.blogspot.com/2012/05/arduino-to-android-turning-led-on-and.html
http://digitalhacksblog.blogspot.com/2012/05/android-example-bluetooth-simple-spp.html
The first two examples show how to setup communication via bluetooth from an Android device to an Arduino with a bluetooth board. I would expect that to get some initial connectivity between the Android and the ARM the Android side of things would be the same.
The third example shows how to setup a simple spp client and server between an Android device and a PC running windows.
Hope this helps.

Categories

Resources