wb_editors
14 355
правок
(Новая страница: «As a supplementary measure to improve reliability in the presence of two connections, we can offer the use of DNS servers that are independent of the provider, fo…») |
FuzzyBot (обсуждение | вклад) м (FuzzyBot переименовал страницу GSM/GPRS/en в Modem-stretch/en без оставления перенаправления: Часть переводимой страницы GSM/GPRS.) |
||
(не показаны 22 промежуточные версии 2 участников) | |||
Строка 5: | Строка 5: | ||
See the module description for the full list of features: | See the module description for the full list of features: | ||
*3G modem in Wiren Board 5 and Wiren Board 6: [[SIM5300E/en|SIM5300E]] | *3G modem in Wiren Board 5 and Wiren Board 6: [[SIM5300E/en|SIM5300E]] | ||
*2G modem in Wiren Board 4, 5 and 6 : | *2G modem in Wiren Board 4, 5 and 6: SIM800 or [[M660A/en|M660A]]; | ||
*Wiren Board Smart Home 3.5, Wiren Board 4: | *Wiren Board Smart Home 3.5, Wiren Board 4: | ||
[[SIM900R/en|SIM900R]]. | [[SIM900R/en|SIM900R]]. | ||
Строка 186: | Строка 186: | ||
As a supplementary measure to improve reliability in the presence of two connections, we can offer the use of DNS servers that are independent of the provider, for example GoogleDNS (8.8.8, 8.8.4.4) and OpenDNS (208.67.222.222, 208.67.220.220). These servers are used frequently to determine the health of the network channel on a specific interface (ping -c5 -I eth0 8.8.8.8 or ping -c5 -I ppp0 8.8.4.4). | As a supplementary measure to improve reliability in the presence of two connections, we can offer the use of DNS servers that are independent of the provider, for example GoogleDNS (8.8.8, 8.8.4.4) and OpenDNS (208.67.222.222, 208.67.220.220). These servers are used frequently to determine the health of the network channel on a specific interface (ping -c5 -I eth0 8.8.8.8 or ping -c5 -I ppp0 8.8.4.4). | ||
Note that when you deinitialize the ppp0 interface, all created associated with this interface routes will be automatically deleted. | |||
==== | ==== Using GPRS as a backup channel ==== | ||
The easiest way to ensure fault tolerance is to specify two default routes with different metrics, for example: for eth0 interface, specify metric 10: | |||
auto eth0 | auto eth0 | ||
iface eth0 inet dhcp | iface eth0 inet dhcp | ||
Строка 199: | Строка 198: | ||
metric 10 | metric 10 | ||
and for the interface — metric 100: | |||
auto ppp0 | auto ppp0 | ||
iface ppp0 inet ppp | iface ppp0 inet ppp | ||
Строка 208: | Строка 207: | ||
pre-up sleep 10 | pre-up sleep 10 | ||
In this case, if the connection via eth0 is lost (cable disconnection, switch disconnection, etc.), the route via the ppp0 interface becomes the default route. | |||
For more complex cases where the physical connection on the eth0 interface is not lost, it is recommended to use scripts (based on the availability of any network bridging on the Internet through one of the interfaces) that switch the default route. The Internet offers many solutions to this kind of problem, you can choose one of them. | |||
If the controller is normally connected to the Internet via Ethernet or Wi-Fi, and GPRS is to be used only in case of a main channel failure, this mode of operation is called ''failover''. It usually works like this: | |||
# | #Work is organized through the main channel. | ||
# | #The availability of Internet access through the main channel is constantly checked. | ||
# | #In case of problems, a backup connection is started and the default gateway settings are changed. | ||
# | #The main connection is constantly checked, and if the internet access is restored through it, the system returns to work via it, changing the ''default gateway''. | ||
As an example, we specify two instructions for the organization of such a mode of operation: | |||
# http://lstein.github.io/Net-ISP-Balance/ | # http://lstein.github.io/Net-ISP-Balance/ | ||
# https://serverfault.com/questions/360131/ubuntu-failover-from-ethernet-to-adsl-modem-to-usb-3g-dongle?rq=1 | # https://serverfault.com/questions/360131/ubuntu-failover-from-ethernet-to-adsl-modem-to-usb-3g-dongle?rq=1 | ||
Строка 224: | Строка 223: | ||
<span id="низкоуровневая-работа с модулем через at-команды"></span> | <span id="низкоуровневая-работа с модулем через at-команды"></span> | ||
=== | === Low-level work with the module via AT-commands=== | ||
Read the instructions - [[Работа с последовательным портом из Linux/en|Working with a serial port from Linux]]. Note the settings: 115200, 8N2, '''no hardware flow control'''. | |||
For interactive mode: | |||
* | *run '''minicom''' with the following key that creats the job profile to the port (transmission speed, parity, etc.): | ||
<pre> | <pre> | ||
$ minicom -s /dev/ttyGSM | $ minicom -s /dev/ttyGSM | ||
</pre> | </pre> | ||
[[ | [[Файл:Minicom_settings.png|Minicom Settings]] | ||
* | * Go to settings (press ''Ctrl+A'', then ''O''), select ''Serial port setup'', set port ''/dev/ttyGSM'',set speed and parity - ''115200, 8N1'', ''Hardware flow control - No, Software flow control - No'' | ||
* | * Save settings: ''Save setup as _dev_ttyGSM'' | ||
* | * Then run as '''minicom /dev/ttyGSM''' (all settings will be taken from the profile name ''/dev/ttyGSM'' that we previously created) | ||
* | * Your first command should be ''AAAAAAAAAT'' - the module automatically detects the communication speed (see [[Special:MyLanguage/SIM900R|SIM900R]]) | ||
* | * With the second command, simply run ''AT''. You should get the answer '''OK'''. | ||
==== | ==== Command examples ==== | ||
( | (some commands may vary for some modules, see the module documentation for details) | ||
* | * To synchronize the speed of the port (not a real command) | ||
<pre> | <pre> | ||
AAAAAAAAAAAAAT | AAAAAAAAAAAAAT | ||
</pre> | </pre> | ||
* | * All networks list | ||
<pre> | <pre> | ||
AT+COPS=? | AT+COPS=? | ||
</pre> | </pre> | ||
* | * Signal strength (see [http://m2msupport.net/m2msupport/atcsq-signal-quality/ here]) | ||
<pre> | <pre> | ||
AT+CSQ | AT+CSQ | ||
</pre> | </pre> | ||
* | * Dialing +79154816102 | ||
<pre> | <pre> | ||
ATD+79154816102; | ATD+79154816102; | ||
</pre> | </pre> | ||
* | * Set baud rate port to a fixed value 115200 | ||
<pre> | <pre> | ||
AT+IPR=115200 | AT+IPR=115200 | ||
</pre> | </pre> | ||
* | * Request time from the built-in real-time clock (RTC) module | ||
<pre> | <pre> | ||
AT+CCLK? | AT+CCLK? | ||
Строка 274: | Строка 272: | ||
</pre> | </pre> | ||
* | * Get module IMEI-code (xxxxxx is a unique number) | ||
<pre> | <pre> | ||
AT+GSN | AT+GSN | ||
Строка 286: | Строка 284: | ||
=== | ===Multiplexing ports=== | ||
The modem supports multiplexing mode which creates virtual ports,you can simultaneously work with the modem via these ports. For example, one port can be used to open a PPP session for GPRS, another - to receive and send SMS, check the balance, etc. see [[Special:MyLanguage/CMUX|CMUX]] for details. This mode is not supported for 2G modems. | |||