Line 1:
Line 1:
−
==Disk usage error==
−
Check what folder is full:
−
<syntaxhighlight lang="bash">
−
cd /storage
−
du -h -d 1
−
</syntaxhighlight>
−
If folder is <code>/storage/history</code>, then write in screen:
−
<syntaxhighlight lang="c">
−
history delete old
−
</syntaxhighlight>
−
This will delete history of connected devices.
−
==Registering email with no verification==
==Registering email with no verification==
testemail@gmail.com.no-check
testemail@gmail.com.no-check
Line 42:
Line 30:
# Turn on "Edit mode" in the app.
# Turn on "Edit mode" in the app.
# Connect BT device from menu-> setup-> Bluetooth.
# Connect BT device from menu-> setup-> Bluetooth.
−
−
==No modules in lt_setup after reset to factory defaults via web on the new (3.xx) lt_setup==
−
'''You need to be very carefully. If any errors in the file system - it will not boot and you will need to send the device to repair!'''<br>
−
Send command <code>bootrw</code>, then <code>bootro</code>.<br>
−
Edit /boot/config.txt with data from another server, where all works correctly.
−
−
==How to add http-API2 converter==
−
# Create folder /home/html/api_v2.
−
# Put the file (index.php) into the folder.
−
# Enable API in LTsetup
−
# Request example: <nowiki>http://192.168.67.154/api_v2/?{"request":"status-get","addr":"395:14","API-KEY":"08283242722612433"}</nowiki>
−
<div class="mw-collapsible mw-collapsed" style="width:800px">
−
<center>'''index.php'''</center>
−
<div class="mw-collapsible-content">
−
<syntaxhighlight lang="php">
−
<?php
−
−
function api_send($sock, $req) {
−
$r = '-JSON-'.$req;
−
return fwrite($sock, pack('I', strlen($r)) . $r);
−
}
−
−
function api_recv($sock) {
−
$s = fread($sock, 4);
−
$size = unpack("I", $s)[1];
−
$data = fread($sock, $size);
−
if (strpos($data, '"error"')) {
−
die(substr($data, 7));
−
}
−
return substr($data, 7);
−
}
−
−
$headers = apache_request_headers();
−
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
−
$post = file_get_contents('php://input');
−
} else {
−
$post = urldecode($_SERVER['QUERY_STRING']);
−
}
−
−
if (!isset($headers['API-KEY'])) { // API key not found in header, Checking request
−
$req = json_decode($post, true);
−
if (!isset($req['API-KEY'])) die('No API-KEY provided');
−
$key = $req['API-KEY'];
−
unset($req['API-KEY']);
−
$post = json_encode($req);
−
} else $key = $headers['API-KEY'];
−
−
$sock = stream_socket_client('unix:///tmp/sh.socket', $errno, $errst);
−
$auth_req = '{"request": "authorize","key": "'.$key.'"}';
−
api_send($sock, $auth_req);
−
api_recv($sock);
−
api_send($sock, $post);
−
echo api_recv($sock);
−
fclose($sock);
−
</syntaxhighlight>
−
</div>
−
</div>
−
−
==How to debug our App (in case if got error after install(REPO/AppStore/Play Market))==
−
# Install '''"adb"''' on Linux Machine <code>apt install adb</code>
−
# Enable '''"usb DEBUG"''' on phone and allow it (when connecting USB)
−
# run: <code>adb logcat shi3a:D *:S</code>
==How to install Air Raid alarm on old server==
==How to install Air Raid alarm on old server==