Skip to main content
Bumped by Community user
added 325 characters in body
Source Link

Another update:

Here is the output I get from readValue()

Buffer:
<Buffer 30 00 30 0a 06 00 00 00 3a 67 c2 a0 9f ff fb b7 4c 04 44 c0>
00
:g ÿû·LDÀ
{"type":"Buffer","data":[48,0,48,10,6,0,0,0,58,103,194,160,159,255,251,183,76,4,68,192]}
*********
00
:g ����LD�
*********

Another update:

Here is the output I get from readValue()

Buffer:
<Buffer 30 00 30 0a 06 00 00 00 3a 67 c2 a0 9f ff fb b7 4c 04 44 c0>
00
:g ÿû·LDÀ
{"type":"Buffer","data":[48,0,48,10,6,0,0,0,58,103,194,160,159,255,251,183,76,4,68,192]}
*********
00
:g ����LD�
*********
added 1104 characters in body
Source Link

Another edit, I think I'm nearly there:

var deviceGUID = 'CD:89:7A:45:32:FB'
var primaryServiceGUID = '1086fff0-3343-4817-8bb2-b32206336ce8'
var characteristicGUID = '1086fff1-3343-4817-8bb2-b32206336ce8'
async function start() {
        const {createBluetooth} = require('node-ble')
        const {bluetooth, destroy} = createBluetooth()
        const adapter = await bluetooth.defaultAdapter()

        console.log('Connecting')
        const device = await adapter.waitDevice(deviceGUID)
        await device.connect()

        const gattServer = await device.gatt()
        console.log('Services')
        console.log(gattServer.services())

        const service1 = await gattServer.getPrimaryService(primaryServiceGUID)
        console.log(service1)

        const characteristic1 = await service1.getCharacteristic(characteristicGUID)
        const buffer = await characteristic1.readValue()
        console.log('Buffer:')
        console.log(buffer)
}

start()

Another edit, I think I'm nearly there:

var deviceGUID = 'CD:89:7A:45:32:FB'
var primaryServiceGUID = '1086fff0-3343-4817-8bb2-b32206336ce8'
var characteristicGUID = '1086fff1-3343-4817-8bb2-b32206336ce8'
async function start() {
        const {createBluetooth} = require('node-ble')
        const {bluetooth, destroy} = createBluetooth()
        const adapter = await bluetooth.defaultAdapter()

        console.log('Connecting')
        const device = await adapter.waitDevice(deviceGUID)
        await device.connect()

        const gattServer = await device.gatt()
        console.log('Services')
        console.log(gattServer.services())

        const service1 = await gattServer.getPrimaryService(primaryServiceGUID)
        console.log(service1)

        const characteristic1 = await service1.getCharacteristic(characteristicGUID)
        const buffer = await characteristic1.readValue()
        console.log('Buffer:')
        console.log(buffer)
}

start()
added 49 characters in body
Source Link

nRF Connect shows this device as a BLE device

nRF Connect shows this device as a BLE device

added 1460 characters in body
Source Link
Loading
Source Link
Loading