Wirenboard6:InstallingOnTheRemoteSite/en: различия между версиями

Нет описания правки
(Новая страница: «Install on the controller <code>apt-get install autossh</code>. Generate a key pair for the user <code>root</code>: <pre>ssh-keygen </pre> Password is empty.»)
 
(не показано 20 промежуточных версий этого же участника)
Строка 299: Строка 299:
Password is empty.
Password is empty.


Для обслуживания удаленных подключений создаем пользователя <code>remote</code> на сервере с оболочкой <code>/bin/false</code>:  
To maintain remote connections, create a user <code>remote</code> on the server with the shell <code>/bin/false</code>:  


<pre>adduser --home /home/remote --shell /bin/false remote </pre>
<заранее>команду adduser --Home /для дома/дистанционный --оболочку /bin/false в удаленных и </pre>


В файл <code>/home/remote/.ssh/authorized_keys</code> на сервере добавляем созданный на контроллере ключ <code>/root/.ssh/id_rsa.pub</code> с преамбулой
Here, in file <code>/home/remote/.ssh/authorized_keys</code> on the server, we add key created on the controller <code>/root/.ssh/id_rsa.pub</code> with the preamble


<code>no-agent-forwarding,no-X11-forwarding,permitopen="localhost:62001" </code>
<code>no-agent-forwarding,no-X11-forwarding,permitopen="localhost:62001" </code>


что обеспечит дополнительную безопасность сервера при подключении контроллера. Порт 62001 — порт localhost-сервера, на который будет перенаправлен ssh-порт данного контроллера.  
this will provide additional security for the server when the controller is connected. Port 62001 is the port of the localhost server to which the ssh port of this controller will be redirected.  


Первый раз подключаемся с контроллера на сервер вручную:
The first time we connect from the controller to the server manually:
<pre>ssh remote@vpn.mydomain.com </pre>
<pre>ssh remote@vpn.mydomain.com </pre>


На контроллере создаем файл <code>\etc\systemd\system\autossh.service</code> для запуска <code>autossh</code> в качестве сервиса:
On the controller, create a file <code>\etc\systemd\system\autossh.service</code> to run it <code>autossh</code> as a service:




Строка 335: Строка 335:
WantedBy=multi-user.target
WantedBy=multi-user.target
</pre>
</pre>
Включаем сервис а автозагрузку на контроллере:
Add service to autorun on the controller
<pre>systemctl enable autossh.service</pre>
<pre>systemctl enable autossh.service</pre>


После запуска сервиса мы можем подключиться к контроллеру на сервере с помощью команды
After starting the service, we can connect to the controller on the server using the command
<pre>ssh 127.0.0.1 -p 62001</pre>
<pre>ssh 127.0.0.1 -p 62001</pre>




== Передача данных  с контроллера в облако ==
== Data transfer from controller to the cloud ==


Для передачи MQTT-сообщений с контроллера в облачный сервис используется MQTT-бридж, конфигурация которого настраивается на контроллере в файле <code>\mnt\data\etc\mosquitto\conf.d\bridge.conf</code>
To send MQTT messages from the controller to the cloud service, the MQTT bridge is used, the configuration of which is configured on the controller in the file <code>\mnt\data\etc\mosquito\conf.d\bridge.conf</code>
<pre>
<pre>
connection wb_devices_cloud.wb_A7ZO7UCC
connection wb_devices_cloud.wb_A7ZO7UCC
Строка 359: Строка 359:
</pre>
</pre>


Затем выполните команду
Then run the command


<pre>
<pre>
Строка 366: Строка 366:




Если вы хотите передавать данные на несколько серверов одновременно, создайте несколько разделов <code>connection</code>.
If you want to transfer data to multiple servers at the same time, create multiple <code>connection</code>partitions.




== Возможные неполадки GPRS-соединения ==
== Possible GPRS connection problems ==


Возможных причин отсутствия GPRS-подключения может быть несколько.  
There can be several possible reasons for the lack of GPRS connection.  
* Закончился оплаченный лимит трафика.  
* The paid traffic limit has ended.  
* Низкий уровень сигнала, плохой контакт антенны.  
* Low voltage, poor contact to the antenna.  
* СИМ-карты некоторых операторов рассчитаны только на 4G-сети, 3G-подключение установить с ними не получится.  
* SIM cards of some operators are designed only for 4G-network, 3G-connection to install them will not work.  
* Проверьте, правильно ли вставлена СИМ-карта в слот.  
* Check if the SIM card is inserted correctly into the slot.  
* Возможно, СИМ-карта нерабочая.  
* The SIM card may not be working.  
* Ваш тарифный план не предусматривает пакетную передачу данных.  
* Your data plan does not include packet data.  


Прежде чем идти в личный кабинет и звонить провайдеру, можно выполнить ряд простых проверок.
Before you go to your personal account and call the provider, you can perform a number of simple checks.




Запустите команду
Run the command


<pre>gammu networkinfo</pre>
<pre>gammu networkinfo</pre>
Строка 396: Строка 396:
</pre>
</pre>


Важно, что контроллер подключен к пакетной сети передачи данных <pre>(GPRS                 : attached)</pre> и GPRS-соединение установлено.  
It is important that the controller is connected to the packet data network <pre>(GPRS : attached)</pre> and GPRS connection is established.  


После этого оцените уровень сигнала в minicom командой <code>AT+CSQ</code>
Then evaluate the signal strength in minicom with <code>AT+CSQ</code>
Вы получите результат в виде <code>13,99</code>
You will get the result as <code>13.99</code>


Первая цифра показывает мощность сигнала: > 9 — удовлетворительный, > 14 — хороший, > 19 — отличный. Низкие и нестабильные значения CSQ означают, что антенна плохо расположена, неаккуратно подключена, радиообстановка неблагоприятная.
The first digit shows the signal strength: > 9 — satisfactory, > 14 — good, > 19 — excellent. Low and unstable CSQ values mean that the antenna is poorly positioned, carelessly connected, radio placement is unfavorable.


Если обе проверки пройдены, но связи нет, обратитесь к провайдеру (загляните в личный кабинет), можете проверить СИМ-карту в смартфоне.
If both checks are passed, but there is no connection, contact your provider (check in your personal account), you can check the SIM card in your smartphone.
12 063

правки