Labels

Android (1) bash (2) boost (2) C (34) C++ (2) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) Docker (2) Dreamweaver (2) Eclipse (3) fail2ban (4) git (5) GitHub (4) Hacking (3) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (33) javascript (3) Linux (169) Mac (20) Machine Learning (1) mySQL (49) Netbeans (5) Networking (1) Nexus (1) OpenVMS (6) Oracle (1) Pandas (3) php (16) Postgresql (8) Python (9) raid (1) RedHat (14) Samba (2) Slackware (48) SQL (14) svn (1) tar (1) ThinkPad (1) Virtualbox (3) Visual Basic (1) Visual Studio (1) Windows (2)

Friday, 14 February 2025

Remote Monitor

Remote Monitor v:1.9

Proton-5 v:1.2


BACKGROUND

TODO: A very brief blip on the background.

PRINCIPLE

TODO: Principle of operation, add schematic.

REMOTE DEVICE

HARDWARE

The device we're currently using is a Raspberry Pi Pico W For details of the pinout, see here


SOFTWARE

TODO: Detail the device software with link to repo.


DEVELPOMENT

The Raspberry pi was coded in Python using Thonny, due to the ease of which it supports the Raspberry Pi, the codebase can be found here.

THEORY OF SOFTWARE OPERATION

TODO

OPERATION

AP Mode

On initial power up the device will likely be un-configured and as such will boot into AP mode, allowing the wifi network to be configured. To do this, simply search for the device's wifi network named Resource Monitor using your mobile device and connect using the password 12345678 (if required).

Configured Mode, Normal Operation 

TODO: Describe normal operation...
 
If the device fails to connect to a configured wifi network,  you will also have the same opportunity as per Reset  (the LED illuminates for approximately 10 seconds), allowing you to reset the configuration and enter AP Mode without the need to power down the device. See Reset for more information. 

Reset

If a previous wifi network has been configured, the method to reset it is as follows:
Power on the device and the LED should illuminate continuously for a period of approximately 10 seconds (see LED Status). During this time, you can bridge pins 19 and 20 as shown in Fig.1 which will enter the device into AP Mode as discussed above;

Fig.1





TODO: Add access point image.

Once the device has been correctly configured and connected to your designated wifi network, navigating to the appropriate IP address and port should display a page similar to the below;

Fig.2 Normal Operation

LED Status

The LED on the device will indicate the status of the device as below:
 
startup - blink twice, solid for 10 sec then flash 3 times.
check for reset - The LED will remain on for 10 seconds.
Configuration mode - The LED will flash twice every 5 seconds.
Attempting to connect to wifi - The LED will flash quickly every 3 seconds.
Connected to wifi - The led will flash once ever 10 sec, this is generally the normal operation.

ADVANCED

To monitor the device, connect using a usb cable and connect using PuTTY or using screen device baud, for example:  /dev/cu.usbmodem1401 115200
If you do this after powering the device, you may be able to see some useful information or diagnostic, however in general use, there is no such need to do this.

In addition, when a client connects, be it the Proton-5 client or from a web browser, the following line will be printed to the console:

0:0 - Client 1/2 connected from ('10.28.12.69', 54100)

What this tells us is that there has been 0 wifi restarts and 0 web server restarts since power on, as you can see it also tells us which ip address and port has made the connection. 



CLIENT

SOFTWARE

TODO: Detail the client and device software with link to repo.


DEVELPOMENT

The client, known as Proton-5 was coded in Java using Netbeans, mostly on an Apple Mac. The codebase can be found here

Where possible it was intended to use Java 7, but certain aspects of the requirements were more suited to Java 8

The following libraries are also required:
MySql Connector (mysql-connector-j-8.1.0.jar and mysql-connector-java-5.1.49.jar).

The above is packaged into an Install.jar file containing Launcher.jar, Autoexec.jar and launching scripts to suit Windows, Mac and Linux. (.bat and .sh). 

THEORY OF SOFTWARE OPERATION

TODO

INSTALLATION

The Java Runtime needs to be installed, this can be found here.

It is also advised to create a directory and to place the Install.jar file inside this directory, this way all components relating to the application of kept in the one place.

Windows based System - on a windows system the installation can be carried out by either double clicking on the Install.jar or by running java -jar Install.jar from the command line, this will extract all the necessary files and libraries.

Linux, Unix or Mac based System - on any of these systems the installation should be carried out by running java -jar Install.jar from the command line, this will extract all the necessary files and libraries.

Once the above has been done and the files extracted, inside your new directory, should look something like this;

Fig.x

Launching of the application is done via the Launcher.jar file or more conveniently, with the Launch.bat or Launch.sh scripts, these are the only ways to correctly launch the application. It is recommended that a shortcut to either Launch.bat or Launch.sh be created for convenience.

OPERATION

The correct way to launch the application is with the startup scripts as detailed above (Launch.bat or Launch.sh).
Note: The Proton-5 application can also be launched directly from the command line with java -jar Launcher.jar ptoton-5 but use of the scripts is highly recommended. It is not possibly to run Proton-5.jar directly. If an incorrect startup has been attempted, GateKeeper will prevent the application from launching and the following notice will be displayed. 

Fig.x




A correct launch from the command line should like something like the below;

Fig.x

Once correctly launched the main application windows is as below;

TODO Add image of main display.


RESOURCES


Thonny

MicroPython

Netbeans

Oracle Java Runtime



No comments:

Post a Comment

Note: only a member of this blog may post a comment.