CMUX/en

Материал из Wiren Board
Версия от 12:46, 7 июня 2019; RomanKulibaba (обсуждение | вклад) (Новая страница: «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…»)

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

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.

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


Демон cmux

Репозитарий

Оригинальный автор: [1]

Демон установлен по-умолчанию как "/usr/bin/cmux", доступен в пакете cmux. Скачать бинарник демона можно здесь


Пример работы

Включаем модем:

root@wirenboard:~# wb-gsm on

Запускаем демон cmux:

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

Теперь общение с модемом можно производить в любом из каналов /dev/ttyGSMx