Coder Social home page Coder Social logo

blink-server's People

Contributors

c-bouthoorn avatar drpain avatar markoschuetz avatar rudis1261 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blink-server's Issues

Run the server without root rights

Running code as root is a redonculous security risk, and for me, a bluetooth server it's a little hard to justify.
What are the current causes for needing root rights, and could you remove the necessity for root?

Server not starting

Hi, I'm getting the same error as described for fedora. I'm running ubuntu 16.04.
when I try to start the server I get:

Traceback (most recent call last): File "/home/artis/.blink/bluetooth_server.py", line 25, in <module> profiles = [ SERIAL_PORT_PROFILE ] File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 176, in advertise_service raise BluetoothError (str (e)) bluetooth.btcommon.BluetoothError: (2, 'No such file or directory')

This happens when I run sudo ~/.blink/bluetooth_server.py and also when I run sudo /usr/bin/python2.7 ~/.blink/bluetooth_server.py any idea?

Duplicate commands

I try to change slides, but commands are duplicate as follows:

COMMAND RECEIVED [left]
['xdotool', 'key', 'Left']
['xdotool', 'key', 'Left']
COMMAND RECEIVED [right]
['xdotool', 'key', 'Right']
['xdotool', 'key', 'Right']

Uses wrong RFCOMM channel after first opening

Bascially, I open the server, pair it up with the app via RFCOMM channel 1. Pairs up, works great. However, after closing the app via either suspending (ctrl+z) or quitting (ctrl+), the next time it opens it wants to use RFCOMM channel +1; so the second time I opened it wanted 2; then 3; then 4. When I opened the app on the phone it still acted as though it was connected, letting me bypass the connection screen (in fact I can't reconnect?) but not functioning correctly. It seems like the server needs to always open to use the same RFCOMM channel, or the app needs to recheck and sync with the server every time it is opened.

Also, simply killing the app via ctrl+c doesn't work, not sure why or if that is relevant.

system info:

System:
Kernel: 4.15.0-45-generic x86_64 bits: 64 compiler: gcc
v: 7.3.0 Desktop: Cinnamon 4.0.9 Distro: Linux Mint 19.1 Tessa
base: Ubuntu 18.04 bionic

Two quick commands after each other break

For example, tapping twice quickly after another gives clickclick command not found, Eish. I think it's because the client_sock.recv(1024) receives too much at once.

Another case would be {"action":"mouse-move","x":1.811187744140625,"y":1.63995361328125}{"action":"mouse-move","x":2.9740753173828125,"y":0.71514892578125} command not found, Eish

Other than that, this works great! Thank you for making an open-source "It just works" equivalent. Other apps either didn't work, required WiFi, or were paid, so I appreciate this project ๐Ÿ˜„

Mouse area option doesn't work

When I enable Mouse Area and I tried move the mouse, the app crashed.
I got this message:

`COMMAND RECEIVED [{"action":"mouse-move","x":null,"y":null}{"action":"mouse-move","x":-25.349761962890625,"y":-32.430633544921875}]
[MULTIPLE COMMANDS] This may work, this may not work

Traceback (most recent call last):
File "bluetooth_server.py", line 42, in
commandKeys(data)
File "blink-server/core.py", line 58, in commandKeys
commandKeys(command)
File "blink-server/core.py", line 96, in commandKeys
str(float(JSON['x'])),
TypeError: float() argument must be a string or a number`

I'm using Ubuntu 18.10

No mouse cursor

No mouse cursor appears after connecting the app to the server.

I can see that the server is getting input (it's logging), and the desktop is getting mouse events - hover events in the browser is working, and I was able to click things.

I did not previously have a mouse connected to computer, so I did not have a mouse cursor before starting the server and connecting the app.

Using Ubuntu 14.04.4, Android 5.0, latest server code and app as of today.

Adding --compat didn't work

On Ubuntu 16.04 I modified /lib/systemd/system/bluetooth.service to show ExecStart=/usr/lib/bluetooth/bluetoothd --compat and then restarted bluetooth but still same error

Traceback (most recent call last):
  File "bluetooth_server.py", line 25, in <module>
    profiles         = [ SERIAL_PORT_PROFILE ]
  File "/usr/lib/python2.7/dist-packages/bluetooth/bluez.py", line 176, in advertise_service
    raise BluetoothError (str (e))

and service bluetooth status shows:

 bluetoothd[27411]: Not enough free handles to register service
 bluetoothd[27411]: Not enough free handles to register service
 bluetoothd[27411]: Current Time Service could not be registered
bluetoothd[27411]: gatt-time-server: Input/output error (5)
 bluetoothd[27411]: Not enough free handles to register service
 bluetoothd[27411]: Not enough free handles to register service
 bluetoothd[27411]: Sap driver initialization failed.
 bluetoothd[27411]: sap-server: Operation not permitted (1)
 bluetoothd[27411]: Endpoint registered: sender=:1.51 path=/MediaEndpoint/A2DPSour
 bluetoothd[27411]: Endpoint registered: sender=:1.51 path=/MediaEndpoint/A2DPSink

My other bluetooth devices are working.

Xauth not setup: failed creating new xdo instance

Hello, when I run the first time sudo blink-server I got this errors in the server after using swipe area:

No protocol specified
Error: Can't open display: (null)
Failed creating new xdo instance

I found a solution that worked for me:

  1. Add these instructions to ~/.bashrc file:
export DISPLAY=:0 
export XAUTHORITY=~/.Xauthority
  1. Apply changes:
source ~/.bashrc
  1. Remove old .Xauthority file
cd ~
rm .Xauthority
  1. Create a blank .Xauthority file
touch .Xauthority
  1. Generate a new .Xauthority file:
xauth generate :0 . trusted
  1. Create a new magic-cookie key
randomkey=`/usr/bin/ksh -c 'echo $(( $RANDOM * $RANDOM * 2 ))'` 
  1. Add a new entry for another server
xauth add ${HOST}:0 . $randomkey
  1. Run the server
xhost +local:
sudo blink-server

If someone has a better solution please let me know, I'm just a beginner in Linux environment.

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.