This file is indexed.

/usr/share/pyshared/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py is in fso-frameworkd 0.8.5.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env python
"""
The Open GSM Daemon - Python Implementation

(C) 2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
GPLv2 or later

Package: ogsmd.modems.freescale_neptune
Module: modem

Freescale Neptune modem class
"""

__version__ = "0.2.1"
MODULE_NAME = "ogsmd.modems.freescale_neptune"

import mediator

from ogsmd.modems.abstract.modem import AbstractModem

from .channel import CallChannel, MiscChannel, UnsolicitedResponseChannel
from .unsolicited import UnsolicitedResponseDelegate

from ogsmd.gsm.decor import logged
from ogsmd.gsm.channel import AtCommandChannel

import types

#=========================================================================#
class FreescaleNeptune( AbstractModem ):
#=========================================================================#
    """
    Support for the Freescale Neptune embedded modem as found in the Motorola EZX
    Linux Smartphones E680, A780, A910, A1200, A1600, ROKR E2, ROKR E6, and more.

    We have a hardwired multiplexing mode configuration as follows:
    ----------------------------------------------------------------
       DLC     Description          Cmd     Device      Mode
    ----------------------------------------------------------------
        0   Control Channel         -          -
        1   Voice Call & Network    MM      /dev/mux0   Modem
        2   SMS                     MO      /dev/mux1   Phonebook
        3   SMS MT                          /dev/mux2   Phonebook
        4   Phonebook               SIM     /dev/mux3   Phonebook
        5   Misc                            /dev/mux4   Phonebook
        6   CSD / Fax             /dev/mux5 /dev/mux8   Modem
        7   GPRS 1                /dev/mux6 /dev/mux9   Modem
        8   GPRS 2                /dev/mux7 /dev/mux10  Modem
        9   Logger CMD            /dev/mux11
        10  Logger Data           /dev/mux12
        11  Test CMD              /dev/mux13
        12  AGPS                  /dev/mux14
        13  NetMonitor            /dev/mux15
    ----------------------------------------------------------------

    ...
    """

    @logged
    def __init__( self, *args, **kwargs ):
        AbstractModem.__init__( self, *args, **kwargs )

        self._channels[ "UNSOL" ] = UnsolicitedResponseChannel( self.pathfactory, "/dev/mux0", modem=self ) # might also be callchannel, if /dev/mux2 does not want to
        self._channels[ "CALL" ] = CallChannel( self.pathfactory, "/dev/mux2", modem=self )
        #self._channels[ "MISC" ] = MiscChannel( self.pathfactory, "/dev/mux4", modem=self ) # needs to parse unsolicited
        self._channels[ "MISC" ] = MiscChannel( self.pathfactory, "/dev/mux6", modem=self )

        # configure channels
        self._channels["UNSOL"].setDelegate( UnsolicitedResponseDelegate( self._object, mediator ) )

    def numberToPhonebookTuple( self, nstring ):
        """
        Modem violating GSM 07.07 here. It always includes the '+' for international numbers,
        although this should only be encoded via ntype = '145'.
        """
        if type( nstring ) != types.StringType():
            # even though we set +CSCS="UCS2" (modem charset), the name is always encoded in text format, not PDU.
            nstring = nstring.encode( "iso-8859-1" )

        if nstring[0] == '+':
            return nstring, 145
        else:
            return nstring, 129

    def channel( self, category ):
        if category == "CallMediator":
            return self._channels["CALL"]
        elif category == "UnsolicitedMediator":
            return self._channels["UNSOL"]
        else:
            return self._channels["MISC"]

    def pathfactory( self, name ):
        return name