Commit Graph
1457 Commits
Author SHA1 Message Date
Aleksander Morgado c636cdb27f base-modem: setup NULL callbacks in unsolicited CREG message handlers
When the port is grabbed, we setup NULL callbacks for all unsolicited
registration message handlers. If we do enable 3GPP registrations
afterwards, we'll set proper callbacks.
2012-03-15 14:14:29 +01:00
Aleksander Morgado d1072bda54 iface-modem: new RegistrationState property, bound to the one in DBus 2012-03-15 14:14:29 +01:00
Aleksander Morgado 68044fb01e iface-modem-3gpp: setup unsolicited registration messages handling during enable 2012-03-15 14:14:29 +01:00
Aleksander Morgado 2f5e8c46a3 at-serial-port: allow overwriting unsolicited message handlers
Existing unsolicited message handlers can be overwritten at any time now. This
allows initializing the port with all possible message handlers configured with
a NULL callback, and then setup the proper handlers when we go on enabling the
different interfaces.
2012-03-15 14:14:29 +01:00
Aleksander Morgado 20f53ec15b broadband-modem: implement CS/PS registration notifications setup 2012-03-15 14:14:29 +01:00
Aleksander Morgado 8f6018d9c6 iface-modem-3gpp: setup CS and PS registrations during enable 2012-03-15 14:14:29 +01:00
Aleksander Morgado 04f10820f3 broadband-modem: setup enabling steps
When the modem is enabled, we'll go one by one enabling all our interfaces.
2012-03-15 14:14:29 +01:00
Aleksander Morgado 73db436f71 iface-modem-3gpp: interface can be enabled
In addition to initializing the interface, to load initial values of all
properties and export the object in DBus, the interface can now also be enabled.
Enabling the 3GPP interface will take care of running the network registration
process.
2012-03-15 14:14:28 +01:00
Aleksander Morgado bd24d0d14c broadband-modem: implement IMEI loading 2012-03-15 14:14:28 +01:00
Aleksander Morgado 27c973b6b4 broadband-modem: implement the Modem 3GPP interface
It will only be initialized and exported in DBus if the modem has 3GPP
capabilities.
2012-03-15 14:14:28 +01:00
Aleksander Morgado c6b69f9a59 iface-modem-3gpp: export DBus interface when properly initialized 2012-03-15 14:14:28 +01:00
Aleksander Morgado 69079ff891 iface-modem-3gpp: load `IMEI' during init 2012-03-15 14:14:28 +01:00
Aleksander Morgado bb625b332a iface-modem-3gpp: setup interface initialization and shutdown 2012-03-15 14:14:28 +01:00
Aleksander Morgado 829b79eff4 iface-modem: complete the result before freeing init context 2012-03-15 14:14:28 +01:00
Aleksander Morgado 78d788d4dc iface-modem: avoid inner async operation during initialization 2012-03-15 14:14:28 +01:00
Aleksander Morgado acc3e3f6da core: always pass open port to interface initializations
When the first AT port is grabbed, modem initialization is launched, using that
specific port. This port is also passed to all interface initialization methods.
2012-03-15 14:14:28 +01:00
Aleksander Morgado 1d495c58e6 iface-modem-3gpp: new interface to handle the Modem 3GPP DBus interface 2012-03-15 14:14:28 +01:00
Aleksander Morgado b9448b83cb iface-modem: simplify interface handling
Interfaces won't have a 'status', just initialize(), enable(), disable() and
shutdown().

Also, shutdown() should never fail. We will take care of cancelling any ongoing
operation afterwards, before calling shutdown().
2012-03-15 14:14:28 +01:00
Aleksander Morgado d2d9251733 broadband-modem: setup initialization of all interfaces 2012-03-15 14:14:28 +01:00
Aleksander Morgado a58f95121a api: rename 3GPP and CDMA interface paths
Elements in a DBus interface name cannot start with a digit, so
"org.freedesktop.ModemManager1.Modem.3gpp" is an invalid interface name.

Renamed here all relevant interfaces so that they have an additional "Modem"
prefix in the element, so we get now:
 "org.freedesktop.ModemManager1.Modem.Modem3gpp"
 "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd"
 "org.freedesktop.ModemManager1.Modem.ModemCdma"

Objects generated with gdbus-codegen maintain the previous names.
2012-03-15 14:14:28 +01:00
Aleksander Morgado 27494eae51 iface-modem: handle Enable() calls 2012-03-15 14:14:28 +01:00
Aleksander Morgado 22bdfdbf8b broadband-modem: disable the Modem iface when disabling the modem 2012-03-15 14:14:28 +01:00
Aleksander Morgado b0a9c6a7ef broadband-modem: enable the Modem iface when enabling the modem 2012-03-15 14:14:27 +01:00
Aleksander Morgado c74c3a5d2e broadband-modem: implement charset loading and setup 2012-03-15 14:14:27 +01:00
Aleksander Morgado ad8fed66fe broadband-modem: implement flow control setup 2012-03-15 14:14:27 +01:00
Aleksander Morgado 00949c4782 broadband-modem: implement modem power-up commands 2012-03-15 14:14:27 +01:00
Aleksander Morgado 491758c266 broadband-modem: implement modem initialization commands 2012-03-15 14:14:27 +01:00
Aleksander Morgado ea7a939201 broadband-modem: override the Current Capabilities property 2012-03-15 14:14:27 +01:00
Aleksander Morgado 8b1515b2a0 iface-modem: close primary port during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado 589c6419d2 iface-modem: send power-down command during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado 5e3ad0fe58 iface-modem: flash primary port during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado f3b6bfeb8f iface-modem: interface can be disabled
The Modem interface can be disabled, going from enabled back to initialized. The
disabling process will include closing the ports opened during the enabling.
2012-03-15 14:14:27 +01:00
Aleksander Morgado 781c1821fd iface-modem: setup modem charset configuration during enable
Load supported charsets, and loop trying to set the best one.
2012-03-15 14:14:27 +01:00
Aleksander Morgado c0d3bd944c iface-modem: send flow control setup commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado 7fa372d118 iface-modem: allow plugins to send custom commands after power-up
Just after powering up the modem, plugins can run additional setup commands
themselves, in a new "after" power-up step.
2012-03-15 14:14:27 +01:00
Aleksander Morgado 0adbd8edad iface-modem: send power-up commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado b948c93e59 iface-modem: send modem initialization commands during enable 2012-03-15 14:14:26 +01:00
Aleksander Morgado b0a1eccd54 iface-modem: flash primary port during enable 2012-03-15 14:14:26 +01:00
Aleksander Morgado fc19509e4f iface-modem: during init, fall down to next states directly 2012-03-15 14:14:26 +01:00
Aleksander Morgado 8327b6af30 iface-modem: interface can be enabled
In addition to initializing the interface, to load initial values of all
properties and export the object in DBus, the interface can now also be enabled.
Enabling the Modem interface will take care of running the modem enabling
process (flashing port, power up and such).
2012-03-15 14:14:26 +01:00
Aleksander Morgado f049dbb217 iface-modem: emit StateChanged signal when modem state changes 2012-03-15 14:14:26 +01:00
Aleksander Morgado 7b59a80912 iface-modem: load CurrentCapabilities first
With AT+GCAP we load the currently available capabilities, and we store them
in a new "iface-modem-capabilities" property in the MMIfaceModem interface. This
property is bound to the "current-capabilities" property in the MmGdbusModem
skeleton object, so no need to update both when it changes.

ModemCapabilities depend directly on whether the modem can load firmware without
reflashing the device. Currently, just set it equal to CurrentCapabilities.
2012-03-15 14:14:26 +01:00
Aleksander Morgado ec1d94044f sim: during init, fall down to next states directly 2012-03-15 14:14:26 +01:00
Aleksander Morgado 1257ecd136 cli: start to port Modem actions to use the new libmm-glib 2012-03-15 14:14:26 +01:00
Aleksander Morgado 9ae68b3fee cli: add command to reset the modem to factory state 2012-03-15 14:14:26 +01:00
Aleksander Morgado 6221e4f76b cli: add command to reset the modem 2012-03-15 14:14:26 +01:00
Aleksander Morgado e341c7ff49 cli: use new modem enabling and disabling API 2012-03-15 14:14:26 +01:00
Aleksander Morgado ea5f81b804 cli: add commands to enable and disable the modem 2012-03-15 14:14:26 +01:00
Aleksander Morgado 5de1ae6a4f cli: add command to monitor modem state 2012-03-15 14:14:26 +01:00
Aleksander Morgado 9a6bb0bb19 cli: include status information properties in the info command output 2012-03-15 14:14:26 +01:00