I want to detect the MAC address of KeiganMotor's motor by executing the script of KM1Scan.py from the above URL to the source code (Github), but the following error occurred.
#!/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 ) 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)
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?)
KeiganMotor is a motor that can be controlled by BLE. For KeiganMotor, I referred to the following site.
WSL Ubuntu 18.04
After pip install bluepy input, it was executed with python3 KM1Scan.py, but the above error came out,
After entering sudo pip install bluepy, I tried sudo python3 KM1Scan.py, but the result did not change. I hope you can tell me how I can improve the error.
Answer # 1
I found the cause of the error on the above page
Answer # 2
It may be easier to reply if you understand the following.
What is KeiganMotor?
What is your working environment? Linux? Windows?
What is the connection? Bluetooth? Usb?
Learn more about what you tried. (Which page did you see?)
- i'm having trouble figuring out how to list the return values in python
- python 3x - i'm having trouble not knowing the regular expression that removes certain whitespace
- python - how to import a file (py) i'm having trouble with an error (probably due to the path)
- python - i'm having trouble installing pynacl
- i'm having trouble installing python 390
- heroku - i'm having trouble with bundle install
- [python3] inventory management system login and logout do not work
- c # - i'm having trouble with xss countermeasures during json post in aspnet core mvc
- [ruby] i'm having trouble with nomethoderror
- i'm having trouble running the api in vuejs + bootstrap and displaying the results using v-for and card
- i'm having trouble with ruby's word bingo algorithm
- i am having trouble with the text file disappearing after building the monaca smartphone app
- i'm having trouble with the code before creating the opengl frame model
- python - i am in trouble because the cause of attributeerror is unknown
- drop-down menu - i'm having trouble opening the dropdown menu in drawer
- i'm having trouble using the paginate part of php
- python - i am in trouble because the cause of invalid syntax is unknown
- i'm having trouble getting an error when i make assignments 51 times or more with google apps script
- ruby - i'm having trouble solving the missing required keys: [: id] error
- ruby - i'm having trouble with rails nomethoderror (i want to get data with each method!)