Websoket with server inside Android HMI Ltouch

In 2018 eight out of ten people have a smartphone, so it is a great achievement to share data acquired by our Android HMI Ltouch
(such as the measure of a temperature) over a wireless network and look at it with a web browser.

Let’s see how using an Ltouch 7, there are only 2 steps:

Step 1
Install an http server to provide the webpage with measures; in our tests we used Http Server by Tautvydas Andrikys, it is very interesting
because it can support php after the installation of Server for PHP by the same author. Once installed these apks, tap “server address and port” to set
an http port ,default is 8000, you can change but do not use privileged ports (ports below 1024 , see for example ), then choose ip address to answer on each ip assigned to the Ltouch.

Enable php support:

CGI setting -> enable com.esminis.server.php (Server for PHP)

Finally enable start on boot.

Copy webpage index2.html to /mnt/sdcard/htdocs/public :
adb push index2.html /mnt/sdcard/htdocs/public
Copy configuration files for php server php.ini to /mnt/sdcard/www/config :
adb push index2.html /mnt/sdcard/www/config
Copy configuration files for http server: certificate.cert / certificate.key / httpd.conf to: /mnt/sdcard/htdocs/config
adb push certificate.cert /mnt/sdcard/htdocs/config
adb push certificate.key /mnt/sdcard/htdocs/config
adb push http.conf /mnt/sdcard/htdocs/config

Reboot touch.

However you can use any http server.
Enable hotspot in the settings of Ltouch: settings -> more -> portable hotspot , here we can setup wifi parameters : network name and
password, then tap on portable hotspot to enable it

Step 2
install the apk available in the download area; it’s a simple app which uses modbus library by Biemme to read the measure of a temperature
provided by an external device and connected to the rs485 port of the touch

Now using your pc or smartphone, you can connect to the wifi network just created: open a browser and type
in the address bar, note that you must use the port set in the http server in the address, we are using 8000, if you set another value use that
instead of 8000.

Moreover, the duo webpage/application allow us to handle input/output pins handled by Android kernel on the side of Ltouch, the ones provided
by expansion boards are handled with modbus calls and are excluded.

Source codes are available in our download area

Come configurare l’Android Vnc Server

android vnc server from android clientIn questo post vi vorrei parlare della procedura di installazione e configurazione di un componente molto importante e utile: Android Vnc Server. Grazie a questa applicazione riuscirete a controllare da remoto un device Android. Questo tutorial è stato testato con i touch screen Ltouch, ma grazie a delle semplici modifiche è possibile estenderlo a quasi tutti i gli altri device Android.

L’unico prerequisito è di avere un device rooted (i pannelli Ltouch lo sono già). Una conoscenza base del terminale di linux può aiutare a velocizzare la procedura di configurazione. Continue reading

How to configure an Android Vnc Server

android vnc server from android clientIn this post I would like to show you the steps required to set up an Android Vnc Server to remotely control Android devices. This walkthrough has been tested with the Ltouch Android panels, but with simple modifications this tutorial can be used with any other Android devices.

The only requirement for this would be to have a rooted device (the Ltouch is already rooted). A basic knowledge of linux terminal commands could speed up the setup process. Continue reading