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

Mi band 6 support #52

Open
NeptunePy opened this issue Oct 26, 2021 · 4 comments
Open

Mi band 6 support #52

NeptunePy opened this issue Oct 26, 2021 · 4 comments

Comments

@NeptunePy
Copy link

I have problems with the mi band 6, can you add support for the mi band 6 please?

Thanks.

@janvda
Copy link

janvda commented Nov 10, 2021

@FloDr can you provide more details about the issue you are having with mi band 6 ?

@NeptunePy
Copy link
Author

NeptunePy commented Dec 20, 2021

Hello, with the mi band 6, none of the available options work, for example the first option shows this:

Exception in thread Thread-1: Traceback (most recent call last): File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 133, in _wrap_start curses.wrapper(self._main_loop) File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 193, in _main_loop self.process_user_input() File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 289, in process_user_input self.select() File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/site-packages/cursesmenu/curses_menu.py", line 329, in select self.selected_item.action() File "/home/flo/.pyenv/versions/3.9.7/lib/python3.9/site-packages/cursesmenu/items/function_item.py", line 35, in action self.return_value = self.function(*self.args, **self.kwargs) File "/home/flo/Documents/miband4/miband4_console.py", line 93, in general_info print ('Serial:',band.get_serial()) File "/home/flo/Documents/miband4/miband.py", line 421, in get_serial return serial.decode('utf-8') AttributeError: 'NoneType' object has no attribute 'decode'

sorry for the late response.

os : Linux Mint

@niceboygithub
Copy link

niceboygithub commented Jan 19, 2022

Testing on Mi Band 6 NFC with raspberry pi 3.

the command:

python3 miband4_console.py -m 11:50:33:4D:66:997 -k C11D22D8F33449DDC55686FE3F8C9EAB

the logs:

Exception in thread Thread-1:o be displayed: test
Traceback (most recent call last): characters per line, and up to 6 lines. To add a new line use new line character
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run() message to be displayed: message test
  File "/usr/lib/python3.7/threading.py", line 865, in runl: 2
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 133, in _wrap_start
    curses.wrapper(self._main_loop)
  File "/usr/lib/python3.7/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 193, in _main_loop
    self.process_user_input()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 289, in process_user_input
    self.select()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 329, in select
    self.selected_item.action()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/items/function_item.py", line 35, in action
    self.return_value = self.function(*self.args, **self.kwargs)
  File "miband4_console.py", line 109, in send_notif
    band.send_custom_alert(a[ty-1],title,msg)
  File "/home/pi/miband4/miband.py", line 305, in send_custom_alert
    svc = self.getServiceByUUID(UUIDS.SERVICE_ALERT_NOTIFICATION)
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 488, in getServiceByUUID
    rsp = self._getResp('find')
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 362, in _waitResp
    raise BTLEDisconnectError("Device disconnected", resp)
bluepy.btle.BTLEDisconnectError: Device disconnected

@radu022003
Copy link

Testing on Mi Band 6 NFC with raspberry pi 3.

the command:

python3 miband4_console.py -m 11:50:33:4D:66:997 -k C11D22D8F33449DDC55686FE3F8C9EAB

the logs:

Exception in thread Thread-1:o be displayed: test
Traceback (most recent call last): characters per line, and up to 6 lines. To add a new line use new line character
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run() message to be displayed: message test
  File "/usr/lib/python3.7/threading.py", line 865, in runl: 2
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 133, in _wrap_start
    curses.wrapper(self._main_loop)
  File "/usr/lib/python3.7/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 193, in _main_loop
    self.process_user_input()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 289, in process_user_input
    self.select()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/curses_menu.py", line 329, in select
    self.selected_item.action()
  File "/home/pi/.local/lib/python3.7/site-packages/cursesmenu/items/function_item.py", line 35, in action
    self.return_value = self.function(*self.args, **self.kwargs)
  File "miband4_console.py", line 109, in send_notif
    band.send_custom_alert(a[ty-1],title,msg)
  File "/home/pi/miband4/miband.py", line 305, in send_custom_alert
    svc = self.getServiceByUUID(UUIDS.SERVICE_ALERT_NOTIFICATION)
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 488, in getServiceByUUID
    rsp = self._getResp('find')
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 362, in _waitResp
    raise BTLEDisconnectError("Device disconnected", resp)
bluepy.btle.BTLEDisconnectError: Device disconnected

I am experiencing the same.
I would gladly help to solve the problem if needed.

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

4 participants