CMUX/en: различия между версиями
FuzzyBot (обсуждение | вклад) (Обновление для соответствия новой версии исходной страницы.) |
(Новая страница: «Now you can communicate with the modem in any of the channels /dev/ttyGSMx») |
||
Строка 1: | Строка 1: | ||
<languages/> | <languages/> | ||
<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. | 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> | 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> | ||
===Daemon cmux=== | ===Daemon cmux=== | ||
Строка 13: | Строка 16: | ||
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] | 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] | ||
===Example of work=== | ===Example of work=== |
Версия 13:02, 7 июня 2019
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
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