b. run python file in the directory using below command:
$ python3 Wireless-X_server.py
If no errors encountered, below output should be displayed on terminal:
---------Wireless-X Server------
Camera stream port: 9998
Keyboard and Mouse Listening port: 6666
2. Application Installation and Setup on Android Smartphone:
a. Install the Wireless-X apk on Android smartphone and give required permissions.
b. Now enter the IP address of the Laptop/ Desktop on which the server is hosted. You can type the below command in terminal to get host IP:
$ ifconfig
c. Click on Test Button to test the connection of smartphone with the server. If failed, Recheck if you have entered correct IP address of Laptop/ Desktop (on
which the server is running).
d. After successfull connection, you would be able to control mouse, keyboard of laptop and use smartphones camera as webcam for the laptop/Desktop.
e. Now you would be able to use this virtual webcam device on chrome for video conferincing. (Tested on chrome for MS Teams and Google Meet).
f. (Optional) Inorder to test if camera frames are received to the Laptop/ Desktop, use the below command while (Note: camera option should be turned on in the
Wireless-X apk on Android):
$ ffplay /dev/video20
## IMPORTANT: Make sure you have a virtual device created before running the Wireless-X_server.py.
#### *Extra (Inorder to remove v42loopback devices, use below command):
$ sudo modprobe -r v4l2loopback
## Steps for Debugging (If python code doesn't run after above commands):
1. Check if your virtual device is created
$ ls /dev | grep -P '^video\d+$'
OR
$ v4l2-ctl --list-devices # TO List the virtual devices in detail
Output should look somewhat like this:
Wireless-X Camera (platform:v4l2loopback-000):
/dev/video20
Webcam C170: Webcam C170 (usb-0000:00:1a.0-1.2):
/dev/video0
/dev/video1
2. Inorder to test if virtual device is working:
Copy the sample code from https://github.com/jremmons/pyfakewebcam page and save it as python file and run it.
$ python3 demo.py
If everything worked correctly, no error should be displayed and terminal should be blank.
Now, Open another terminal and test if virtual device output is being display by entering below command: