I create an android simple bluetooth terminal application for communication with my old java cellphone Sony Ericsson K700.I discover services from android and find this uuid : 1101(serial service) , 1103(DUN) .I test it with AT coomands at reply ok both of them.What is the difference between serial and dun bluetooth service? Can i connect to the internet from android using my old cellphone as modem?
DUN is dial-up networking and may get you online if you know the correct connect string. When I'd tether my old T-Mobile phone, I used something like at+cgdcont=1,"IP","epc.tmobile.com". The serial service is generally for communication to an app on the phone.
Related
I am working on a project that including an android phone that sends simple serial messages to a picaxe microcontroller(14m2) like '1','2','a' etc.
I searched alot on the web, and I only found a way that the android smartphone first "connecting" to the device and "discover" it, the problem is that PICAXE microcontroller is NOT a 'USB' device, and it can't be discoverd by the android, that means the android will not be able to send serial messages to the PICAXE.
if theres any way to send simple pulses from android to PICAXE, please let me know about it.
EDIT: There's any way to do that by connecting the AXE027 download cable with OTG?
I do some project with communicating over serial port. You can use chineese bluetooth adapters (see on ebay arduino bluetooth), those communicate with controllers via Usart and connect to phone by bluetooth. There is sample project Bluetooth chat from google about how to use bluetooth on android. On hardware iside, you can use arduino for receiving data by bluetooth and converting it in format of your controller. You wont have to use any wires
I'm working on an Android application and I have to make a Bluetooth serial communication between an Android device and a Computer with Ubuntu OS. I don't know what to do and how to connect them. I'm looking for good references and someone who can help me.
I made a button which navigates to the Bluetooth settings of our Android device. I don't know what else I should do.
Pair the devices. This has nothing to do with any software, so it has to be done via the phone settings
Once paired, look at 'Bluetooth Chat' example by Google. It has drop in code for connecting two devices. A serial connection is done via Serial Port Profile that is established over RFCOMM. The UUID for SPP is well known, again, you'll find it in the Bluetooth Chat example.
I'am trying to make an app that receives some binary data from a other device which is not running android. The Android phone should not transfer any data to this device. So over to my questions:
Should the phone act as the server which establishes the RCOMM channel?
Is it possible to connect the phone and this device without paring, as long as I know the MAC-address of the device? If so, how?
And yes, I have read http://developer.android.com/guide/topics/connectivity/bluetooth.html so no need to only answer with that link. :)
Thanks in advance!
1)
Phone should act as a receiver.
I found that the tricky part is to use correct UUID.
If you connect two phones you should be generating those and everything work fine, but on your hardware you can't change UUID that easily.
Take a look at these reserved UUIDs.
For a Serial Port Profile's (SPP) communication use UUID 00001101-0000-1000-8000-00805F9B34FB.
2)
You can connect to a device without pairing if you already know the MAC address, you don't even need to use BlueTooth discovery.
To get device using MAC address call getRemoteDevice(String)
and then createRfcommSocketToServiceRecord(UUID) to get BlueToothSocket.
Also take a look at checkBluetoothAddress(String) to validate MAC address.
I am trying to use Bluetooth SPP to communicate over it. In some Android phones, SPP profile is not activated. I faced the problem in the application that SPP was not activated and so the connection could not be established over bluetooth and when I started another app that is 3g hotspot which I think activates SPP and I was able to connect over bluetooth in my app.
So, how can we actually activate SPP profile of bluetooth in Android devices? And does all the android devices has SPP profile?
In developer.android.com BluetoothSocket:
The most common type of Bluetooth
socket is RFCOMM, which is the type
supported by the Android APIs. RFCOMM
is a connection-oriented, streaming
transport over Bluetooth. It is also
known as the Serial Port Profile
(SPP).
This might answer your question ..
https://source.android.com/devices/bluetooth/services
SPP (or ability to use Java API's to establish RFCOMM channels) is available from Android (2.0/2.1) release (Eclair) onwards
On the Android phone you will probably need to run an application that initiates the service over SPP.
**
public BluetoothServerSocket
listenUsingRfcommWithServiceRecord
(String name, UUID uuid)
** API can be used to create a service with specified UUID to listen,
Doing this should make this service visible to other devices which can then connect to it.
I just called Samsung help regarding bluetooth SPP on an S8+ phone. They tell me wait for Android Oreo as it isn't available till then. My previous Sony Xperia used Ntrip Client to talk to an external Geneq GPS to receive corrected coordinates and worked really well. Seems we went backwards somewhere?
Ntrip client on the phone collects an internet data stream of GPS corrections every five seconds and sends these to the GPS. The GPS uses the corrections and sends back adjusted coordinates to the phone to use in any application.
I would appreciate someone brighter than me pointing out a quick fix I just load and run to bring back this functionality.
I am trying to get an android phone to look like a bluetooth GPS unit so that a PC or any other device that supports bluetooth GPS can use it. I figured out the whole NMEA thing and have the device spitting out correct NMEA sentences. My problem lies in the bluetooth area though.
I have a bluetooth thread setup for listening for a connection. In windows I can see the service "Bluetooth GPS" that I created. The problem is I can't figure out how to get windows to open up the connection so I can start sending the NMEA sentences. When I enable the service in windows it says "Bluetooth Peripheral Device" and there are no drivers available.
What am I missing that would allow windows to understand that I want to communicate over RFCOMM and the device is a GPS device?
You need atleast Android 2.0 because unfortunately older versions of Android's Bluetooth API does not support RFCOMM yet neither does it support other methods of communicating its GPS data to an other Bluetooth device such as a windows PC.
Depending on the phone you are currently using you may be able to update it to Android 2.0.
I just tried it with my phone and it only supports Bluetooth headset and A2DP stereo audio.
You would have to create an app for android that passes your GPS data over Bluetooth RFCOMM just like the Bluetooth wireless tether app. You have to have the app running and then pair the device to your PC in order to use its services.