PHP CLI for Siglent SDS2000X-E scopes

Sometimes one wants to access his own scope via the command line without resorting to the firmware downgrades, SHELLCMD and other hoop jumping. Arguably, that's not what the scopes are for, but we're all adults here and can excercise our freedom to use our tools in all imaginable ways.

Since Siglent's update script currently (tested up to 1.1.20R3) simply copies the new contents of the Web root directory and does not remove the existing scripts, one can downgrade to 1.1.17R6 and put the provided PHP script to the WWW root:

mount -o rw,remount /usr/bin/siglent
cp /usr/bin/siglent/usr/mass_storage/U-disk0/cli.php /usr/bin/siglent/config/www
mount -o ro,remount /usr/bin/siglent
Here I assume that the script was downloaded to the root directory of USB flash (if not — adapt the «cp» command to your situation) and the flash is inserted to the scope prior to running these commands.

Next, one just goes to the http://YOUR-SCOPE-IP-OR-NAME/cli.php and runs commands.

Have fun and don't ruin the scope!