bluetooth-lowenergy

Android Bluetooth not discovering the characteristic after changing UUID

梦想与她 提交于 2019-12-23 10:12:35
问题 I am using Android 5.0.1 Lollipop and developing Bluetooth Low Energy server-client communication. I have Samsung Galaxy s4. I have three characteristic in my Custom Service. I made one of the characteristic's property as write-only and encrypted write. Then I changed it to non-encrypted write. The write operation didnt work for this characteristic anymore. I knew I have to restart Bluetooth adapter from settings and unpair the device but it doesn't work anymore at all. Then I changed the

RSSI from Bluetooth Low Energy (BLE) Tags?

元气小坏坏 提交于 2019-12-23 05:17:42
问题 I'm writing an app (on android) to read RSSI from bluetooth devices, for location recognition using rssi fingerprinting. I have working code for reading RSSI from non-paired and discoverable bluetooth devices that are not BT4.0/BLE. I would like to know if I get some BLE-based tags (such as stick-n-find) would I be able to read their RSSI only by putting myself (my android phone to be precise), into bt-discovery mode. 回答1: In BT Low Energy the roles are switched. The Stick-n-find would be

Turning a mobile phone into a beacon

帅比萌擦擦* 提交于 2019-12-23 04:15:07
问题 I'm trying to build an access control system using BLE beacons and a web server. A mobile phone will transmit a beacon signal near the gate and the beacon will be forwarded to the server to decide whether this person should pass. The problem is transmitting a beacon without encryption is not safe, i need to encrypt the beacons. The question is: is there an API for web applications to resolve the Eddystone EID encrypted beacon without using google web service? Another question: is the

AT commands to hm10 over bluetooth with android

烈酒焚心 提交于 2019-12-23 03:47:21
问题 Hey guys am working with a project and i want to know is it possible to send AT commands to hm-10 ble device directly from my android app over bluetooth without using any micro controller and if yes then how???? 回答1: if any one trying this in future, the answer is yes we can just send a string to hm-10 as "AT\r\n" and it will respond with OK. 来源: https://stackoverflow.com/questions/39493234/at-commands-to-hm10-over-bluetooth-with-android

MQTT-SN on Raspberry pi3 , 6lowpan over BLE

南楼画角 提交于 2019-12-23 03:11:09
问题 I'm trying to set a MQTT-SN broker (rsmb) ,and using several pi3 as clients. First , I will build a 6lowpan over ble connection. Setting pi3 (RASPBIAN JESSIE kernel v4.4) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable hciconfig hci0 leadv BLE gateway (Ubuntu 14.04) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 35 > /sys/kernel/debug/bluetooth/6lowpan_psm echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo "connect

IOBluetooth is returning no characteristics for some services

会有一股神秘感。 提交于 2019-12-23 03:07:12
问题 I’m trying to read characteristics from a service on a Bluetooth LE device. For some reason, for some characteristics, after calling -[CBPeripheralManager discoverCharacteristics:forService] , the peripheral:didDiscoverServices: callback is getting 0 characteristics. Are there any workarounds to allow me to read the characteristics of this service? When installing Hardware IO Tools for Xcode and running PacketLogger, it is apparent that the discoverServices call is causing a 0x08 Read By Type

NoClassDefFoundError during class load for BLE scanning callback

家住魔仙堡 提交于 2019-12-23 02:30:39
问题 I am keep on getting the NoClassDefFoundError when my class is loaded. The code is taken from BluetoothLeGatt project - http://developer.android.com/samples/BluetoothLeGatt/project.html My code: // Device scan callback. private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { //java.lang.NoClassDefFoundError... @Override public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) { runOnUiThread(new Runnable() {

Why is BLE 4.2 faster than BLE 4.1

*爱你&永不变心* 提交于 2019-12-22 19:44:30
问题 I've read the tech spec and I am trying to understand why BLE 4.2 is faster than BLE 4.1? Can we send a larger packet size than 20 bytes or is the connection interval faster? I am trying to understand what makes BLE 4.2 faster. 回答1: The only thing in Bluetooth 4.2 which gives higher throughout compared to earlier is the length extension of the link layer. It makes it possible to send data pdus with a length of 251 bytes instead of 27 bytes which was the limit before. Previously it meant a

Scan for peripherals when device is locked

我的未来我决定 提交于 2019-12-22 17:41:16
问题 My central manager can detect new peripherals in the foreground and background - I know this because I trigger a UNNotification when it finds a new peripheral. However, when the device is locked it does not seem to keep scanning for new peripherals. In my capabilities I have enabled background mode for Using LE accessories, as well as remote notifications. Am I missing something with BLE that can allow me to detect new peripherals when the device is locked? Update w/ more info: Here's how I

getBluetoothLeAdvertiser() returns null

若如初见. 提交于 2019-12-22 14:17:41
问题 BluetoothLeAdvertiser advertiser = BluetoothAdapter.getDefaultAdapter().getBluetoothLeAdvertiser(); This returns null. I have tried on an API 21 and on an API 23 device, but with the same result. I have no idea what I am missing? The app builds and runs just fine, until of course the advertiser is used and the app crashes. I appreciate any help provided! :) 回答1: If you check the developer docs, link here. You'll see that the null object is returned in the following case: Returns a