<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> 于2019年2月26日周二 下午10:55写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 2019-02-26 at 14:23 +0800, 王道之 wrote:<br>
> Hey<br>
> Recently I am doing some test development on ModemManager.<br>
> There is a requirement that add a button on the Ubuntu GUI to set IP<br>
> family(ipv4 or ipv6) of the ModemManager.(Just for test now)<br>
> Here are my questions:<br>
> 1.The Ubuntu desktop GUI button should be a Dbus client? Or how the<br>
> button<br>
> communication with the ModemManager?<br>
<br>
UIs typically communicate with NetworkManager (or if KDE, then KDE's<br>
plasma-nm) and tell NetworkManager to update the connection details.<br>
<br>
NetworkManager is what actually sends configuration to ModemManager<br>
when the connection is requested.<br>
<br>
> 2.After a Modem be created in ModemManager, we can find the menu for<br>
> MM in<br>
> the GUI. Is the menu as a Dbus client connect to NetworkManager or<br>
> just<br>
> connect with ModemManager?<br>
<br>
The menu is a DBus client of NetworkManager and ModemManager. But the<br>
bits that would do v4/v6 interact with NetworkManager.<br>
<br>
> 3.How to judge the GUI setting has sent to ModemManager? I have no<br>
> idea to<br>
> read the what is going on in the ModemManager Dbus session.<br>
<br>
The process that happens is usually this...<br>
<br>
- ModemManager finds a new modem; NetworkManager listens to MM and<br>
creates a new NMDevice object for the modem<br>
- a UI applet listens to NetworkManager for the Device object and then<br>
displays the modem in the menu.<br>
- the UI applet listens to ModemManager for signal and carrier<br>
information.<br>
- when the user wants to connect WWAN the first time, the UI applet<br>
will ask for some additional information like carrier name and plan so<br>
that it can determine which APN to use<br></blockquote><div> </div><div>Hi Dan<div>I have noticed that the UI applet on the Ubuntu 18.04 now always set the IP family as IPV4,</div></div><div>and there is no choice to IPV6 or IPV4V6. As the IPV6 is used more and more widely,maybe the offical menu should consider add this function.</div><div>Quincy </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- when the UI knows what APN to use, it then asks NM to create a new<br>
Connection for the modem (using that APN) and connect the device<br>
- NM then handles connecting WWAN, including asking ModemManager to<br>
start the packet data connection, and then performs IP address<br>
configuration<br>
<br>
If you need to modify the v4/v6 preference, the place to do that would<br>
typically be in the UI that asks for the APN, since that's where the<br>
Connection object details are requested from the user.<br>
<br>
You need to be a bit careful though, since not all modems support v6 or<br>
mixed v4v6 PDP contexts. ModemManager indicates what the modem supports<br>
on D-Bus, so the UI you construct should also query ModemManager for<br>
the modem's capability and only present choices that will actually<br>
succeed.<br>
<br>
Dan<br>
<br>
> I have search the questions on Internet, but not get the<br>
> answer.(Maybe the<br>
> search info not exact) Thanks for your any help information!<br>
> <br>
> Quincy<br>
> _______________________________________________<br>
> ModemManager-devel mailing list<br>
> <a href="mailto:ModemManager-devel@lists.freedesktop.org" target="_blank">ModemManager-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel</a><br>
<br>
</blockquote></div></div>