<h2>Modem components<aclass="headerlink"href="#modem-components"title="Permalink to this headline">¶</a></h2>
<sectionid="dce">
<h3>DCE<aclass="headerlink"href="#dce"title="Permalink to this headline">¶</a></h3>
<p>This is the basic operational unit of the esp_modem component, abstracting a specific module in software,
which is basically configured by</p>
<ulclass="simple">
<li><p>the I/O communication media (UART), defined by the DTE configuration</p></li>
<li><p>the specific command library supported by the device model, defined with the module type</p></li>
<li><p>network interface configuration (PPPoS config in lwip)</p></li>
</ul>
<p>After the object is created, the application interaction with the DCE is in</p>
<ulclass="simple">
<li><p>issuing specific commands to the modem</p></li>
<li><p>switching between data and command mode</p></li>
</ul>
</section>
<sectionid="dte">
<h3>DTE<aclass="headerlink"href="#dte"title="Permalink to this headline">¶</a></h3>
<p>Is an abstraction of the physical interface connected to the modem. Current implementation supports only UART</p>
</section>
<sectionid="ppp-netif">
<h3>PPP netif<aclass="headerlink"href="#ppp-netif"title="Permalink to this headline">¶</a></h3>
<p>Is used to attach the specific network interface to a network communication protocol used by the modem. Currently implementation supports only PPPoS protocol.</p>
</section>
<sectionid="module">
<h3>Module<aclass="headerlink"href="#module"title="Permalink to this headline">¶</a></h3>
<p>Abstraction of the specific modem device. Currently the component supports SIM800, BG96, SIM7600.</p>
</section>
</section>
<sectionid="use-cases">
<h2>Use cases<aclass="headerlink"href="#use-cases"title="Permalink to this headline">¶</a></h2>
<p>Users interact with the esp-modem using the DCE’s interface, to basically</p>
<ulclass="simple">
<li><p>Switch between command and data mode to connect to the internet via cellular network.</p></li>
<li><p>Send various commands to the device (e.g. send SMS)</p></li>
</ul>
<p>The applications typically register handlers for network events to receive notification on the network availability and
IP address changes.</p>
<p>Common use cases of the esp-modem are also listed as the examples:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">examples/pppos_client</span></code>– simple client which reads some module properties and switches to the data mode to connect to a public mqtt broker.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">examples/modem_console</span></code>– is an example to exercise all possible module commands in a console application.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">examples/ap_to_pppos</span></code>– this example focuses on the network connectivity of the esp-modem and provides a WiFi AP that forwards packets (and uses NAT) to and from the PPPoS connection.</p></li>
</ul>
</section>
<sectionid="extensibility">
<h2>Extensibility<aclass="headerlink"href="#extensibility"title="Permalink to this headline">¶</a></h2>
<sectionid="cmux">
<h3>CMUX<aclass="headerlink"href="#cmux"title="Permalink to this headline">¶</a></h3>
<p>Implementation of virtual terminals is an experimental feature, which allows users to also issue commands in the data mode,
after creating multiple virtual terminals, designating some of them solely to data mode, others solely to command mode.</p>
</section>
<sectionid="dte-s">
<h3>DTE’s<aclass="headerlink"href="#dte-s"title="Permalink to this headline">¶</a></h3>
<p>Currently we support only UART, but modern modules support other communication interfaces, such as USB, SPI.</p>
</section>
<sectionid="other-devices">
<h3>Other devices<aclass="headerlink"href="#other-devices"title="Permalink to this headline">¶</a></h3>
<p>Adding a new device is a must-have requirement for the esp-modem component. Different modules support different commands,
or some commands might have a different implementation. Adding a new device means to provide a new implementation
as a class derived from <codeclass="docutils literal notranslate"><spanclass="pre">GenericModule</span></code>, where we could add new commands or modify the existing ones.</p>