Giter Site home page Giter Site logo

Comments (3)

kirk-quinbar avatar kirk-quinbar commented on July 3, 2024 1

thanks for checking out my code. it was fun and interesting getting this to work. part of the problem at first was windows had horrible support for BLE devices prior to Fall 2018 Creator's edition. It looks like you are past that since that was version was 1709 and you are on 1803. I wrote this for a project i was asked to do where the device is made by Polar. Its one of those bands you wear around your chest and this all works as expected. I found out that devices might be different in their implementation of the BLE standard and some seem to work better with microsoft's BLE api than others.

One thing to try would be to download the UWP samples from microsoft and try out their bluetooth LE example here. That gives a similar interface as mine. if it works, there might be something they are doing in their code that i am not in mine. In general i believe i am just letting windows itself do the pairing if i recall correctly by just calling their pairing api. There are a couple of different ways of pairing and i think i was just calling windows own pairing code as opposed to writing my own with their api.
https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE

some other things to note i ran across during my tesitng

  • if you have an older computer, it might be that your computer or bluetooth interface does not support BLE or doesnt support it completely. I ran into that with one of my desktop computers and ended up having to do most of my development on my laptop.
  • can you pair the device directly using the main windows bluetooth dialog. if not, then maybe windows itself doesnt understand how to connect to it? I ran into this prior to the Fall 2018 Creators edition, but unless they broke something in later versions, like yours, i wouldnt think that would be an issue anymore. lol I do recall them fixing something prior to 1709 to support ble devices, then breaking it the next release, then fixing it again for 1709 so that's microsoft for you.

from heartratele.

KawtharE avatar KawtharE commented on July 3, 2024

@kirk-quinbar Thank you for rapid response.
Actually i am able to pair my device with the windows system.
Could the problem be that the activation time of my device is just 60sec? or is there some sepecific hard can cause this problem and not be able to interact well with this code?

from heartratele.

kirk-quinbar avatar kirk-quinbar commented on July 3, 2024

woops sorry for delay. i meant to respond earlier..

yes it is very possible that specific hardware or even the ble device itself is not fully compliant which would make it so the code would not work. that is the problem, at least when i was developing this code. i found that microsoft's ble api, the ble devices and ble interfaces all have their own standards they follow and that they dont necessarily implement all the official standards. it was very frustrating, especially when microsoft's api changed 3 or 4 times and every other time broke something every time a new release of windows came out.

if things are working correctly, it should never take 60 seconds either. that's a huge connect time. it should be pretty much instantaneous. did you try the bluetoothLE sample i listed above and did it take 60 seconds too?

from heartratele.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.