Aranet4-Python icon indicating copy to clipboard operation
Aranet4-Python copied to clipboard

"Encryption is insufficient" error

Open mappum opened this issue 3 years ago • 2 comments

I can successfully scan for devices and find my device's ID, but when running aranetctl <uuid> I get the following error:

Traceback (most recent call last):
  File "/opt/homebrew/bin/aranetctl", line 8, in <module>
    sys.exit(entry_point())
  File "/opt/homebrew/lib/python3.9/site-packages/aranet4/aranetctl.py", line 239, in entry_point
    main(argv=sys.argv[1:])
  File "/opt/homebrew/lib/python3.9/site-packages/aranet4/aranetctl.py", line 231, in main
    current = client.get_current_readings(args.device_mac)
  File "/opt/homebrew/lib/python3.9/site-packages/aranet4/client.py", line 374, in get_current_readings
    return asyncio.run(_current_reading(mac_address))
  File "/opt/homebrew/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/homebrew/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/opt/homebrew/lib/python3.9/site-packages/aranet4/client.py", line 368, in _current_reading
    readings.stored = await monitor.get_total_readings()
  File "/opt/homebrew/lib/python3.9/site-packages/aranet4/client.py", line 268, in get_total_readings
    raw_bytes = await self.device.read_gatt_char(self.AR4_READ_TOTAL_READINGS)
  File "/opt/homebrew/lib/python3.9/site-packages/bleak/backends/corebluetooth/client.py", line 259, in read_gatt_char
    output = await self._delegate.read_characteristic(
  File "/opt/homebrew/lib/python3.9/site-packages/bleak/backends/corebluetooth/PeripheralDelegate.py", line 147, in read_characteristic
    return await asyncio.wait_for(future, timeout=timeout)
  File "/opt/homebrew/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
bleak.exc.BleakError: Failed to read characteristic 44: Error Domain=CBATTErrorDomain Code=15 "Encryption is insufficient." UserInfo={NSLocalizedDescription=Encryption is insufficient.}

mappum avatar Aug 02 '22 23:08 mappum

I'm on macOS 12.3, python 3.9.13.

mappum avatar Aug 02 '22 23:08 mappum

Have you paired your sensor with your mac?

ukBaz avatar Aug 03 '22 07:08 ukBaz