You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am making a kivymd app that uses bleak I send and read some characteristics everything works fine in pc but when I export the apk to android and test it on my phone I get this error : Exception during signal sending: api call failed, not waiting for ('onCharacteristicRead', 42) (got using logcat)
What I Did
I set the minimum api to 33 and I have android 13 , scanning, connecting and sending all work I can control an LED on my device.
here is the code related to the error :
async def send_signal(self, value):
if self.client and self.client.is_connected:
try:
await self.client.write_gatt_char(CHARACTERISTIC_UUID, bytearray([value]), response=True)
print(f"Sent value {value}")
except Exception as e:
print(f"Exception during signal sending: {e}")
else:
print("Client is not connected")
async def read_batt(self):
if self.client and self.client.is_connected:
try:
data = await self.client.read_gatt_char(CHARACTERISTIC_UUID)
self.batt_txt.text = f"{data.decode('utf-8')}"
print(f"Received battery data: {data.decode('utf-8')}")
except Exception as e:
print(f"Exception during signal sending: {e}")
else:
print("Client is not connected")
def get_batt(self, instance):
loop.run_until_complete(self.send_signal(3))
loop.run_until_complete(self.read_batt())
The text was updated successfully, but these errors were encountered:
Description
I am making a kivymd app that uses bleak I send and read some characteristics everything works fine in pc but when I export the apk to android and test it on my phone I get this error : Exception during signal sending: api call failed, not waiting for ('onCharacteristicRead', 42) (got using logcat)
What I Did
I set the minimum api to 33 and I have android 13 , scanning, connecting and sending all work I can control an LED on my device.
here is the code related to the error :
The text was updated successfully, but these errors were encountered: