Giter Site home page Giter Site logo

millertechnologyperu / hcitool Goto Github PK

View Code? Open in Web Editor NEW
91.0 7.0 11.0 1.11 MB

Bluetooth Host Controller Interface Command Line Tool for for sending HCI commands on macOS and Linux

Home Page: https://millertechnologyperu.github.io/hcitool/

License: MIT License

Swift 100.00%
bluetooth swift hciconfig bluez macos linux

hcitool's Introduction

hcitool

Bluetooth Host Controller Interface Command Line Tool for for sending HCI commands on macOS and Linux

hcitool's People

Contributors

colemancda avatar jmarkstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hcitool's Issues

Add `LE Connection Update Command`

The LE_Connection_Update command is used to change the Link Layer connection parameters of a connection. This command may be issued on both the master and slave.

Doesn't compile (swift build)

swift build leads to this result:

hcitool/Sources/hcitool/main.swift:18:38: error: value of type 'HostController' has no member 'isPowerChangeSupported'
    if controller.powerState != .on, controller.isPowerChangeSupported {
                                     ^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f '/[...]/hcitool/.build/debug.yaml' main output:

Could it be because I don't have the latest Xcode version?

LE Start Encryption Command

The LE_Start_Encryption command is used to authenticate the given encryption key associated with the remote device specified by the Connection_Handle, and once authenticated will encrypt the connection.

Add help information for each command

Each command should have a description property, and when no command is specified we should load all the possible options. Command will need an all property.

Add `LE Test End Command`

This command is used to stop any test which is in progress. The Number_Of_Packets for a transmitter test shall be reported as 0x0000. The Number_Of_Packets is an unsigned number and contains the number of received packets.

Refactor project layout

Refactor layout of project to have a model framework target, a unit test target, and an executable target that is only main.swift.

Add `LE Read Buffer Size Command`

The LE_Read_Buffer_Size command is used to read the maximum size of the data portion of HCI LE ACL Data Packets sent from the Host to the Controller.

Add `LE Long Term Key Request Reply Command`

The LE_Long_Term_Key_Request Reply command is used to reply to an LE Long Term Key Request event from the Controller, and specifies the Long_Term_Key parameter that shall be used for this Connection_Handle.

Add `LE Transmitter Test Command`

This command is used to start a test where the DUT generates test reference packets at a fixed interval. The Controller shall transmit at maximum power.

Input/output error

Having error while executing lescan

root@homeassistant:~# hcitool -i hci0 lescan
Set scan parameters failed: Input/output error

Add `LE Clear Resolving List Command`

The LE_Clear_Resolving_List command is used to remove all devices from the list of address translations used to resolve Resolvable Private Addresses in the Controller.

Add `LE Read Resolving List Size Command`

The LE_Read_Resolving_List_Size command is used to read the total number of address translation entries in the resolving list that can be stored in the Controller. Note: The number of entries that can be stored is not fixed and the Controller can change it at any time (e.g. because the memory used to store the list can also be used for other purposes).

Assertion failed

I was able to compile the project with Xcode 13.2.1 and then tried to run this command:

.build/x86_64-apple-macosx/debug/hcitool ibeacon

However, this error message appeared:

BluetoothDarwin/BluetoothDarwin.swift:31: Assertion failed
zsh: illegal hardware instruction .build/x86_64-apple-macosx/debug/hcitool ibeacon

Do we need to configure anything before running ibeacon?

Properly parse boolean command line arguments

Right now we have 2 swift files that deal with boolean values for the command line interface:

  • CommandLineBool.swift
  • Boolean.swift

We need to avoid duplicate code and standardize.

Add `LE Rand Command`

The LE_Rand command is used to request the Controller to generate 8 octets of random data to be sent to the Host.

Add `LE Encrypt Command`

The LE_Encrypt command is used to request the Controller to encrypt the Plaintext_Data in the command using the Key given in the command and returns the Encrypted_Data to the Host.

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.