https://github.com/ksachdeva/pc-ble-driver-js-examples
Examples of how to use pc-ble-driver-js node module
https://github.com/ksachdeva/pc-ble-driver-js-examples
Last synced: about 1 year ago
JSON representation
Examples of how to use pc-ble-driver-js node module
- Host: GitHub
- URL: https://github.com/ksachdeva/pc-ble-driver-js-examples
- Owner: ksachdeva
- License: mit
- Created: 2016-06-30T14:31:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T13:55:31.000Z (over 9 years ago)
- Last Synced: 2025-01-04T08:35:49.396Z (about 1 year ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Examples showing how to use pc-ble-driver-js node module
This repository contains examples of how to use [pc-ble-driver-js](https://github.com/NordicSemiconductor/pc-ble-driver-js) node module from NordicSemiConductor
Since you will make either a peripheral or central application (or may be both) you would need the corresponding
devices.
One easy way to create peripherals is to use LightBlue Explorer iOS application (https://itunes.apple.com/us/app/lightblue-explorer-bluetooth/id557428110?mt=8) and create a virtual peripheral in it.
The virtual peripheral I create has following properties :
* LocalName : TestNRF5X
* ServiceUUID : 1111
* Service 1111 has a characteristic whose UUID is 2222 and is readable
* I put 2 random values in 2222
Here is a screenshot of how the virtual peripheral looks for me

## nrf5x_apps
This nodejs application contains various examples that make use of pc-ble-driver-js node module
## Setup
```
npm install
```
Note that because pc-ble-driver-js module is not yet published you will get the master version from
github and there is a possibility that it may be broken because of ongoing development & enhancements
### example 1
This example shows how to
* Scan for devices
* Connect to selected device
* Discover services in the selected device
* Discover characteristics of the selected service
* Read the selected characteristic
[Read more about it!](nrf5x_apps/example1)
## nrf5x_apps_typescript
This nodejs application contains various examples written using typescript that make use of pc-ble-driver-js node module
## Setup
```
npm install
typings install
```
Note that because pc-ble-driver-js module is not yet published you will get the master version from
github and there is a possibility that it may be broken because of ongoing development & enhancements
### example 1
This example shows how to
* Scan for devices
* Connect to selected device
* Discover services in the selected device
* Discover characteristics of the selected service
* Read the selected characteristic
[Read more about it!](nrf5x_apps_typescript/example1)
## nrf5x_apps_rxjs
This nodejs application contains various examples written using typescript & RxJS that make use of rx-pc-ble-driver-js node module
## Setup
```
npm install
typings install
```
Note that because rx-pc-ble-driver-js module is not yet published you will get the master version from
github
### example 1
This example shows how to
* Scan for devices
* Connect to selected device
* Discover services in the selected device
* Discover characteristics of the selected service
* Read the selected characteristic
The interesting thing with this example is that the code is more maintainable, readable & resilient thanks to
Reactive Extensions.
[Read more about it!](nrf5x_apps_rxjs/example1)
## Misc notes
* My development and test machine is Macbook pro running OS X 10.11.xx (El Capitan)
* I am using PCA10040 V1.1.0 2016.9 board
* I use the latest and greatest connectivity firmware that is provided as part of pc-ble-driver-js node module