bluetooth-lowenergy

Gatttool non-interactive mode --char-write

风格不统一 提交于 2020-01-05 03:07:27
问题 Still asking about BLE devices and gatttool . I'm able to send a char-write-cmd in interactive mode, but I'm not able to do the same in non-interactive. This is what I send in interactive mode : gatttool -I []> connect BTADDR [BTADDR]> char-write-cmd 0x0040 01 [BTADDR]> exit In this way I start the Alert service, which in my case makes the buzzer sounds. In theory, the non-interactive mode should be: gatttool -b BTADDR --char-write -a 0x0040 -n 01 But this do not send the request command

Can't connect to BLE device

六月ゝ 毕业季﹏ 提交于 2020-01-04 14:04:33
问题 Trying to connect an Android phone to a somewhat unusual, nonstandard BLE device (a blood pressure monitor). Data points: My program connects and reads other BLE devices fine. My program sees the device in a BLE scan, but won't connect. Instead I get an immediate "Disconnected" status with a generic GATT_ERROR (status code 0x85). Nordic's Android BLE scanner app will connect and read/write the device. The device uses an unknown Service (FFF0) with one characteristic (FFF1) for notifications

Android Peripheral BluetoothGattServerCallback onServiceAdded() not getting called

一世执手 提交于 2020-01-04 13:47:51
问题 So I have a simple Peripheral application that I am coding in Android Studio running on my Samsung S8 mobile phone. I can setup all my BLE Advertisements and Characteristics just fine but when I add my services. I am not seeing expected results when connected from a another Central device (ie. another mobile phone that has an app to discover bluetooth advertisements). LogCat output from Android Studio: As per the Log, I can only see 2 default services that are Generic Attribute(1800) and

BLE-device stops connecting with Android after working flawlessly for weeks

☆樱花仙子☆ 提交于 2020-01-04 06:01:21
问题 I have a device with Blue Gecko BLE and everything seems to be working fine with various Android phones and tablets: connecting, data transfer and reconnect after disconnection. Note: we do not pair our device it is just connected and we do not use auto connect. Now the problem: sometimes with some of the devices-phone setups connecting stops functioning after working for weeks. I do not know when or why it happens, but after that it is impossible to reconnect the device using the same phone

CoreBluetooth - Can connectPeripheral be called multiple times

為{幸葍}努か 提交于 2020-01-04 02:05:46
问题 Can an application attempt to connect to multiple devices at once? When an app calls 'connectPeripheral', it will attempt to connect for an unspecified amount of time since there is no time-out. However, if 'connectPeripheral' is called a second time, does it cancel out the previous call, or will the app attempt to make two separate connections at once? 回答1: In my testing I've seen if you call it multiple times prior to being connected, it will take longer to actually connect (and often

onCharacteristicWrite() is being called, but it doesn't always write

喜欢而已 提交于 2020-01-03 20:08:47
问题 I have a custom piece of hardware with a bluetooth low energy chip. I have set it up with an array with 500 u32s such that array[n] == n. I'm working on an android app that can connect to the device, request the length of the array, and then request the datapoints in the array one at a time. The android app appears to be mostly working fine. It connects to the device, requests the length, and continues to request the next piece of data AFTER the previous piece was received. However, partway

onCharacteristicWrite() is being called, but it doesn't always write

筅森魡賤 提交于 2020-01-03 20:06:17
问题 I have a custom piece of hardware with a bluetooth low energy chip. I have set it up with an array with 500 u32s such that array[n] == n. I'm working on an android app that can connect to the device, request the length of the array, and then request the datapoints in the array one at a time. The android app appears to be mostly working fine. It connects to the device, requests the length, and continues to request the next piece of data AFTER the previous piece was received. However, partway

Getting Type_Gatt_Error with status 133 while connecting to AND UA651BLE

点点圈 提交于 2020-01-03 19:32:09
问题 I am trying to connect to AnD UA-651BLE blood pressure monitor and get the values in an android app. The app is able to find the device but I am getting Type_Gatt_Error in 'onConnectionStateChange'. This is working fine for certain devices like samsung galaxy S5, Moto G4 etc. but not for certain phones like redmi 3s prime, etc. This works well and i am able to read data, when i unpair the device and re pair it everytime. I am not able to understand anything as i am new to android-ble

Getting Type_Gatt_Error with status 133 while connecting to AND UA651BLE

╄→尐↘猪︶ㄣ 提交于 2020-01-03 19:30:50
问题 I am trying to connect to AnD UA-651BLE blood pressure monitor and get the values in an android app. The app is able to find the device but I am getting Type_Gatt_Error in 'onConnectionStateChange'. This is working fine for certain devices like samsung galaxy S5, Moto G4 etc. but not for certain phones like redmi 3s prime, etc. This works well and i am able to read data, when i unpair the device and re pair it everytime. I am not able to understand anything as i am new to android-ble

Cannot override Java function in Kotlin

孤街浪徒 提交于 2020-01-03 17:53:48
问题 I am currently developing a BLE-enabled Android app targeting API 27 using Kotlin. I am attempting to override a function within android.bluetooth.BluetoothGatt . There are a number of callbacks available to be overridden to enable the handling of certain BLE events. For example, I override onConnectionStateChange() in the following way: private val bluetoothGattCallback = object : BluetoothGattCallback() { override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int)