Coder Social home page Coder Social logo

blink-server's Introduction

Blink Server

Bluetooth Linux Remote for Android devices

Where you want to be able to control your Linux Computer, and Wifi is not an option. This is something I wrote, because nothing else on the market seemed to work. This is the server you would need to be able to run the Blink Android Application.

ANDROID APP INSTALLATION

https://play.google.com/store/apps/details?id=co.za.thatguy.blink

SERVER INSTALLATION

REQUIRES PYTHON2.7 TO WORK

Install the server with the following commands in your terminal.

Installation on Debian Based Systems (Ubuntu, Kubuntu, Debian etc)

sudo apt-get install bluez python-bluez xdotool
git clone https://github.com/drpain/blink-server.git ~/.blink

Installation on Fedora Based Systems (Fedora, Centos)

sudo yum install bluez pybluez
git clone https://github.com/drpain/blink-server.git ~/.blink

Installation on Arch Based Systems (Arch, Manjaro)

yaourt pybluez xdotool
git clone https://github.com/drpain/blink-server.git ~/.blink

You also need to add --compat as described below.

STARTING SERVER

Then to start the server, all you need to do is run the server with the following command from your terminal. As long as the server runs, you will be able to send commands to it.

sudo ~/.blink/bluetooth_server.py

HELP

The hardest part of this is getting the server installed and running. If you struggle to get the bluetooth to work, maybe this will help:

This guide helped me allot, original post: Bluetooth Setup

There are plenty of guides in the internet on how to get bluetooth working, but the only method that worked consistently for me is the following: Disable bluetooth pnat support as there seems to be a bug which stops proper operation with pnat enabled. Full details can be found here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690749

A workaround is to add the following to /etc/bluetooth/main.conf:

DisablePlugins = pnat

Permissions Issues:

This has been reported as helpfull for sorting out permissions issues on Ubuntu 15.10. Thanks @jachym for providing the link: https://code.google.com/p/pybluez/issues/detail?id=62

Something along the lines of: bluetooth.btcommon.BluetoothError: (2, 'No such file or directory'

# https://stackoverflow.com/a/46810116
# Adding compatibility mode to the service will help start it

sudo vim /etc/systemd/system/dbus-org.bluez.service

# Find the line with the `ExecStart` and replace it  with
ExecStart=/usr/lib/bluetooth/bluetoothd -C

# And complete the action with the following commands
sudo sdptool add SP
sudo systemctl daemon-reload
sudo service bluetooth restart

You should be able to check the status to confirm that it now uses to /usr/lib/bluetooth/bluetoothd -C by running this command:

sudo service bluetooth status

OTHER KNOWN ISSUES

Pyhon3: Unfortunately pybluez does not work properly on Python3, it was meant to be part of Python itself, but wasn't ported properly. For now the server will only work on Python2.7.

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.