bluetooth lowenergy - Android does not make the BLE findme device beep -


I am trying to apply the application that will communicate with the BLE findme device. I have one of these devices, but there is a problem with this. By using the iPhone I have tested this device with the help of a bit of app and this app works correctly, i mean read all the device's characterization and the device To make the beep sent to the features. But using the Android (Nexus 5) I could only read the features of the device, but the device can not make beep. My code is:

  Private static last UUID IMMEDIATE_ALERT_SERVICE = UUID.fromString ("00001802-0000-1000-8000-00805f9b34fb"); Private static final UUID IMMEDIATE_ALERT_LEVEL = UUID.from string ("00002a06-0000-1000-8000-00805f9b34fb");   

...

  Public Zero Bip (DeviceData Device) {BluetoothGatt Gate = mConnectedDevices.get (device.getDeviceAddress ()); BluetoothGetService BluetoothGetSaveWire = gatt.getService (IMMEDIATE_ALERT_SERVICE); If (bluetoothGattService == empty) {return; } BluetoothGatProfile Attribute = BluetoothGetServiceWeightTeatureTechnical (IMMDIIRLERELEEEL); If (attribute == zero) {return; } Byte [] arrayoffbit = new byte [1]; Arrayflight [0] = (byte) 0x01; characteristic.setValue (arrayOfByte); gatt.writeCharacteristic (specialty); }   

Callback method Return OK:

  Override public void (BluetoothGet Gate, BluetoothGat Prefetching attribute, int status) on @changechange {if (characteristic.getUuid ( ) .ststring (.) Equals (IMMEDIATE_ALERT_LEVEL.toString ())) {// TODO: Use device address to identify device-receiver message msg = new message (); Msg.what = MSG_PARAM_WRITTEN; Msg.obj = (Position == BluetoothGatt.GATT_SUCCESS); mHandler.sendMessage (MSG); }}   

But nothing happens to the device.

Can someone explain to me what I am doing wrong or maybe I should give some advice?

And then, I can read device attributes, but can not write them on the device.

Unlike iOS, Android has a lot of non-documentary tricks with Bluetooth You are using standard Bluetooth libraries included in Android 4.3 and later. If you use other libraries like Samsung or Broadcom, the results may vary.

Because I do not have a search engine, I can not confirm anything. But I have worked with both classic and low energy Bluetooth power on Android for a while. My advice is to go through the complete process of scan, search services and read / write attributes.

  • Connect to the onLeScanCallBack device
  • Search on Discover
  • Find all the features searched for onservices
  • If you can read it, then go ahead and do this
  • After that, you can then write the specificity and listen for the HonorativeWitView event. You can then get the beep if you do not, then you will need to go back to the iOS project and find out every bit received and received from the search engine. It seems difficult but it is actually a matter of reading the bytes right inside the delegates. Go back to that document and recreate the bit sequence on the Android side. Again, capture the search engine and all traffic. If you can get a bit sequence for the match, then you will get success.

    Another important thing to know about Android BLE is that it should be gradual writing. By this I mean, if you write a feature, you will have to wait for a fictional event before writing to someone else. It is not documented on the Android Developer site. The best way to implement this functionality is to use a linked list as a work queue

    Good luck and ping me if you have any questions.

  • Comments

    Popular posts from this blog

    Verilog Error: output or inout port "Q" must be connected to a structural net expression -

    jasper reports - How to center align barcode using jasperreports and barcode4j -

    c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -