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

Cannot read from Beurer BF700 #1

Open
miguelcostaUI opened this issue Jan 29, 2020 · 3 comments
Open

Cannot read from Beurer BF700 #1

miguelcostaUI opened this issue Jan 29, 2020 · 3 comments

Comments

@miguelcostaUI
Copy link

I'm trying to run on a Raspberry Pi 4 but after connecting I always get an error.
Do you know what can i do to solve this?

Thanks

connecting...
connection_status -> successful

---------------------------------------------
init?
char-write-req 0x002e E601

---------------------------------------------
Traceback (most recent call last):
  File "scale.py", line 461, in start_measurement_script
    child.expect("0x002e value: e6 00 20", timeout=4)
  File "/home/pi/.local/lib/python2.7/site-packages/pexpect/spawnbase.py", line 344, in expect
    timeout, searchwindowsize, async_)
  File "/home/pi/.local/lib/python2.7/site-packages/pexpect/spawnbase.py", line 372, in expect_list
    return exp.expect_loop(timeout)
  File "/home/pi/.local/lib/python2.7/site-packages/pexpect/expect.py", line 181, in expect_loop
    return self.timeout(e)
  File "/home/pi/.local/lib/python2.7/site-packages/pexpect/expect.py", line 144, in timeout
    raise exc
TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0xb6c9f810>
command: /usr/bin/gatttool
args: ['/usr/bin/gatttool', '-I', '-b', '00:13:04:1A:9F:5F']
buffer (last 100 chars): 'Error: \x1b[0mCharacteristic Write Request failed: Invalid handle\r\n\x1b[0;94m[00:13:04:1A:9F:5F]\x1b[0m[LE]> '
before (last 100 chars): 'Error: \x1b[0mCharacteristic Write Request failed: Invalid handle\r\n\x1b[0;94m[00:13:04:1A:9F:5F]\x1b[0m[LE]> '
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 2253
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile('0x002e value: e6 00 20')
@loloderu
Copy link

I have the same issue. Did you finnd the solution?

@Dr-Nuke
Copy link

Dr-Nuke commented Sep 30, 2023

Having the same issue.
Increased the timeout to 10, but this does not help.
Anyone knows something?

@Dr-Nuke
Copy link

Dr-Nuke commented Oct 16, 2023

I figured for my BF720 that removing child.expect("0x002e value: e6 00 20", timeout=4) in line 461 of scale.py allows the script to progress abit further. I could not find any hint that such a string would appear in the child's stream.

me@raspi:~/myfiles/bt-scale $ python2.7 scale.py
connecting...
connection_status -> successful

---------------------------------------------
init?
char-write-req 0x002e E601
init.

---------------------------------------------
set scale time
char-write-req 0x002e E9652D8758

---------------------------------------------
get scale status
char-write-req 0x002e E74F0000000000000000

unable to get scale status, will exit now. (TODO: implement retry)

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