Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Unable to measure after connecting to GLM50C #3

Closed
cgommel opened this issue Jan 4, 2019 · 2 comments
Closed

Unable to measure after connecting to GLM50C #3

cgommel opened this issue Jan 4, 2019 · 2 comments

Comments

@cgommel
Copy link

cgommel commented Jan 4, 2019

I patched the file that it can also find the GLM50C.

>>> rangefinder = GLM100C()
Searching for BOSCH GLM100C ...
BOSCH GLM50C X9225
Found BOSCH GLM100C @ 00:13:43:71:78:EF

but then a new error appeared on my Raspberry Pi Zero W with raspbian:

>>> rangefinder.measure_from_back()
Traceback (most recent call last):
  File "<string>", line 3, in send
_bluetooth.error: (9, 'Bad file descriptor')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/chg/git/BOSCH-GLM-rangefinder/glm100c.py", line 103, in measure_from_back
    m = self.measure()
  File "/home/chg/git/BOSCH-GLM-rangefinder/glm100c.py", line 78, in measure
    self.socket.send(self.cmds['measure'])
  File "<string>", line 5, in send
bluetooth.btcommon.BluetoothError: (9, 'Bad file descriptor')

Running with sudo did not improve the situation so this is not a permission issue ;(
Any Ideas what's wrong?

@cgommel
Copy link
Author

cgommel commented Jan 4, 2019

It can be solved by setting port to 0x0005. Will adapt this in my fork later on.

@philipptrenz
Copy link
Owner

Thanks for your work! I'd be glad if you create a pull request, so that I can merge your improvements and mention you as contributor.

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

No branches or pull requests

2 participants