diff --git a/docs/Android.md b/docs/Android.md index 14d28799..9559f4a2 100644 --- a/docs/Android.md +++ b/docs/Android.md @@ -1,66 +1,92 @@ # Android -This article describes how to use KlipperScreen from an android device +This article describes how to use KlipperScreen from an Android device !!! warning The experience may not be equal to run KlipperScreen natively. Depending on the device or the network you may encounter performance degradation or other issues. -!!! bug - Some [users have found](https://github.com/KlipperScreen/KlipperScreen/issues/862) that using this method causes memory-leaks +1. [First installl KlipperScreen](Installation.md) +2. Install [XServer-XSDL](https://play.google.com/store/apps/details?id=x.org.server) on the Android device -1. [First installl KlipperScreen on the Pi](Installation.md) -2. Install [XServer-XSDL](https://play.google.com/store/apps/details?id=x.org.server) on the android device -3. Choose [USB(ADB)](#adb) or [WI-FI](#wifi) + Devices that do not have acces to the play store can grab the apk from the [official sourceforge]( + https://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/). ViewTouch does work too + + with older versions of Android you may have to use v1.11.40 + +3. Choose [USB (ADB)](#adb) or [WI-FI](#wifi) ### ADB +!!! bug + Some [users have found](https://github.com/KlipperScreen/KlipperScreen/issues/862) that using this method may cause memory-leaks + !!! warning Leaving the phone always connected it's not recommended, remove the battery to avoid issues. -* Install ADB on the Pi -```bash -sudo apt-get install android-tools-adb -``` -* Put your Android phone/tablet in Debug mode. +1. Install ADB on the computer/SBC/Pi with this command: + ```bash + sudo apt-get install android-tools-adb + ``` +2. Put your Android device in Debug mode. -Usually it involves enabling developer mode and "USB debugging" but this varies on different vendors and versions of the device -search "how to enable android debugging on device-model-and-brand" + Usually it involves enabling developer mode and "USB debugging" + the exact method varies on different vendors and versions of the device -* Copy the launcher script + search "how to enable Android debugging on device-model-and-brand" -```bash -cd ~/KlipperScreen/scripts -cp sample-android-adb.sh launch_KlipperScreen.sh -chmod +x launch_KlipperScreen.sh -``` +3. Copy the sample launcher script with the following commands: -* Go to [Startup](#startup) + ```bash + cd ~/KlipperScreen/scripts + cp sample-android-adb.sh launch_KlipperScreen.sh + chmod +x launch_KlipperScreen.sh + ``` + +4. Start Xserver-XSDL On the Android device + +5. Go to [Startup](#startup) ### WIFI -* Create a launcher script +1. Create a launcher script by entering the following commands: -```bash -cd ~/KlipperScreen/scripts -touch launch_KlipperScreen.sh -chmod +x launch_KlipperScreen.sh -nano launch_KlipperScreen.sh -``` + ```bash + rm ~/KlipperScreen/scripts/launch_KlipperScreen.sh + touch ~/KlipperScreen/scripts/launch_KlipperScreen.sh + chmod +x launch_KlipperScreen.sh + nano ~/KlipperScreen/scripts/launch_KlipperScreen.sh + ``` -* Paste this into the script (replace the example IP) -```bash -DISPLAY=192.168.150.122:0 $KS_XCLIENT -``` +2. Start the app on the Android device (Xserver-XSDL or ViewTouch) +3. Paste this into the script: + + Replace the example IP with the one that Android app shows in the screen. + ```bash + DISPLAY=192.168.150.122:0 $KS_XCLIENT + ``` !!! important - It's recommended to use a static address, because if the address changes your connection will stop working. - -* Go to [Startup](#startup) + It's recommended to use a static IP address, because if it changes your connection will stop working. ## Startup -Start Xserver-XSDL On the android device +Enter this command on the computer/SBC/Pi +```bash +sudo service KlipperScreen restart +``` + +## Doesn't start + +Follow this steps: + +1. Reboot the Android device +2. Open the XSDL app and leave it waiting in the blue-screen +3. Reboot the computer/SBC/Pi + +## Xserver-XSDL config + +Some versions of the app require this configuration to work as expected. On the splash-screen of the app go to: ``` @@ -70,23 +96,19 @@ On the splash-screen of the app go to: ``` if you missed it, restart the app. -on the Pi -```bash -sudo service KlipperScreen stop -sudo service KlipperScreen start -``` +## Recommended configuration for this use case -## Doesn't start +Turn off DPMS and Display timeout: -Tipically happens after the user just installed. Follow this steps: - -* Reboot the Android device -* Open the XSDL app and leave it waiting in the blue-screen -* Reboot the Pi / SBC +![disable_dpms_poweroff](img/disable_dpms_poweroff.png) ## Stop Screen Blanking in Xserver-XSDL -Even after enabling the "Stay Awake" option in the Developer/USB Debugging options of your Android device, the Xserver-XSDL may still go to a black screen but keep the backlight of your device on. To keep the screen always active, upon start up of Xserver-XSDL app, select the `Change Device Configuration` at the top of the splash screen and then select the `Command line parameters, one argument per line` option. Append the following argument (must be on seperate lines): +Even after enabling the "Stay Awake" option in the Developer/USB Debugging options of your Android device, +the Xserver-XSDL may still go to a black screen but keep the backlight of your device on. +To keep the screen always active, upon start up of Xserver-XSDL app, select the `Change Device Configuration` +at the top of the splash screen and then select the `Command line parameters, one argument per line` option. +Append the following argument (must be on seperate lines): ``` -s 0 diff --git a/docs/VNC.md b/docs/VNC.md index 58555911..160f8bd3 100644 --- a/docs/VNC.md +++ b/docs/VNC.md @@ -14,6 +14,7 @@ This article describes how to use KlipperScreen through a remote connection. ```bash sudo apt install tigervnc-standalone-server ``` + 3. Create `launch_KlipperScreen.sh`: ```bash @@ -23,15 +24,17 @@ This article describes how to use KlipperScreen through a remote connection. DISPLAY=:10 $KS_XCLIENT& wait ``` + !!! tip + To change resolution add: `-geometry 1280x720` to the arguments of Xtigervnc + 4. Restart KlipperScreen or reboot the system: ```bash sudo systemctl service KlipperScreen restart ``` + 5. On KlipperScreen set the following configuration: -DPMS: off - -Display timeout: off +Turn off DPMS and Display timeout: ![disable_dpms_poweroff](img/disable_dpms_poweroff.png)