bluetooth-lowenergy

Why the address of my BluetoothDevice changes every time I relaunch the app?

倾然丶 夕夏残阳落幕 提交于 2020-01-02 04:53:06
问题 I'm doing some simple scanning + advertising testing on bluetooth LE feature for Android using this sample-code I'm testing it using a Samsung 6 and a Nexus 9, and for some reason if I leave the app running on the Samsung and restart the app on the Nexus, the next time the Samsung devices finds the other device, it has a different address. In code: On the device: The funny thing it doesn't happen the other way around. (Samsung always has the same address when discovered from the Nexus 9) Is

BluetoothGatt: negotiating new MTU succeeds but new size cannot be used (3 bytes difference)

主宰稳场 提交于 2020-01-02 01:35:07
问题 I'm working on an app that exchange data between devices using BLE. In order to get better performance, after connecting two devices I'm negotiating to increase the MTU in order to exchange bigger data packages over BLE. Once the BluetoothDevice is connected and all services and characteristics are read, I request to increase the MTU using: private void requestMtu() { //gatt is a BluetoothGatt instance and MAX_MTU is 512 this.gatt.requestMtu(MAX_MTU); } After that, on the

CoreBluetooth: detect device out of range/ connection timeout

回眸只為那壹抹淺笑 提交于 2020-01-02 00:48:10
问题 I am designing an iOS framework to handle multiple BLE devices (all of the same kind). Everything is working very well at the moment, except one thing: The client wants a list with available devices. But how can I detect when a device, that has been discovered in the past, is not available anymore? Another problem occurs, when I try to connect to a device that is not available anymore. Documentation says: Connection attempts never time out and And yes, I never get an error via

Removing PIN in Core Bluetooth Connection

守給你的承諾、 提交于 2020-01-01 20:00:54
问题 I'm working on an application that connects phones via core bluetooth (BLE). The connection and data transmission work beautifully, but there is one small imperfection. When connecting to a new device, a pin must be entered on one of the devices. The application is supposed to be very instantaneous, and the pin-input greatly interrupts this process. I'm not worried about security, and I've personally connected my phone to many bluetooth devices without entering pins, so I was just wondering

Android: Extending a hidden class that is obtained through reflection

青春壹個敷衍的年華 提交于 2020-01-01 19:19:18
问题 How can I extend a class that is only accessible through reflection? Basically, I am trying to extend the com.samsung.bluetoothle.BluetoothLEClientProfile class that is found in the Galaxy S3 to enable communication it with my bluetooth LE device. The class is hidden and I need to extend it. 回答1: Add a dummy class in the right package ( com.samsung.bluetoothle ) in your project, then extend it. At runtime the system class will be loaded, and you should get the desired behaviour. 来源: https:/

iOS BLE - How to keep app active in the background?

怎甘沉沦 提交于 2020-01-01 19:15:18
问题 I am trying to find a clever way to keep a BLE app active in the background on iOS 6, without breaking any of Apple's rules. I plan to use the phone as a peripheral device and another BLE circuit as the central. My app will automatically be opened when a user arrives to a building using geofencing. After that the iPhone will connect to the first BLE central device it sees (the device will be in its white list). The user will then be able to move throughout the building switching to different

CoreBluetooth Central --> Peripheral

倾然丶 夕夏残阳落幕 提交于 2020-01-01 16:49:53
问题 I'm quite new to bluetooth communication. My first project intends to transfer data from an iOS device to a BLEshield (small chip). To test my central code, I decided to setup an iPhone as peripheral (the role the chip will have, once I got it) and an iPad as Central. I can connect the devices and also send data from the peripheral to the central. It's quite easy though: - (void)startService { _readChar = [[CBMutableCharacteristic alloc] initWithType:[CBUUID ...] properties

Scanning large number of BLE Tags

孤街醉人 提交于 2020-01-01 09:40:09
问题 I was looking for a possibility to scan a large number of BLE Tags (StickNFind) in a single scan. I have noticed that when I scan for 10 seconds I can detect around 20 BLEs easily. When I increase the scanning interval to around 30 seconds and try to scan a large number of BLE Tags e.g. 200 Tags, I see an error in the LogCat about buffer overflow (GKI_exception). This problem occurs somewhere in the core Android libraries, which I am unable to debug. The exact error log is attached. 11-27 11

Not receiving data from BLE device

∥☆過路亽.° 提交于 2020-01-01 07:06:10
问题 I'm here again. So, long story short: in my app I'm trying to receive datas from my BLE device (tickr heart rate monitor: that) with the help of Android Samples (that). But... I'm not receiving datas from my device! I'm able to get the Characteristics and the Descriptor, but... nothing more. I simply.. miss the point . Here's my code: private BluetoothLeService mBluetoothLeService; private ArrayList<BluetoothGattCharacteristic> mGattCharacteristics = new ArrayList<BluetoothGattCharacteristic>

How to make a BLE connection that is connected using service to use across the activities without stopping the service or disconnecting ble?

非 Y 不嫁゛ 提交于 2020-01-01 05:39:07
问题 I have 3 components. Activity1 has button for connecting and disconnecting the BLE Connection Activity2 Needs to Get the data from the BLE Device. Service All the connection logic (like getRemoteDevice(),connectGatt etc.,) belongs to service. Activity1 is connecting to BLE Device by binding the service. Intent gattServiceIntent = new Intent(mContext,BleService.class);//In Activity1 context bindService(gattServiceIntent, mServiceConnection,BIND_AUTO_CREATE); and makes connection to ble device