bluetooth-lowenergy

Can't read Gatt characteristic (gatt error 15)

老子叫甜甜 提交于 2019-12-12 18:52:03
问题 I'm trying to read a characteristic right after gatt connected and services discovered successfully. But receives error 15 (0x0f, GATT_INSUFFICIENT_ENCRYPTION) and then 137 (0x0089) in onCharacteristicRead gatt callback. After this error gatt disconnecting immediately. My device is Samsung S4, 4.4.2. 回答1: As far as i know both errors, "GATT_INSUFFICIENT_ENCRYPTION" and "GATT_INSUFFICIENT_AUTHENTICATION" gets occurred when you try to do a GATT operation that requires encryption. This means

BluetoothLeAdvertiser AdvertiseCallback throws ADVERTISE_FAILED_TOO_MANY_ADVERTISERS

好久不见. 提交于 2019-12-12 18:35:52
问题 I have this code to create an Advertise: private void startLeAdvertise() { AdvertiseSettings settings = new AdvertiseSettings.Builder() .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY) .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH) .setConnectable(true) .setTimeout(ADVERTISE_TIMEOUT) .build(); AdvertiseData data = new AdvertiseData.Builder() .addServiceUuid(new ParcelUuid(UUID.fromString(BEACON_SERVICE))) .build(); mAdvertiseCallback = new AdvertiseCallback() {

iOS and CoreBluetooth Low Energy Required?

血红的双手。 提交于 2019-12-12 17:59:53
问题 We are making MFi hardware and an iOS app. We will want to have the BT device notify our app even if we are not running periodically when certain events happen. I know the CoreBluetooth API is the one to use, but can't tell for sure if that API only works with BT Low Energy devices or if it will also work with regular (MFi of course) BT 2.1 and higher devices. So my question is: Does the CoreBluetooth API only work with Bluetooth Low Energy devices or will it also work with 2.1 devices? 回答1:

What is the reason for the slow speed of processing packets of information received by Android via Bluetooth Low Energy?

China☆狼群 提交于 2019-12-12 17:23:18
问题 The task is to transfer information from a chip with BLE 4.0 to an Android device at high speed (at least 24 kbps). Bluetooth specification allows it. We used two methods: write / read (we write the request into one characteristic, the answer is read from the other) and notify (the chip constantly transmitted packets with a frequency of 50 ms). In the case of write / read, the time for rewriting and reading a packet varies in the region of 100 ms. When using notify, the time was set to 50 ms,

How to add multiple permissions and properties to a characteristic

烂漫一生 提交于 2019-12-12 13:11:51
问题 There is only one constructor for type BluetoothGattCharacteristic BluetoothGattCharacteristic(UUID uuid, int properties, int permissions) Does the constructor take exactly one property and one permission? For example, I want a characteristic to be both readable and writable. Doesn't this means I need two sets of permission-property pairs? PERMISSION_READ PROPERTY_READ and PERMISSION_WRITE PROPERTY_WRITE But according to the constructor, I can only set one permission and property when I need

Getting different byte[] scanRecord data for same BLE device while scanning with different versions of android device

…衆ロ難τιáo~ 提交于 2019-12-12 10:57:26
问题 private final BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) { } } I scanned a single BLE device from Acer table of version 4.4.2 and Nexus 7 5.1 version. I want to filter the BLE devices using UUIDS, but I am getting different scanRecord data for same BLE device. I attached the detailed pics. 回答1: This is pretty common in BLE world. When a BLE

iPhone: How to erase/wipe out bluetooth 4.0 data

ぃ、小莉子 提交于 2019-12-12 09:39:12
问题 I am having some major trouble with my Bluetooth Low Energy application sometimes dont manage to connect to my device (described in thread). I need to wipe out all stored data from previous connections before running my application, and as far as I know, this can only be done by rebooting the phone. Is there any other way, preferably programatically, to do this? Thank you 回答1: I am having the same issue and have found the steps to reproduce it. It is 100% reproducible when you transmit data

Bluetooth Peripheral ADVERTISE_FAILED_DATA_TOO_LARGE

旧时模样 提交于 2019-12-12 07:14:32
问题 I am trying to advertise in NEXUS 9 and getting the error of ADVERTISE_FAILED_DATA_TOO_LARGE. It was working perfectly fine when I was adding the service after successfully advertising but if I add the service through Advertise Data builder so that other devices can filter while scanning, I get error code 1 i.e ADVERTISE_FAILED_DATA_TOO_LARGE a) Working Code public void startAdvertisingService() { AdvertiseSettings settings = new AdvertiseSettings.Builder() .setTxPowerLevel(AdvertiseSettings

Working with BLE Android 4.3 how to write characteristics?

天大地大妈咪最大 提交于 2019-12-12 07:06:32
问题 I am working on a BLE project (Android application) using Android 4.3 API, i have used sample BLE app it is only reading characteristics in DeviceControlActivity.activity, but i want to write characteristics and send it to BLE chip on clicking a button. How can I write data on chip cc2540 .. Basically i don't know the step by step procedure to write characteristics. write i can only see the name and id of device with following piece of code in DeviceControlActivity private final

Restricting the BLE peripheral device to connect to only one Master

旧巷老猫 提交于 2019-12-12 06:26:57
问题 I want to restrict my BLE Peripheral device to connect with only one master always .IF i receive a connection request from some other master/central device, it should reject the connection request ! Thanks for your help ! Regards, Senthil 回答1: Your question is a bit vague so I break it into two cases: (1) If it is connected to a master, it can't connect to another. This restriction is imposed by BLE standard. (2) Probably you meant this one. If it was connected to a master, but due to some