bluetooth-lowenergy

CoreBluetooth - Writing data from Central to Peripheral

China☆狼群 提交于 2019-12-10 12:13:25
问题 I referred Sample app provided by Apple for CoreBluetooth and I succeeded in sending Data from Peripheral to Central, Now I need to write Data from Central to Peripheral. After Googling i found that It can be done using [_discoveredPeripheral writeValue:aData forCharacteristic:charc type:CBCharacteristicWriteWithResponse]; Following is my Implementation of Central, to send Message to peripheral: -(void)sendMessage:(NSString *)strMessage{ NSData *aData = [strMessage dataUsingEncoding

Calculate Distance between Arduino BLE shield and Phone

社会主义新天地 提交于 2019-12-10 11:59:59
问题 Is it possible to calculate the distance between an arduino bluetooth shield (BLE Shield 2.1) and cell phone? More specifically, when the cell phone is within <5 feet of the shield, I want it to perform an action. I know BLE Beacon technology is able to do this in a general sense (immediate, near, far) so I'm wondering if it is possible? Looking through stack overflow, I've found the following answers but they are all dated: Answer 1 Answer 2 I know that ultrasonic frequency and laser sight

How can I use C# to get all the services for a Bluetooth LE (BLE) device?

邮差的信 提交于 2019-12-10 11:56:52
问题 I am connecting to a Magicblue Bluetooth LE LED light with C# on Windows 10 and want to be able to change its colors. I am able to get the GattDeviceService and access its single characteristic just fine. However, I'm not able to figure out how to get to the device's other two services. One of them has a write characteristic to set the RGB Color. Using both my iPhone with the LightBlue App and Microsofts BthGATTDump.exe I'm able to see the services and characteristics. I was thinking once I

Refreshing RSSI value of many bluetooth peripherals

你说的曾经没有我的故事 提交于 2019-12-10 11:49:02
问题 I'm trying to mesure RSSI indicator on iOS (6 with BLE) from several bluetooth peripheral. I can get RSSI with scanForPeripheral : NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], CBCentralManagerScanOptionAllowDuplicatesKey, nil]; [_manager scanForPeripheralsWithServices:nil options:options]; coupled with: - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *

Raspberry Pi3 BLE as Central device receiving just one packet per connection interval - gatttool/hcitool

若如初见. 提交于 2019-12-10 11:44:49
问题 i would appreciate if someone can explain one issue i'm experiencing with Raspberry Pi 3 model B acting as a Central device on a BLE connection with a Peripheral device. First, i successsfully connect both devices and enable notifications on the Central device using the folllowing hcitool/gatttool commands: sudo hciconfig hci0 up sudo gatttool --adapter=hci0 --device=XX:XX:XX:XX:XX:XX --adr_type=random --mtu=23 -I [][LE]> connect [][LE]> char-write-req 0x000c 0100 After that, i started

Is it possible (and does it make sense) to have a bluetooth iOT device in peripheral mode listening to both, BLE and Bluetooth Classic connections

夙愿已清 提交于 2019-12-10 11:40:45
问题 We are currently building a device that needs to be compatible with newer smartphones that run BLE but also be backwards compatible with Bluetooth 2.1. We are using a Mediatek Linkit ONE board for our prototype which can operate in dual mode. They have Bluetooth classes available, however it seems that I would have to pick between either running 1) Bluetooth Classic 2.1 OR 2) BLE The classes and docs are here: http://labs.mediatek.com/site/znch/developer_tools/mediatek_linkit/api_references

How to send the text data to CC2541 keyfob via Android 4.3?

浪子不回头ぞ 提交于 2019-12-10 11:29:44
问题 I am developing an application where I have to connect to Bluetooth device on Android 4.3. And I want to change the name of CC2541 Keyfob via the Android application. My ideas is: 1.There has a Plain Text that I can type the name what I want in my Android application. 2.After I type the name, I push the button to send this text. 3.If the CC2541 receive this text from Android application , it will change the text in the deviceName[] of the following code in keyfobdemo.c: static uint8

How do you get a BLE Advertisment callback in a desktop .NET app?

泄露秘密 提交于 2019-12-10 11:16:53
问题 I am trying to get a BLE advertisement callback from a .NET Windows desktop application. I am able to call into the APIs, however the Received event is never called from the OS in a WPF or Command line application. I do get events when the code is called from a Unit Test in VS2015, or universal Windows app. However, I need to do other things not available in universal Windows. Here is the code: using Windows.Devices.Bluetooth.Advertisement; public static void ScanForAdvertisments() { mWatcher

Bluetooth Low Energy Android - Search in Background

限于喜欢 提交于 2019-12-10 10:47:54
问题 I would like to know whether it is possible to check in the background if someone enters or leaves the a beacon Region? In iOS for example you can use the methods didEnterRegion or didExitRegion to send notifications from the background. Is there any native possibility or has someone a workaround? 回答1: Android doesn't have any "native" iBeacon capability at all, but you can see iBeacons using my company's open source Android iBeacon Library, which has APIs similar to those native to iOS 7. In

Send Data from CentralManager to PeripheralManager using CoreBluetooth (BLE)

老子叫甜甜 提交于 2019-12-10 10:19:02
问题 I have my app running on two iOS device (both have 6.1.4) where one device acts as the Central and one acts as a Peripheral. I have been successful in getting notifications (characteristics set up to notify) from the Peripheral over to the Central just fine. However, I was wanting to write a value from the Central to the Peripheral to a specific writable characteristic but that always fails. The peripheral:didWriteValueForCharacteristic:error: delegate's method is immediately called where the