bluetooth-lowenergy

How do I pass a value back to this string?

大憨熊 提交于 2020-12-23 15:48:39
问题 Summary: I have a microbit connected to a rpi-zero. I coded the microbit, when A button is pressed it will then send data through uart.write to the rpi-zero. In this test, the microbit will uart.write("Test") , write a "Test" word to the rpi-zero. My ultimate goal is to use rpi-zero's BLE capabilities to act as a control device with instructions sent from microbit buttons. I found this GATT Server Code written in python for rpi. Which it ran with no problem at all. The code below will be used

Reading data from a Bluetooth device low energy rfcomm python3

笑着哭i 提交于 2020-12-15 01:48:48
问题 Faced a problem. There is a bluetooth device with low power consumption. BLE. The goal is to send a command to the device and get the data back. For example: command - 0x** 0x** 0x**, where first 0x** - code command, second 0x - data lenght. Response mast be - 0x** 0x** 0x**. I can not send a command to the device. The device works by RFCOMM. Actually the code that is available, but it does not give a result - it says that the device is off. from bluetooth import * import socket class Work:

Reading data from a Bluetooth device low energy rfcomm python3

我怕爱的太早我们不能终老 提交于 2020-12-15 01:44:26
问题 Faced a problem. There is a bluetooth device with low power consumption. BLE. The goal is to send a command to the device and get the data back. For example: command - 0x** 0x** 0x**, where first 0x** - code command, second 0x - data lenght. Response mast be - 0x** 0x** 0x**. I can not send a command to the device. The device works by RFCOMM. Actually the code that is available, but it does not give a result - it says that the device is off. from bluetooth import * import socket class Work:

Bluez blotoothctl scan vs hcitool scan

99封情书 提交于 2020-12-13 03:40:47
问题 I'm running bluez 5.50 on a Raspberry Pi (both Buster and Stretch). I have a ble sensor device that advertises data only when a button on the sensor device is pressed. So advertisements are asynchronous and there are no periodic advertisements in between (and all packets are unique, no duplicates). I'm having an issue with Bluez though where once a packet is received, Bluez seems to not report any additional packets from the device for the next approximately 11 seconds (very occasionally the

Losing data after connecting the bluetooth module

旧城冷巷雨未停 提交于 2020-12-08 05:32:12
问题 Objective I am trying to return data from the BlueTooth device after connected because to use the read and write function, need some data. Example data name, overflowServiceUUIDs, solicitedServiceUUIDs, mtu, rssi... and many others. Because if I want to read or write I need some attributes. I am using the library react-native-ble-plx . What is happening? After the device connected I lost some values. Important type DeviceState = { connected: boolean; services: Service[]; device: Device | null

Developing an HID input device driver for a BLE GATT device on Windows 10

时间秒杀一切 提交于 2020-12-04 17:21:18
问题 (This is a crosspost from the MSDN forums since there hasn't been any response there for quite some time and I thought I would get better answers here.) I have a BLE device containing a custom GATT service, of which I cannot modify the firmware. I want to listen for the GATT characteristic events from that service, and make Windows consume them as HID reports to make Windows recognize it as another device. How would I go about doing this? I conducted some research, and found the information

Extract data from kCBAdvDataManufacturerData on Swift

本秂侑毒 提交于 2020-12-03 07:53:41
问题 I have a TI sensor Tag as a peripheral that broadcasts BLE data in the form of kCBAdvDataManufacturerData. I would like to extract different values from this data in iOS. I am executing the following in Swift: func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber){ for (index, foundPeripheral) in peripherals.enumerated(){ if foundPeripheral.peripheral?.identifier == peripheral.identifier{ peripherals[index

Extract data from kCBAdvDataManufacturerData on Swift

狂风中的少年 提交于 2020-12-03 07:50:28
问题 I have a TI sensor Tag as a peripheral that broadcasts BLE data in the form of kCBAdvDataManufacturerData. I would like to extract different values from this data in iOS. I am executing the following in Swift: func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber){ for (index, foundPeripheral) in peripherals.enumerated(){ if foundPeripheral.peripheral?.identifier == peripheral.identifier{ peripherals[index

Detect if “Bluetooth scanning” for location is turned on

折月煮酒 提交于 2020-12-01 10:49:19
问题 Since Android M it is possible to scan for Bluetooth devices in the background even if the global location is turned off if you have enabled the Bluetooth scanning option in location settings (see screenshot). In order to scan for BLE devices, the following conditions must be met: COARSE_LOCATION or FINE_LOCATION permission granted. And one of the following: Global Location selector enabled. Bluetooth scanning option enabled (see screenshot). I can check that the permission is granted and the

Detecting the buttons on a Bluetooth Remote (HID over GATT)

被刻印的时光 ゝ 提交于 2020-11-29 03:07:23
问题 I have a Bluetooth LE Remote which I would like to pair with my Raspberry Pi Zero. ] I was able to successfully pair the remote with an Android phone and it then worked like a Keyboard and I was able to type numbers on the keypad into a blank note and even change the volume on the phone. It seems raspbian does not support HID over Gatt, which means that I need to implement/mimic a minimal HID over GATT behaviour using python. (Please correct me if there is a more straight-forward way to do