Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device is not connecting error #8

Open
skysnigdha opened this issue May 22, 2018 · 6 comments
Open

Device is not connecting error #8

skysnigdha opened this issue May 22, 2018 · 6 comments

Comments

@skysnigdha
Copy link

skysnigdha commented May 22, 2018

Hi,
After connecting the device through bluetooth, I have run the example.py. I am getting error at line number 410 saying Failed to connect to the peripheral. The error remains even if the addrType is changed from random to public.

@creotiv
Copy link
Owner

creotiv commented Jun 3, 2018

this basically saying that you have problems with your hardware or drivers for it. Which OS are you running?

@skysnigdha
Copy link
Author

skysnigdha commented Jun 3, 2018 via email

@theidexisted
Copy link

I have faced the same problem, my firmware version is 1.0.1.81,

the error message:

-> sudo python example.py XXXXXXXXXX init
2018-06-20 20:52:56,366 MiBand2 (INFO) > Connecting to XXXXXXXXXX
Running  /usr/local/lib/python2.7/dist-packages/bluepy/bluepy-helper
Sent:  conn XXXXXXXXXX random

Got: "rsp=$stat state=$tryconn dst='XXXXXXXXXX mtu=h0 sec='low\n"
Got: "rsp=$stat state=$disc mtu=h0 sec='low\n"
Stopping  /usr/local/lib/python2.7/dist-packages/bluepy/bluepy-helper
Traceback (most recent call last):
  File "example.py", line 8, in <module>
    band = MiBand2(MAC, debug=True)
  File "/home/chaos/dev/open-source/monitor/MiBand2/base.py", line 76, in __init__
    Peripheral.__init__(self, mac_address, addrType=ADDR_TYPE_RANDOM)
  File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 353, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 402, in _connect
    "Failed to connect to peripheral %s, addr type: %s" % (addr, addrType))
bluepy.btle.BTLEException: Failed to connect to peripheral XXXXXXXXXX, addr type: random

@creotiv
Copy link
Owner

creotiv commented Jun 21, 2018

Guys sorry, but i can't debug hardware problems without hardware.

@theidexisted
Copy link

This issues is very similar with my, i will try their method, IanHarvey/bluepy#105

@theidexisted
Copy link

After switching to another laptop, the problem is gone, so it's indeed a hardware problem, I will try to find the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants