3 * @author Jan Altensen (Stricted)
4 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
5 * @copyright 2015-2016 Jan Altensen (Stricted)
9 * change dsl connection status
11 * @param string $status
14 public function changeDSLStatus ($status) {
17 $path = 'data/Connect.json';
19 if ($status == 'online' ||
$status == 'offline') {
20 $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash
, 'req_connect' => $status);
21 $data = $this->sendRequest($path, $fields, true);
22 $data = $this->getValues($data['body']);
24 if ($data['status'] == 'ok') {
29 throw new RouterException('unknown status');
36 * change lte connection status
38 * @param string $status
41 public function changeLTEStatus ($status) {
44 /* we have to wait 400ms before we can send the request (idk whats wrong with the router) */
47 $path = 'data/Modules.json';
49 if ($status == '0' ||
$status == '1' ||
$status == 'yes' ||
$status == 'no') {
50 if ($status == 'yes') $status = '1';
51 else if ($status == 'no') $status = '0';
53 $fields = array('csrf_token' => $this->token
, 'use_lte' => $status);
54 $data = $this->sendEncryptedRequest($path, $fields, true);
55 $data = $this->getValues($data['body']);
57 if ($data['status'] == 'ok') {
62 throw new RouterException('unknown status');
73 public function reconnectLte () {
76 /* we have to wait 400ms before we can send the request (idk whats wrong with the router) */
79 $path = 'data/modules.json';
80 $fields = array('csrf_token' => $this->token
, 'lte_reconn' => '1');
81 $data = $this->sendEncryptedRequest($path, $fields, true);
82 $data = $this->getValues($data['body']);
84 if ($data['status'] == 'ok') {