GithubHelp home page GithubHelp logo

btt's Introduction

btt – CLI to kick bluetooth tethering w/ waking up MR05LN

日本語(Japanese)

What is BTT?

btt is a CLI tool to start/stop bluetooth tethering. It also has a function to wakeup Aterm MR05LN.

btt is compatible with Linux and macOS. Linux version uses nmcli internally, macOS version uses oascript (JXA) to control GUI menu.

Usage

Usage: btt [-w] {watch|on|off|wakeup}
      on ... connect to bluetooth AP
     off ... disconnect from bluetooth AP
   watch ... keep connected to bluetooth AP if Wi-Fi is off
  wakeup ... wakeup bluetooth AP (NMR05LN)
      -w ... perform 'wakeup' in 'on' and 'watch' operations

Requirements

This shell script uses these commands internally. Make sure these comands are correctly setup.

Linux

  • l2test (/usr/bin): apt install bluez
  • nmcli (/usr/bin): apt install network-manager
  • ip (/sbin): apt install iproute2

macOS

  • blueutil (/usr/local/bin): brew install blueutil
  • networksetup (/usr/bin)
  • osascript (/usr/bin)
  • route (/sbin)

Setup

  1. Place config flie as ~/.config/btt/config.sh
    mkdir -p ~/.config/btt
    cp ./config.sh.example ~/.config/btt/config.sh
    vi ~/.config/btt/config.sh
        

    example of config.sh:

    ## Config file example for btt
    ##
    ## https://github.com/yoshinari-nomura/btt
    ##
    ## MAC addaddress shoud be upper-case and colon-separated.
    ##
    BLUETOOTH_AP_MACADDR="11:22:33:AA:BB:CC"
    BLUETOOTH_AP_NAME="ap_name_showed_in_your_macos_menubar"
    MR05LN_WAKEUP_MACADDR="44:55:66:DD:EE:FF"
        
  2. Copy ./btt file in your bin directory

btt's People

Contributors

yoshinari-nomura 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.