<br><br><div class="gmail_quote">On Sat, Nov 5, 2011 at 12:37 AM, Ajay Garg <span dir="ltr"><<a href="mailto:ajay@sugarlabs.org">ajay@sugarlabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Martin for the reply.<br>
<br>
Ok, so I believe the gsm connection is instantiated when the<br>
gsm-connection-device is detected, which in turn makes use of the<br>
"Modem Configuration" settings.<br>
</blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So,<br>
<br>
a. Disabling "usr/sbin/modem-manager" (where present) will prevent<br>
modem-connection instantiated in a gnome environment. (Already<br>
verified).<br>
<br>
b. I have the following query:<br>
-------------------------------------<br>
<br>
For disabling gsm connection in a sugar-environment, will the<br>
following two customizations suffice ? :<br>
<br>
(i) changing the method from version-1 to version-2 (in<br>
sugar/extensions/deviceicon/network.py)<br>
<br>
=====================================================================================<br>
version-1<br>
========<br>
def _check_device(self, device_op):<br>
nm_device = self._bus.get_object(_NM_SERVICE, device_op)<br>
props = dbus.Interface(nm_device, dbus.PROPERTIES_IFACE)<br>
<br>
device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')<br>
if device_type == network.DEVICE_TYPE_802_3_ETHERNET:<br>
device = WiredDeviceObserver(nm_device, self._tray)<br>
self._devices[device_op] = device<br>
elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:<br>
device = WirelessDeviceObserver(nm_device, self._tray)<br>
self._devices[device_op] = device<br>
elif device_type == network.DEVICE_TYPE_802_11_OLPC_MESH:<br>
device = MeshDeviceObserver(nm_device, self._tray)<br>
self._devices[device_op] = device<br>
elif device_type == network.DEVICE_TYPE_GSM_MODEM:<br>
device = GsmDeviceObserver(nm_device, self._tray)<br>
self._devices[device_op] = device<br>
========================================================================================================<br>
<br>
version-2<br>
=======<br>
def _check_device(self, device_op):<br>
nm_device = self._bus.get_object(_NM_SERVICE, device_op)<br>
props = dbus.Interface(nm_device, dbus.PROPERTIES_IFACE)<br>
<br>
device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')<br>
if device_type == network.DEVICE_TYPE_802_3_ETHERNET:<br>
pass<br>
elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:<br>
device = WirelessDeviceObserver(nm_device, self._tray)<br>
self._devices[device_op] = device<br>
elif device_type == network.DEVICE_TYPE_802_11_OLPC_MESH:<br>
pass<br>
elif device_type == network.DEVICE_TYPE_GSM_MODEM:<br>
pass<br>
=============================================================================================================<br>
<br>
Note : Disabling ETHERNET and OLPC_MESH are not related as such to gsm<br>
configuration; they are not needed for afghanistan-deployments.<br>
<br>
<br>
(ii) Removing "Modem Configuration" from Control Panel (this<br>
will turn redundant, due to (i) above, so it will be good to remove<br>
any<br>
non-useful feature)<br>
<br>
<br>
<br>
(Actually, just allowing wireless-network-device-recognition, and not<br>
recognising other-network-devices-recognition (at the OS level), might<br>
be the cleanest, root-level solution.<br>
udev might help; still figuring out ..)<br>
<br></blockquote><div><br>both (together) will work fine, at least from sugar's GUI pov. Just keep in mind that is a "superficial" solution. <br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Regards,<br>
<font color="#888888">Ajay<br>
</font><div><div></div><div class="h5"><br>
On Sat, Nov 5, 2011 at 2:43 AM, David Farning<br>
<<a href="mailto:dfarning@activitycentral.com">dfarning@activitycentral.com</a>> wrote:<br>
><br>
> On Fri, Nov 4, 2011 at 3:06 PM, Martin Abente<br>
> <<a href="mailto:martin.abente.lahaye@gmail.com">martin.abente.lahaye@gmail.com</a>> wrote:<br>
> > Hello!<br>
> ><br>
> > On Fri, Nov 4, 2011 at 1:10 PM, Ajay Garg <<a href="mailto:ajaygargnsit@gmail.com">ajaygargnsit@gmail.com</a>> wrote:<br>
> >><br>
> >> Hi Martin.<br>
> >><br>
> >> I have been working on making custom changes for Afghanistan deployments;<br>
> >> disabling 3G access is one of them.<br>
> >><br>
> ><br>
> > Interesting, whenever you have the time I would like to hear the reason<br>
> > behind that decision. I am curious :)<br>
><br>
> The build is for a socially conservative region in Afghanistan. The<br>
> teachers in the region want to make sure that all internet<br>
> connectivity happens via a school server.<br>
><br>
> david<br>
><br>
> >> As the resolution for this, the permissions for "usr/sbin/modem-manager"<br>
> >> have been set to 0000, and the change tested on a f14 image with gnome.<br>
> >> Following were the test cases that were carried out :<br>
> >><br>
> >> a. Checked if "ps -aux | grep "modem-manager" gave anything.<br>
> >> It didn't, as expected.<br>
> >> b. Although the option to add a new modem connection via GUI was available<br>
> >> through nm-applet; however no connection could actually be instantiated in<br>
> >> practise, as expected.<br>
> >><br>
> >><br>
> >> I then moved on to checking on dextrose-builds-without-gnome (f11 based)<br>
> >><br>
> >> It was found that there is no "/usr/sbin/modem-manager" on<br>
> >> dextrose-builds-without-gnome (although "usr/sbin/NetworkManager" was<br>
> >> present)<br>
> ><br>
> > I think there was no modem-manager integration back in NM 0.7 (the one<br>
> > available for f11).<br>
> ><br>
> >><br>
> >><br>
> >><br>
> >> So, my queries are ::<br>
> >><br>
> >> 1. How does the "Modem Configuration" feature work in<br>
> >> dextrose-build-without-gnome?<br>
> >> This is important, as additional customization may need to be done to<br>
> >> disable all 3G access attempts.<br>
> >><br>
> ><br>
> > It is because of NM architecture, at least until version 0.7+, the "settings<br>
> > management" service was implemented inside nm-applet, and since there is no<br>
> > nm-applet in sugar, sugar implements its own "settings management" service<br>
> > (take a look at ...source/sugar/src/jarabe/model/network.py to see the<br>
> > implementation).<br>
> ><br>
> > That implementation uses custom gconf values (different from gnome ones) to<br>
> > store the 3G/GSM setting (note that only stores 1 setting for 3G/GSM).<br>
> ><br>
> > Because of what I just explained, there is no relation between gnome and<br>
> > sugar settings (for 3G/GSM and WIFI).<br>
> ><br>
> >> 2. Is it possible to have a (3G) modem connection in<br>
> >> dextrose-build-without-gnome at all?<br>
> >><br>
> ><br>
> > Yes (I just explained why).<br>
> ><br>
> >><br>
> >> Looking forward to a reply.<br>
> >><br>
> ><br>
> > No problem, take a look at <a href="http://wiki.sugarlabs.org/go/Features/3G_Support" target="_blank">http://wiki.sugarlabs.org/go/Features/3G_Support</a><br>
> > for more detailed information.<br>
> ><br>
> >><br>
> >> (Thanks Anish, for pointing me to Martin.)<br>
> >><br>
> >><br>
> >> Regards,<br>
> >> Ajay<br>
> >><br>
> >><br>
> >><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Dextrose mailing list<br>
> > <a href="mailto:Dextrose@lists.sugarlabs.org">Dextrose@lists.sugarlabs.org</a><br>
> > <a href="http://lists.sugarlabs.org/listinfo/dextrose" target="_blank">http://lists.sugarlabs.org/listinfo/dextrose</a><br>
> ><br>
> ><br>
</div></div></blockquote></div><br>