Commit cf7eaebe authored by rajneesh's avatar rajneesh

Python printout changes and Android app added in the root folder

parent f2366e60
{
"version": 2,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.wireless_x",
"variantName": "processReleaseResources",
"elements": [
{
"type": "SINGLE",
"filters": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
]
}
\ No newline at end of file
...@@ -22,17 +22,14 @@ from pynput.mouse import Button, Controller as MouseController ...@@ -22,17 +22,14 @@ from pynput.mouse import Button, Controller as MouseController
## Creates a virtual camera on the laptop/PC ## Creates a virtual camera on the laptop/PC
virtualCamera = subprocess.run(["sudo", "modprobe", "v4l2loopback", "devices=1", "video_nr=20", "card_label='Wireless-X Camera'", "exclusive_caps=1"]) virtualCamera = subprocess.run(["sudo", "modprobe", "v4l2loopback", "devices=1", "video_nr=20", "card_label='Wireless-X Camera'", "exclusive_caps=1"])
print("Virtual camera status:", virtualCamera.returncode)
print('----------Wireless-X Server----------') print('\n\n----------Wireless-X Server----------\n\n')
print('Press Ctrl+C to terminate the server')
## @var width ## @var width
# Stores the width of the screen # Stores the width of the screen
## @var height ## @var height
# Stores the height of the screen # Stores the height of the screen
width, height = autopy.screen.size() width, height = autopy.screen.size()
print("width: "+str(width)+" height: "+str(height))
## @var curr_x ## @var curr_x
# Stores the x-coordinate of the current mouse location # Stores the x-coordinate of the current mouse location
...@@ -94,13 +91,20 @@ def bind_sockets(): ...@@ -94,13 +91,20 @@ def bind_sockets():
cam_port=9998 cam_port=9998
cameraSocket.bind(("0.0.0.0", cam_port)) cameraSocket.bind(("0.0.0.0", cam_port))
print("Camera stream port: "+ str(cam_port)) #print("Camera stream port: "+ str(cam_port))
cameraSocket.listen(10) cameraSocket.listen(10)
key_port=6666 key_port=6666
s.bind(("0.0.0.0", key_port)) s.bind(("0.0.0.0", key_port))
print("Keyboard and Mouse Listening port: "+ str(key_port)) #print("Keyboard and Mouse Listening port: "+ str(key_port))
s.listen(10) s.listen(10)
print("\nWireless Server Up and Running ....\n\n")
print("Enter Below IP address in your android app")
subprocess.run(["hostname", "-I"])
print('\nPress Ctrl+C to terminate the server')
except socket.error as msg: except socket.error as msg:
print("Socket Binding error: "+str(msg)) print("Socket Binding error: "+str(msg))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment