rfcomm

Android Bluetooth Chat sample app - multiple connections

会有一股神秘感。 提交于 2019-11-30 07:49:21
问题 Is it possible to set up the Android Bluetooth Chat sample app to connect more than one person at a time, and have a mini chat room? What would that entail? 回答1: tl;dr version: Bluetooth sucks for this, don't use it, use wifi instead, probably backed by a web backend. I have investigated this issue thoroughly throughout the years in the interests of a social wireless network research project. My general advice is: it doesn't work with more than two / three people. Bluetooth just isn't

Android Bluetooth Serial RFCOMM low baud rate / slow transmission

北城以北 提交于 2019-11-30 06:51:14
问题 I'm working on an Android Bluetooth project to send and receive data from a custom made hardware. I used Bluetooth Chat Sample in SDK as basis. I realized that there is no way to change baud rate on Client (Android phone) and baud rate will depend on hardware. I tried setting different baud rates on hardware and none met our expectations; Fastest i can get is 91Kbps (when baud rate is set to 2.7Mbps ~ 910Kbps). Using minimum baud rate (115Kbps) i get 43Kbps. I tried using different phones and

Data Transmisison error using SPP over Bluetooth on Android

不想你离开。 提交于 2019-11-29 23:21:19
I've been having an issue with data integrity using an RFCOMM socket over Bluetooth in Android. I don't have any issues connecting, but the data I receive is garbled and not the same as the data that is sent. The data is sent by an RS232 device over a Bluetooth adapter, which the phone connects to. There isn't a problem with the adapter as the data is properly received if I connect with a laptop. My Bluetooth connection is handled based off of the BluetoothChat sample application found at the Android developer site ( http://developer.android.com/resources/samples/BluetoothChat/index.html ),

Android detect Bluetooth disconnect immediately Max 2 seconds

旧城冷巷雨未停 提交于 2019-11-29 16:59:32
问题 I'm looking for a way to detect the disconnection of a Bluetooth device immediately after it has happened (2 second max), typically in a "device too far" scenario or Device battery is dead. Currently I can detect it with a BroadcastReceiver by getting a BluetoothDevice.ACTION_ACL_DISCONNECTED , but it takes about 16 to 20 seconds to fire. Is there any way to get notified in 2 seconds Max. I used BroadcatReceiver but it is not fast enough to get alert in 2 seconds Max, so is there any other

Why can't HTC Droid running OTA 2.1 communicate with RFCOMM?

心不动则不痛 提交于 2019-11-29 09:01:35
Yesterday we received OTA Android 2.1 on my wife's HTC Droid - HOORAY!!! I am finally able to load my carputer app on her phone. Well we loaded it, but it doesn't work. Specifically, it connects but sees no I/O!!! I paired, re-paired, and re-paired again, every time its the same problem: connect() says we connected successfully, but any attempt to send or receive data appears to work but no data ever arrives in the input buffer. The device I'm connecting to uses AT commands. ATI should respond with a device ID. That works fine when I run the app on my Moto Droid, but on the HTC droid, no data

Android Bluetooth Chat sample app - multiple connections

≯℡__Kan透↙ 提交于 2019-11-29 05:18:10
Is it possible to set up the Android Bluetooth Chat sample app to connect more than one person at a time, and have a mini chat room? What would that entail? tl;dr version: Bluetooth sucks for this, don't use it, use wifi instead, probably backed by a web backend. I have investigated this issue thoroughly throughout the years in the interests of a social wireless network research project. My general advice is: it doesn't work with more than two / three people. Bluetooth just isn't designed with wireless peer to peer networks in mind. In general, it seems that the cheap Bluetooth controllers

Data Transmisison error using SPP over Bluetooth on Android

最后都变了- 提交于 2019-11-28 21:13:55
问题 I've been having an issue with data integrity using an RFCOMM socket over Bluetooth in Android. I don't have any issues connecting, but the data I receive is garbled and not the same as the data that is sent. The data is sent by an RS232 device over a Bluetooth adapter, which the phone connects to. There isn't a problem with the adapter as the data is properly received if I connect with a laptop. My Bluetooth connection is handled based off of the BluetoothChat sample application found at the

Bluetooth RFCOMM / SDP connection to a RS232 adapter in android

≡放荡痞女 提交于 2019-11-28 03:29:46
I am trying to use the Bluetooth Chat sample API app that google provides to connect to a bluetooth RS232 adapter hooked up to another device. Here is the app for reference: http://developer.android.com/resources/samples/BluetoothChat/index.html And here is the spec sheet for the RS232 connector just for reference: http://serialio.com/download/Docs/BlueSnap-guide-4.77_Commands.pdf Well the problem is that when I go to connect to the device with: mmSocket.connect(); (BluetoothSocket::connect()) I always get an IOException error thrown by the connect() method. When I do a toString on the

Android Bluetooth Serial/RFCOMM/SPP, How to Change the BAUD RATE?

走远了吗. 提交于 2019-11-27 14:30:09
This is very frustrating as I've been trying for weeks and not even a clue on the internet. I am working on a project that reads/writes bluetooth serial data on different farming hardware. most of these hardware are old and changing the baud rate of their SPP is not an option. I'm using the android bluetooth chat as a basis to read/write, I've only changed the UUID to allow connection to the devices I have I've managed to read from a tag reader at a bad rate of 19,200 beautifully, and formatted nicely However, I'm stuck now with the scales which has a baud rate of 9,600 and shows funny

Receive audio via Bluetooth in Android

大兔子大兔子 提交于 2019-11-27 06:06:54
I want to create an Android application that is capable of receiving an audio stream. I thought of using the A2DP profile, but is seems as if Android doesn't support A2DP sink. Looks like there are a lot of people that's searching for a solution for this problem. But what about receiving an ordinary bit stream, and then convert the data into audio in the application? I was thinking of receiving an PCM or Mp3 data stream via the RFCOMM (SPP Bluetooth profile), and then play it using AudioTrack. First, how do I receive a bit stream on my Android phone via the RFCOMM? And is it possible to