bluetooth

Bluetooth Gatt Server Python

Bluetooth Gatt Server Python Question: `class TxCharacteristic(Characteristic): def __init__(self, bus, index, service): Characteristic.__init__(self, bus, index, UART_TX_CHARACTERISTIC_UUID, [‘notify’], service) self.notifying = False GLib.io_add_watch(sys.stdin, GLib.IO_IN, self.on_console_input) def on_console_input(self, fd, condition): s = fd.readline() if s.isspace(): pass else: self.send_tx(s) return True #Send def send_tx(self, s): if not self.notifying: return value = [] if s == "Syncn": milliseconds = …

Total answers: 1

Permission BLUETOOTH for Android 13 in kivy app

Permission BLUETOOTH for Android 13 in kivy app Question: I am a beginner Kivy user. I made an app that displays Arduino data on mobile via Bluetooth. I allow access in buildozer.spec as follows: android.permissions = BLUETOOTH_ADMIN,BLUETOOTH The app worked well ,but now it can’t run on my android. I get an error like below: …

Total answers: 2

Using serial ports over bluetooth with micro bit

Using serial ports over bluetooth with micro bit Question: I have correctly got a microbit working with serial communication via COM port USB. My aim is to use COM over bluetooth to do the same. Steps I have taken: (on windows 10) bluetooth settings -> more bluetooth settings -> COM ports -> add -> incoming …

Total answers: 1

Receiving Audio Data (and Metadata) from IPhone over Bluetooth Python

Receiving Audio Data (and Metadata) from IPhone over Bluetooth Python Question: I’m trying to write a Python script to retrieve audio data from my IPhone to my Raspberry Pi over bluetooth. Currently, I’m able to get audio to come out of my Pi’s speakers just by navigating to Settings > Bluetooth on my phone and …

Total answers: 1

bluetooth.btcommon.BluetoothError: [Errno 2] No such file or directory

bluetooth.btcommon.BluetoothError: [Errno 2] No such file or directory Question: I’m trying to connect to a bluetooth device through a Python script using pybluez on a Khadas board (kind of like a Raspberry Pi, aarch64). I have manually updated PyBluez to 5.65 as it contains a fix I need. Both bluetoothctl –version and bluetoothd –version return …

Total answers: 1

How to send data via bluetooth to Pi pico

How to send data via bluetooth to Pi pico Question: I need a way to send data to and from my pi pico via bluetooth. Here is the program I’m running on my pc. Note: Everything on the pi is working correctly (tested with a bt serial terminal) import bluetooth as bt print("Scanning Bluetooth Devices….") …

Total answers: 1

How can I automate pairing RPi and Android with bluetooth Batch script

How can I automate pairing RPi and Android with bluetooth Batch script Question: I am working on a project that connects an Android device with a Raspberry Pi. The RPi needs to be treated like a deployable device that the user never needs to touch. For this reason, I am trying to write a startup …

Total answers: 2

What are these extra characters in my byte strings?

What are these extra characters in my byte strings? Question: I have a Python 3 script that gets data from some Bluetooth LE sensors. The data I’m getting is in 20-byte strings, but it looks like there are some extra characters along with the typical x00 bytes. What are these extra characters? Why are they …

Total answers: 2

How do I activate socket.AF_BLUETOOTH in Python3.6?

How do I activate socket.AF_BLUETOOTH in Python3.6? Question: I’m using Python3.6 standard installation in Windows and I try to do >>>import socket >>>socket.AF_BLUETOOTH The system responds with AttributeError: module ‘socket’ has no attribute ‘AF_BLUETOOTH’ me and a colleague spend already some time reading forums. I scanned through socket.py in PythonPathLib but there is as well …

Total answers: 2