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

Материал из Wiren Board
(Новая страница: «<b> Modem operation in CMUX mode is an experimental function and may not work "out of the box". Performance is not guaranteed. </b>»)
 
(Обновление для соответствия новой версии исходной страницы.)
 
(не показано 10 промежуточных версий 1 участника)
Строка 2: Строка 2:
<b> Modem operation in CMUX mode is an experimental function and may not work "out of the box". Performance is not guaranteed. </b>
<b> Modem operation in CMUX mode is an experimental function and may not work "out of the box". Performance is not guaranteed. </b>


he modem supports multiplexing mode - creating virtual ports through which you can simultaneously work with the modem. For example, through one port you can open a PPP session for GPRS, and through another you can receive and send SMS, check the balance, etc.


Модем поддерживает режим мультиплексирования - создание виртуальных портов, через которые можно одновременно работать с модемом.
You need the GSM line discipline to be supportred in the kernel (included as a module in the standard firmware). A special daemon<b> cmux</b> sends the modem into CMUX mode, then creates four virtual ports, /dev/ttyGSM[1-4] . <b>The closure of the demon cmux to close all virtual ports will lead to a kernel panic!</b>
Например через один порт можно открыть сессию PPP для GPRS, а через другой получать и отправлять SMS, проверять баланс и т.д.


Для работы необходима поддержка GSM line discipline в ядре (включена как модуль в стандартной прошивке).
===Daemon cmux===
Специальный демон, <b>cmux</b> отправляет модем в режим CMUX, после чего создаёт четыре виртуальных порта,  /dev/ttyGSM[1-4] .
<b>Закрытие демона cmux до закрытия всех виртуальных портов приведёт к kernel panic!</b>


[https://github.com/contactless/cmux/ Repository]


Original author: [https://github.com/Rtone/cmux]


===Демон cmux===
The daemon is installed by default as "/usr/bin/cmux", available in the cmux package. Download the binary of the daemon [https://github.com/contactless/cmux/releases/tag/0.3 here]


[https://github.com/contactless/cmux/ Репозитарий]
===Example of work===


Оригинальный автор: [https://github.com/Rtone/cmux]
Turn on the modem:
 
Демон установлен по-умолчанию как  "/usr/bin/cmux", доступен в пакете cmux.
Скачать бинарник демона можно [https://github.com/contactless/cmux/releases/tag/0.3 здесь]
 
 
===Пример работы===
 
Включаем модем:
<pre>
<pre>
root@wirenboard:~# wb-gsm on
root@wirenboard:~# wb-gsm on
</pre>
</pre>


Запускаем демон cmux:
Running the cmux daemon:
<pre>
<pre>
root@wirenboard:~# cmux
root@wirenboard:~# cmux
Строка 46: Строка 38:
</pre>
</pre>


Теперь общение с модемом можно производить в любом из каналов /dev/ttyGSMx
Now you can communicate with the modem in any of the channels /dev/ttyGSMx

Текущая версия на 10:25, 6 сентября 2022

Другие языки:

Modem operation in CMUX mode is an experimental function and may not work "out of the box". Performance is not guaranteed.

he modem supports multiplexing mode - creating virtual ports through which you can simultaneously work with the modem. For example, through one port you can open a PPP session for GPRS, and through another you can receive and send SMS, check the balance, etc.

You need the GSM line discipline to be supportred in the kernel (included as a module in the standard firmware). A special daemon cmux sends the modem into CMUX mode, then creates four virtual ports, /dev/ttyGSM[1-4] . The closure of the demon cmux to close all virtual ports will lead to a kernel panic!

Daemon cmux

Repository

Original author: [1]

The daemon is installed by default as "/usr/bin/cmux", available in the cmux package. Download the binary of the daemon here

Example of work

Turn on the modem:

root@wirenboard:~# wb-gsm on

Running the cmux daemon:

root@wirenboard:~# cmux
SERIAL_PORT = /dev/ttyAPP0
AAAT    : AAAT   OK  
AT+IFC=2: AT+IFC=2,2   OK  
AT+GMM  : AT+GMM   SIMCOM_SIM900R    OK  
AT      : AT   OK  
AT+CMUX=: AT+CMUX=0   OK  
Line dicipline set
Created /dev/ttyGSM1
Created /dev/ttyGSM2
Created /dev/ttyGSM3
Created /dev/ttyGSM4
Going to background

Now you can communicate with the modem in any of the channels /dev/ttyGSMx