[Dextrose] How does "Modem Configuration" feature work in dextrose-builds-without-gnome?

Martin Abente martin.abente.lahaye at gmail.com
Sat Nov 5 06:58:34 EDT 2011


On Sat, Nov 5, 2011 at 12:37 AM, Ajay Garg <ajay at sugarlabs.org> wrote:

> Thanks Martin for the reply.
>
> Ok, so I believe the gsm connection is instantiated when the
> gsm-connection-device is detected, which in turn makes use of the
> "Modem Configuration" settings.
>

So,
>
> a. Disabling "usr/sbin/modem-manager" (where present) will prevent
> modem-connection instantiated in a gnome environment. (Already
> verified).
>
> b. I have the following query:
>    -------------------------------------
>
>    For disabling gsm connection in a sugar-environment, will the
> following two customizations suffice ? :
>
>    (i)     changing the method from version-1 to version-2 (in
> sugar/extensions/deviceicon/network.py)
>
>
> =====================================================================================
>    version-1
>   ========
>    def _check_device(self, device_op):
>        nm_device = self._bus.get_object(_NM_SERVICE, device_op)
>        props = dbus.Interface(nm_device, dbus.PROPERTIES_IFACE)
>
>        device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')
>        if device_type == network.DEVICE_TYPE_802_3_ETHERNET:
>            device = WiredDeviceObserver(nm_device, self._tray)
>            self._devices[device_op] = device
>        elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:
>            device = WirelessDeviceObserver(nm_device, self._tray)
>            self._devices[device_op] = device
>        elif device_type == network.DEVICE_TYPE_802_11_OLPC_MESH:
>            device = MeshDeviceObserver(nm_device, self._tray)
>            self._devices[device_op] = device
>        elif device_type == network.DEVICE_TYPE_GSM_MODEM:
>            device = GsmDeviceObserver(nm_device, self._tray)
>            self._devices[device_op] = device
>
>  ========================================================================================================
>
>  version-2
>  =======
>      def _check_device(self, device_op):
>        nm_device = self._bus.get_object(_NM_SERVICE, device_op)
>        props = dbus.Interface(nm_device, dbus.PROPERTIES_IFACE)
>
>        device_type = props.Get(_NM_DEVICE_IFACE, 'DeviceType')
>        if device_type == network.DEVICE_TYPE_802_3_ETHERNET:
>            pass
>        elif device_type == network.DEVICE_TYPE_802_11_WIRELESS:
>            device = WirelessDeviceObserver(nm_device, self._tray)
>            self._devices[device_op] = device
>        elif device_type == network.DEVICE_TYPE_802_11_OLPC_MESH:
>            pass
>        elif device_type == network.DEVICE_TYPE_GSM_MODEM:
>            pass
>
> =============================================================================================================
>
> Note : Disabling ETHERNET and OLPC_MESH are not related as such to gsm
> configuration; they are not needed for afghanistan-deployments.
>
>
>  (ii)      Removing "Modem Configuration" from Control Panel (this
> will turn redundant, due to (i) above, so it will be good to remove
> any
>           non-useful feature)
>
>
>
> (Actually, just allowing wireless-network-device-recognition, and not
> recognising other-network-devices-recognition (at the OS level), might
> be the cleanest, root-level solution.
> udev might help; still figuring out ..)
>
>
both (together) will work fine, at least from sugar's GUI pov. Just keep in
mind that is a "superficial" solution.


> Regards,
> Ajay
>
> On Sat, Nov 5, 2011 at 2:43 AM, David Farning
> <dfarning at activitycentral.com> wrote:
> >
> > On Fri, Nov 4, 2011 at 3:06 PM, Martin Abente
> > <martin.abente.lahaye at gmail.com> wrote:
> > > Hello!
> > >
> > > On Fri, Nov 4, 2011 at 1:10 PM, Ajay Garg <ajaygargnsit at gmail.com>
> wrote:
> > >>
> > >> Hi Martin.
> > >>
> > >> I have been working on making custom changes for Afghanistan
> deployments;
> > >> disabling 3G access is one of them.
> > >>
> > >
> > > Interesting, whenever you have the time I would like to hear the reason
> > > behind that decision. I am curious :)
> >
> > The build is for a socially conservative region in Afghanistan. The
> > teachers in the region want to make sure that all internet
> > connectivity happens via a school server.
> >
> > david
> >
> > >> As the resolution for this, the permissions for
> "usr/sbin/modem-manager"
> > >> have been set to  0000, and the change tested on a f14 image with
> gnome.
> > >> Following were the test cases that were carried out :
> > >>
> > >> a. Checked if "ps -aux | grep "modem-manager" gave anything.
> > >>     It didn't, as expected.
> > >> b. Although the option to add a new modem connection via GUI was
> available
> > >> through nm-applet; however no connection could actually be
> instantiated in
> > >> practise, as expected.
> > >>
> > >>
> > >> I then moved on to checking on dextrose-builds-without-gnome (f11
> based)
> > >>
> > >> It was found that there is no "/usr/sbin/modem-manager" on
> > >> dextrose-builds-without-gnome (although "usr/sbin/NetworkManager" was
> > >> present)
> > >
> > > I think there was no modem-manager integration back in NM 0.7 (the one
> > > available for f11).
> > >
> > >>
> > >>
> > >>
> > >> So, my queries are ::
> > >>
> > >> 1. How does the "Modem Configuration" feature work in
> > >> dextrose-build-without-gnome?
> > >>     This is important, as additional customization may need to be
> done to
> > >> disable all 3G access attempts.
> > >>
> > >
> > > It is because of NM architecture, at least until version 0.7+, the
> "settings
> > > management" service was implemented inside nm-applet, and since there
> is no
> > > nm-applet in sugar, sugar implements its own "settings management"
> service
> > > (take a look at ...source/sugar/src/jarabe/model/network.py to see the
> > > implementation).
> > >
> > > That implementation uses custom gconf values (different from gnome
> ones) to
> > > store the 3G/GSM setting (note that only stores 1 setting for 3G/GSM).
> > >
> > > Because of what I just explained, there is no relation between gnome
> and
> > > sugar settings (for 3G/GSM and WIFI).
> > >
> > >> 2. Is it possible to have a (3G) modem connection in
> > >> dextrose-build-without-gnome at all?
> > >>
> > >
> > > Yes (I just explained why).
> > >
> > >>
> > >> Looking forward to a reply.
> > >>
> > >
> > > No problem, take a look at
> http://wiki.sugarlabs.org/go/Features/3G_Support
> > > for more detailed information.
> > >
> > >>
> > >> (Thanks Anish, for pointing me to Martin.)
> > >>
> > >>
> > >> Regards,
> > >> Ajay
> > >>
> > >>
> > >>
> > >
> > >
> > > _______________________________________________
> > > Dextrose mailing list
> > > Dextrose at lists.sugarlabs.org
> > > http://lists.sugarlabs.org/listinfo/dextrose
> > >
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/dextrose/attachments/20111105/cd2e2eb7/attachment.html>


More information about the Dextrose mailing list