Replies: 4 comments 5 replies
-
react-native-ble-plx has an javascript/ Typescript interface. ErgometerJs is made for talking to all kinds of libraries. It should not be difficult to change it. You have to implement your own driver (implement the interface IDriver).
Look at the source of The DriverBleCentral or DriverSimleBLE or DriverWebBlueTooth to see how to do this. The library ( PerformanceMonitorBle) will not directly recognize your new driver but you can set the monitor using the driver property:
public set driver(value:ble.IDriver) {
this._driver = value;
}
… On 17 Jun 2021, at 14:26, jmlarbaig ***@***.***> wrote:
Hello Tijmen
I use react native ble plx library until now and I would like to use your library,
Do you think that it's will be possible ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#24>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVG7NQSEGOISEWIOBM47JDTTHSWFANCNFSM463SC6FQ>.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I think you are talking about de bleat include in the demo. Yes you can remove that one and also the noble include. Just use your own library. If you get the driver working , I am interested in your source code, I could publish it as part of ErgometerJs. (And as advantage for you I will check your code)
var noble = require('noble');
var bleat = require('./libs/bleat/index').classic;
… On 17 Jun 2021, at 14:49, jmlarbaig ***@***.***> wrote:
Ok, I see what you mean. After that, If I understand well, I just need to replace bleat variable by the new one ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#24 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVG7NUIYWJUMCOI66MRIA3TTHVNRANCNFSM463SC6FQ>.
|
Beta Was this translation helpful? Give feedback.
2 replies
-
It is best to check the typescript files which are compiled into javascript. These contain the source code:
You will need to create a ble driver which are located here: (The driver.ts contains the interface IDriver and the other files are different implementations )
ErgometerJS/api/typescript/ergometer/ble at master · tijmenvangulik/ErgometerJS (github.com) <https://github.com/tijmenvangulik/ErgometerJS/tree/master/api/typescript/ergometer/ble>
There are also usb drivers but you can ignore these. You want ble.
ErgometerJS/api/typescript/ergometer/usb at master · tijmenvangulik/ErgometerJS (github.com) <https://github.com/tijmenvangulik/ErgometerJS/tree/master/api/typescript/ergometer/usb>
… On 17 Jun 2021, at 17:15, jmlarbaig ***@***.***> wrote:
I'm sorry, It's will be the first time when I need to do this kind of operation.
I have found somes files and driver (in ergometer.js and in the directory of api with different files of BLE). Could you tell me which files I can see the sources of Driver already create please,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#24 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVG7NWYNF3FNQZGKCPCKUTTTIGQPANCNFSM463SC6FQ>.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Then it should not be difficult to convert the ble central driver It will not work directly you need some changes to connect the driver to the react native ble manager. Often the best approach is to first get react native ble manger running without ergometer space and connect to the ergometer and once that is running, make the changes to let driver communicate with the react native ble manager. This way you are more sure where the problems are when you can not connect.
react-native-ble-manager/BleManager.js at master · innoveit/react-native-ble-manager (github.com) <https://github.com/innoveit/react-native-ble-manager/blob/master/BleManager.js>
Tijmen
… On 17 Jun 2021, at 17:40, jmlarbaig ***@***.***> wrote:
Sorry ! I thought it's was ble-plx library what I use but this is this one : https://github.com/innoveit/react-native-ble-manager <https://github.com/innoveit/react-native-ble-manager>
It's a portion of BleCentral you mean in your different driver. May be it's will be work so.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#24 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAVG7NXODZV5FX4EELEXTHTTTIJPBANCNFSM463SC6FQ>.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Tijmen
I use react native ble plx library until now and I would like to use your library,
Do you think that it's will be possible ?
Beta Was this translation helpful? Give feedback.
All reactions