在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:NordicSemiconductor/pc-ble-driver-js开源软件地址:https://github.com/NordicSemiconductor/pc-ble-driver-js开源编程语言:JavaScript 47.9%开源软件介绍:pc-ble-driver-jsHigh-level Node.js API for Bluetooth Low Energy (BLE) using nRF51 and nRF52 hardware. UsageSee the examples folder. OverviewThe pc-ble-driver-js library allows an nRF5 connectivity chip running Nordic Semiconductor's SoftDevice to be controlled by a Node.js application. The communication with the connectivity chip happens over serial port using BLE Serialization. The pc-ble-driver-js library is higher-level than pc-ble-driver and leans towards 'convention over configuration'. This module may be useful for tasks ranging from automated BLE testing to desktop applications and BLE gateways. Installation
The install script will try to download precompiled binaries for your platform/runtime environment from our Releases. If not available, it will attempt to build the binaries from source, which requires a C++ compiler and the pc-ble-driver library. See Building. Installing in Electron appsTo use this project with Electron, the environment variables These variables can be set in
BuildingIf there are no precompiled binaries for your platform, the install script will try to build them. You will need a working C++ compiler and the pc-ble-driver library available by cmake find_package. The recommended way to get pc-ble-driver is using vcpkg. There are two options getting vcpkg. One is to download the released version, the other is to clone the repository and checkout tag/2020.07.
Afterwards vcpkg must be compiled for the target architecture used by your node executable. Then set the environment variable A full example of preparing building on Windows for 64-bit Node:
And then when installing:
TestingUnit tests
System tests
This runs the bash script scripts/system-tests.sh, so you'll need a functional bash on path. You will need to have two of each nRF device under test connected. See scripts/system-tests.sh for a list of PCA numbers of tested devices. The tests take care of firmware flashing. Hardware setupA connectivity firmware needs to be flashed on the nRF5 IC before using pc-ble-driver-js. More information on this can be found in Hardware setup. Getting startedThe examples and integration tests may be used as a starting point for development with pc-ble-driver-js. Examples include a heart rate monitor (BLE peripheral) and heart rate collector (BLE master) and show the basic structure of an application built on pc-ble-driver-js. To run the heart rate monitor example, verify your nRF5 connectivity chip is set-up and connected to your PC and run:
To get more information about the command options you can run the command without any arguments. ArchitectureAll functionality of pc-ble-driver-js is exposed through its api. Other directories in Adapter is the core component of pc-ble-driver-js's api. An An
An Follow the examples and integration tests for high-level best-practice use of pc-ble-driver-js. API Docshttps://NordicSemiconductor.github.io/pc-ble-driver-js/ ContributingFeel free to file code related issues on GitHub Issues and/or submit a pull request. In order to accept your pull request, we need you to sign our Contributor License Agreement (CLA). You will see instructions for doing this after having submitted your first pull request. You only need to sign the CLA once, so if you have already done it for another project in the NordicSemiconductor organization, you are good to go. LicenseSee the license file for details. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论