Category : android-bluetooth

I am trying to update firmware in my BLE device. Tried this command as below : sudo st-flash write /home/jaiminmodi/STLINK_UTIL/stm32/bms.bin 0x08001800 But it giving me : st-flash 1.6.1-201-g4bfaab0 [!] send_recv read reply failed: LIBUSB_ERROR_PIPE [!] send_recv STLINK_JTAG_READDEBUG_32BIT [!] send_recv read reply failed: LIBUSB_ERROR_PIPE [!] send_recv STLINK_DEBUG_RESETSYS [!] send_recv read reply failed: LIBUSB_ERROR_PIPE [!] send_recv STLINK_DEBUG_READCOREID ..

Read more

I am new to android studio and am able to receive the following data in Logcat but now need to be able to see that data in the app. How am I able to change this code to do that? @Override public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { super.onCharacteristicChanged(gatt, characteristic); byte[] value = characteristic.getValue(); Log.i(“BLE”, ..

Read more

I am trying to toggle my device audio between bluetooth speaker, internal speaker and headphones if they are connected. Please note this is for all device audio and not just my application. AudioManager mAudioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); if(shouldEnableExternalSpeaker) { //Play through bluetooth mAudioManager.setMode(AudioManager.MODE_NORMAL); mAudioManager.startBluetoothSco(); mAudioManager.setBluetoothScoOn(true); } else { //Play through device speaker mAudioManager.setMode(AudioManager.MODE_NORMAL); mAudioManager.stopBluetoothSco(); mAudioManager.setBluetoothScoOn(false); mAudioManager.setSpeakerphoneOn(true); ..

Read more