GithubHelp home page GithubHelp logo

vatthaphon / bleconsole Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sensboston/bleconsole

0.0 1.0 0.0 997 KB

Bluetooth Low Energy device console app

Home Page: https://sensboston.github.io/BLEConsole

License: MIT License

C# 100.00%

bleconsole's Introduction

BLEConsole

Windows command-line tool for interacting with Bluetooth LE devices

alt text

Requirements:

Windows 10, BT 4.0 adapter

Console commands:

  • help, ? : show help information

  • quit, q : quit from application

  • list, ls [w] : show available BLE devices

  • open or <#> : connect to BLE device

  • timeout : show/change connection timeout, default value is 3 sec

  • delay : pause execution for a certain number of milliseconds

  • close : disconnect from currently connected device

  • stat, st : shows current BLE device status

  • print, p <text&vars>* : prints text and variables to stdout, where are variables are:

    • %id : BlueTooth device ID
    • %addr : device BT address
    • %mac : device MAC address
    • %name : device BlueTooth name
    • %stat : device connection status
    • %NOW, %now, %HH, %hh, %mm, %ss, %D, %d, %T, %t, %z : date/time variables
  • format [data_format], fmt : show/change display format, can be ASCII/UTF8/Dec/Hex/Bin

  • set <service_name> or <#> : set current service (for read/write operations)

  • read, r ** : read value from specific characteristic

  • write, w ** : write value to specific characteristic

  • subs ** : subscribe to value change for specific characteristic

  • unsubs ** [all] : unsubscribe from value change for specific characteristic or unsubs all for all

  • wait : wait seconds for notification event on value change (you must be subscribed, see above)

  • foreach [device_mask] : starts devices enumerating loop

  • endfor : end foreach loop

  • if : start conditional block dependent on function returning w/o error

    • elif : another conditionals block
    • else : if condition == false block
  • endif : end conditional block

    * you can also use standard C language string formating characters like \t, \n etc.

    ** could be "service/characteristic", or just a char name or # (for selected service)

Example of usage:

Lookup, connect and print all BLE devices names

BLEConsole.exe < cmd.txt, where is cmd.txt is a simple text file with content:

foreach 
	if open $
		read #0/#0
		close
	endif
endfor

bleconsole's People

Contributors

sensboston avatar

Watchers

 avatar

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.