rudis1261 / blink-server Goto Github PK
View Code? Open in Web Editor NEWThis is the server you would need to be able to run the Blink Android Application.
License: MIT License
This is the server you would need to be able to run the Blink Android Application.
License: MIT License
I am kinda uneased about this piece of code. What's there to keep a malicious actor from sending an x-coordinate of ; rm /very/important/file
? Especially since the server is running as superuser, that is a risk to be careful of.
I would suggest using str(float(JSON['x']))
to make sure only numeric input can be entered.
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
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?
Hi, about the issue described in README, this helped me on Ubuntu 15.10
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.
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
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 ๐
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:
export DISPLAY=:0
export XAUTHORITY=~/.Xauthority
source ~/.bashrc
cd ~
rm .Xauthority
touch .Xauthority
xauth generate :0 . trusted
randomkey=`/usr/bin/ksh -c 'echo $(( $RANDOM * $RANDOM * 2 ))'`
xauth add ${HOST}:0 . $randomkey
xhost +local:
sudo blink-server
If someone has a better solution please let me know, I'm just a beginner in Linux environment.
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.
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?
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']
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.