Git Product home page Git Product logo

bleps's Introduction

BLEPS

PowerShell module for interacting with Bluetooth Low Energy (BLE) devices implementing the Generic Attribute Profile (GATT/GAP)

bleps's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bleps's Issues

Read and decode advertisement beacon data?

First of all, let me thank you for BLEPS, it has been very ispirational!

I've tried BLEPS and I've managed to use it to read BLE beacons, but as far as I understand, there is no way (limit of Powershell 5) to have working WinRT events trigger, so I've resorted to listening for a few seconds and then trying to parse the received payload.. but I only get a few bytes of not very meaningful data out of Read-BleCharacteristic pointed at the serviceUUID I'm monitoring.

(I've been trying to to parse sensor data from Mi Thermometers that is sent passively in BLE advertisement beacons., the data format is described here )

it seems to me that the data I'm receiving is signed (and possibly little-endian), while Read-Blecharacteristic returns and unsigned bytearray...

On a side note, I've read that using Powershell 7 it is now possible to have working UWP events trigger (tested, and it works!), so I've used

add-type -path ".\Microsoft.Windows.SDK.NET.dll"

$Watcher=[Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher]::new()
Register-ObjectEvent -InputObject $Watcher -EventName Received -Action {
	$Global:Event=$Event
}
$Watcher.Start()
sleep 5
$Watcher.Stop()

(library can be found here ) and it indeed works, but the returned data
$event.SourceArgs[1].Advertisement.DataSections
seem to output the same unsigned bytearray (even tho this time, the object has additional DataType property that maybe could be used to dictate the format of each bytearray.. maybe?)

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.