rfcomm

Connecting two raspberry pi through bluetooth with bluez

痴心易碎 提交于 2019-12-13 03:55:49
问题 I'm trying to use this API: https://www.linumiz.com/bluetooth-connectdevice-without-scanning/ to make a connection between two Raspberry PI. I'm using this program like a server such as: pi@raspberrypi:~/bluetoothC $ sudo ./bin/bluez_adapter_connect Adapter is Powered "on" and then, in the client side: pi@raspberrypi:~/bluetoothC $ sudo ./bin/bluez_adapter_connect B8:27:EB:9F:91:A7 Adapter is Powered "on" Unable to get result: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method

How do I dump serial communication as file through Android bluetooth serial RFCOMM

送分小仙女□ 提交于 2019-12-11 17:35:56
问题 My Android app receive serial communication over bluetooth from desktop application. I have no control over what that desktop application is doing. Using Google BluetoothChat sample code (https://github.com/googlesamples/android-BluetoothChat). I manage to make it working and to some extent I can simply took the bytes coming to my android app and write a file. However, the code function is something like 1 - Android listen 2 - PC send data, Android accept connection read data and write to

Example connecting Android and Bluecove on a Mac

白昼怎懂夜的黑 提交于 2019-12-11 09:21:14
问题 I have an Android device (HTC Incredible) and I would like to setup bluetooth communication between the android phone and a MacBook Pro. I have got bluecove to start on the Mac and I have done coding using Sockets in Android, but I can not get a connection working. Here is my andriod code BluetoothDevice device = reciever.getDevice("00:25:00:XX:XX:XX"); //my bluetooth address UUID generalUuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); socket = device

Frequent random failures (Service discovery failed) in createInsecureRfcommSocketToServiceRecord

穿精又带淫゛_ 提交于 2019-12-11 00:57:15
问题 I am attempting to establish an insecure Bluetooth socket connection between two Android devices. I control the software on both ends. One end uses listenUsingInsecureRfcommWithServiceRecord to listen for a connection, the other end uses createInsecureRfcommSocketToServiceRecord to connect. This works. Sometimes. The "sometimes" is my problem. In about 20% of the attempts, it fails and throws the following exception: java.io.IOException: Service discovery failed at android.bluetooth

Not able to connect a Bluetooth Keyboard to an android device

拥有回忆 提交于 2019-12-10 22:47:21
问题 I am trying to programmatically connect an Android phone to a Bluetooth device (which is already paired). I am using createRfcommSocketToServiceRecord(UUID) method in a thread. I know the Bluetooth keyboard is a HID device so I am using UUID as 00001124-0000-1000-8000-00805f9b34fb The above method returns a BluetoothSocket object, but it fails to connect to the HID device, when bluetoothSocket.connect() is called. It gives IOException: discovery failed I have searched about this a lot, but no

Bluetooth Android RFCOMM / SPP error handling suggestions

狂风中的少年 提交于 2019-12-08 23:34:39
问题 I am planning a communication protocol to be used between an Android device and a custom sensor that would use a commercial Bluetooth module. I would use the SPP profile that is said to "provide a simple reliable data stream to the user, similar to TCP." I am not so familiar with the Bluetooth technology and have some questions about designing such a protocol. First of all it is not clear to me if I have to worry corrupted data being transferred or not. Will the underlying protocoll stack

Insecure rfcomm connection in Python

橙三吉。 提交于 2019-12-08 10:19:47
问题 I would like to establish a bluetooth connection from an android device to a Raspberry Pi without pairing. The language used in RPi is Python. I am connecting using createInsecureRfcommSocketToServiceRecord from android. However the connection is established only when the two devices are paired. Is there an equivalent of listenUsingInsecureRfcommWithServiceRecord in Python? Raspberry Pi code server_sock=BluetoothSocket( RFCOMM ) server_sock.bind(("",PORT_ANY)) server_sock.listen(1) port =

Bluetooth in C++

99封情书 提交于 2019-12-04 21:08:21
问题 I am looking to communicate via RFCOMM to another Bluetooth device. I want to use C++ (VS2008) for the application. I already know of the 32feet library, but was unsure if it would work for C++. Does anyone know of a good starting point for this kind of project? Or possibly 32feet samples written in C++? I want a simple, easy to use API for Bluetooth using C++. 回答1: You can do Bluetooth programming using BT sockets into the OS Bluetooth stack. This page discusses socket usage: http://msdn

Could more than one RFCOMM channels be created per time?

℡╲_俬逩灬. 提交于 2019-12-04 07:12:55
Question: Could more than one RFCOMM channels be created per time? Testing method: Create connections from Cellphone(Samsung GALAXY S) to two terminals in the PC. PC has two different bluetooth devices(build-in and USB dongle) and using different COM ports, say COM1 and COM2. Steps: Testing each connection from cellphone to different bluetooth devices in PC using SPP, separately. ----> OK, cellphone could read what PC has sent in terminal using each bluetooth device. This means PC, bluetooth device 1(BD1), bluetooth device 2(BD2) are working fine via SPP. Now, I am going to test two

Bluetooth in C++

本小妞迷上赌 提交于 2019-12-03 13:55:40
I am looking to communicate via RFCOMM to another Bluetooth device. I want to use C++ (VS2008) for the application. I already know of the 32feet library, but was unsure if it would work for C++. Does anyone know of a good starting point for this kind of project? Or possibly 32feet samples written in C++? I want a simple, easy to use API for Bluetooth using C++. You can do Bluetooth programming using BT sockets into the OS Bluetooth stack. This page discusses socket usage: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362928(v=vs.85).aspx This page has links to download Bluetooth