-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
HELP - const gattServer = await device.gatt()- don't work :/ #25
Comments
I ran into the same issue. Any solution available? |
Please, try to disconnect the device to all gatways. |
@mathbozzi thanks for your reply. |
@rzumbuehl did you find a cause for this issue? I am running into the same problem. |
As mentioned, the root cause of my problem was that the BLE device closed the connection to the BLE Central (Raspberry PI) immediately after the device.connect() call. This was the reason why device.gatt() call did not return. |
No, I'm actually using another BLE device (wearable). Sorry, I can't help here. |
@rzumbuehl I was curious if you had discovered why the device was closing the connection immediately. I am observing the same behavior. |
hello. this theme is actual. i am cant get this code not working too. and this not resolve problem . try {
this.gattServer = await Promise.race([
device.gatt(),
new Promise((resolve, reject) => setTimeout(() => {
reject('cant get device.gatt()');
}, this.timeout)),
]);
logger.info(`get gatt`);
this.device = device;
} catch (error) {
throw error;
} |
has there been any progress on this issue ? |
I encountered the same issue today and came across this post. For future reference, after some experimentation, I found the issue (at least in my case); the signal was too weak. By moving closer to the sensor, it simply started working. My guess is that the signal is too weak for the device's antenna to pick up commands, but the computers BT receiver is good enough to pick up the initial discovery message. |
out:
I have trying to connect my blood pressure monitor to extract the data,
but in line 19 - (const gattServer = await device.gatt()) doesn't seem to work.
The code stay in line 19 and never get the service in line 22.
May some one help me? please!
The text was updated successfully, but these errors were encountered: