Home>

I tried to execute the code shown in the corresponding source code to detect KeiganMotor's MAC address, but the following error message occurred.

Applicable source code
#!/usr/bin/env python3
#-*-coding: utf-8-*-
"" "
Created on Sun Jan 14 10:46:12 2018
@author: [email protected]
"" "
from __future__ import print_function
from bluepy.btle import Scanner
import sys
if len (sys.argv)>= 2:
    scan_sec = float (sys.argv [1])
else:
    scan_sec = 5.0
scanner = Scanner ()
devices = scanner.scan (scan_sec)
KM1_list = []
for dev in devices:
    for (adtype, desc, value) in dev.getScanData ():
        if desc == "Complete Local Name" and "KM-1" in value:
            print (value, ":", dev.addr)
Error message
Traceback (most recent call last):
  File "KM1Scan.py", line 15, in<module>
    devices = scanner.scan (scan_sec)
  File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 852, in scan
    self.start (passive = passive)
  File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 790, in start
    self._mgmtCmd ("le on")
  File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 309, in _mgmtCmd
    rsp = self._waitResp ('mgmt')
  File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 366, in _waitResp
    raise BTLEManagementError ("Management not available (permissions problem?)", resp)
bluepy.btle.BTLEManagementError: Management not available (permissions problem?)

I saw a nuance article that I did not have authority when I searched online, but I couldn't find a solution to it, so I asked this question.
It would be helpful if someone could tell me.

Supplemental information

Referenced the following site
https://github.com/keigan-motor/pykeigan_motor/tree/master/examples

  • Answer # 1

    https://StackOverflow.com/questions/226799
    I found the cause of the error on the above page

Trends