bluetooth

Bluetooth LE dual-mode

耗尽温柔 提交于 2021-02-07 20:19:07
问题 Is it possible for the Bluetooth dual-mode device to be discoverable by classic bluetooth at the same time as being pairable with BT LE devices? It's ok if the device can not operate with both at the same time, but should I switch the chip between those modes really? I just can not find the answer in the BT 4 Core Specification 回答1: Yes, A dual mode device can be discoverable by classic Bluetooth while being connected to a LE device. The device can also be connected to both classic and LE at

Create a socket for 4.0 bluetooth transmission

[亡魂溺海] 提交于 2021-02-07 17:02:53
问题 I'm developing an Android app than can transmit data to a 4.0 Bluetooth serial device. I'm guiding by LeGatt android sample project (http://developer.android.com/samples/BluetoothLeGatt/index.html). In this project, they connect to the device, but nothing about transmission data. For 2.0 bluetooth I can create a Socket, InputStream and OutputStream to transmit the data, something like this: protected BluetoothSocket mySocket = null; private InputStream MyInStream; private OutputStream

GATT profile and UART service

非 Y 不嫁゛ 提交于 2021-02-07 13:27:28
问题 I am new to developing a mobile app with bluetooth connection to peripheral device. I searched that GATT is the relevant profile used for bluetoothLE communication but our client recommended that we use UART service. Now I am confused as to 1. how these two things are related and 2. Do we have to opt for one of these, if so, what are the pros and cons of each. Thanks 回答1: Legacy Bluetooth provides the serial port profile (SPP) - This is essentially a serial input/output stream over Bluetooth.

GATT profile and UART service

霸气de小男生 提交于 2021-02-07 13:26:58
问题 I am new to developing a mobile app with bluetooth connection to peripheral device. I searched that GATT is the relevant profile used for bluetoothLE communication but our client recommended that we use UART service. Now I am confused as to 1. how these two things are related and 2. Do we have to opt for one of these, if so, what are the pros and cons of each. Thanks 回答1: Legacy Bluetooth provides the serial port profile (SPP) - This is essentially a serial input/output stream over Bluetooth.

Custom BLE Advertisement on iOS

不羁的心 提交于 2021-02-07 12:22:02
问题 I'm hoping to create a BLE advertisement on iOS where I can control the advertisement on a byte level. One use case would be to mimic an iBeacon advertisement. What is the iBeacon Bluetooth Profile (I want to advertise while my app is in the background which is why I'm not using CoreLocation) I do not see a way to do this with the Core Bluetooth API. Is this correct? Are there alternatives using private API's or jailbreaking? 回答1: As the others already pointed out, there is no API on iOS that

Custom BLE Advertisement on iOS

北城以北 提交于 2021-02-07 12:21:33
问题 I'm hoping to create a BLE advertisement on iOS where I can control the advertisement on a byte level. One use case would be to mimic an iBeacon advertisement. What is the iBeacon Bluetooth Profile (I want to advertise while my app is in the background which is why I'm not using CoreLocation) I do not see a way to do this with the Core Bluetooth API. Is this correct? Are there alternatives using private API's or jailbreaking? 回答1: As the others already pointed out, there is no API on iOS that

how event packet header is getiing in hci_send_req api implementation?

蓝咒 提交于 2021-02-07 10:15:38
问题 Hi I am going through hci_send_req implementation in hci.c file. in this function after sending hci command to controller . Controller send event packet. After reading event packet in buffer by read(dd, buf, sizeof(buf)) (dd is hci socket descriptor) , now we need event packet header and to get event packet header, buf is sifted by 1 byte. why?? hdr = (void *) (buf + 1); (line number 1049 of hci.c) Please let me know about this. Thanks. 回答1: HCI Event Packets: the Host Controller notifies the

Loopback in Android Bluetooth

£可爱£侵袭症+ 提交于 2021-02-07 10:01:08
问题 Is it possible to make a loopback Bluetooth connection in an Android phone so that one service can connect to another within the same phone (or even to itself)? The idea is to use it so I can test a multi-player game that uses Bluetooth to communicate between players. 回答1: No it is not possible for bluetooth services to connect to itself or other services on the same phone. 来源: https://stackoverflow.com/questions/6497723/loopback-in-android-bluetooth

How to Change the Scan Mode of Bluetooth Adapter in android.?

纵然是瞬间 提交于 2021-02-07 09:46:41
问题 Currently i am working on a Bluetooth app where i need to change the Scan Mode from SCAN_MODE_CONNECTABLE_DISCOVERABLE to SCAN_MODE_CONNECTABLE on click of a button. i am setting it Discoverable using following Intent: Intent discoverableIntent = new Intent( BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent .putExtra( BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, DISOVERABLE_DURATION); startActivityForResult(discoverableIntent, REQUEST_DISCOVERABLE_BT); where i have set

Sending user weight to Smart Trainer via ANT+FEC over BLE

一笑奈何 提交于 2021-02-05 11:31:06
问题 Does anyone has any knowledge of how to send user weight settings to DataPage 55 for a indoor Smart Trainer? I want update user weight such that grade simulation can be made more realistic. I have managed to get Grade (data page 51) sent successfully and implementing the same format for User Weight doesn't seem to do anything. func sendUserConfig(_ peripheral: CBPeripheral, characteristics: CBCharacteristic, userWeight: Double) { let userWeightKG = (400) let uWeightLSB = UInt8(Int