After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733071 - nokia c6 has message capabilities but nmcli reports none
nokia c6 has message capabilities but nmcli reports none
Status: RESOLVED NOTGNOME
Product: NetworkManager
Classification: Platform
Component: ModemManager
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-11 19:56 UTC by steven vanden branden
Modified: 2014-10-15 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log from sending message with xgnokii (15.82 KB, text/plain)
2014-07-13 08:22 UTC, steven vanden branden
Details

Description steven vanden branden 2014-07-11 19:56:13 UTC
My nokia phone c6-00 supports sending messages (only sending as far as i know),
i tested this with a wired connection (ttyACM0) with gnokii.

When i tried it via nmcli and modem-manager-gui it failed.

It seems that modemmanager does not detect and reports that you can send messages with this modem(phone).

any logfilles needed? from gnokii maybe? so you can see what i mean.

working on Archlinux.

modemmanager-1.2.0

ps is this the correct bugtracker now? have searched for the right place, i hope i found it.

how to run the modem-manager in debug mode so i can check where it detects it?

greeting,
Steven
Comment 1 steven vanden branden 2014-07-11 19:57:28 UTC
offcourse i had to be mmcli !
Comment 2 Aleksander Morgado 2014-07-12 08:32:22 UTC
You can use these steps here to get MM debug logs:
http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/

The thing is that the Nokia plugin fully disables SMS support, as we didn't find any device supporting those via AT commands. How does gnokii send the SMS messages?
Comment 3 steven vanden branden 2014-07-13 08:22:06 UTC
Created attachment 280571 [details]
log from sending message with xgnokii
Comment 4 steven vanden branden 2014-07-13 08:25:28 UTC
well a debug log is useless as we know that the plugin just disables it.
Comment 5 Aleksander Morgado 2014-07-13 11:02:29 UTC
(In reply to comment #4)
> well a debug log is useless as we know that the plugin just disables it.

Yeah, that is true.

Could you run the following commands on the TTY using e.g. minicom?

AT+CNMI=?
AT+CPMS=?
AT+CMGF=?
AT+CMGL=4
Comment 6 steven vanden branden 2014-07-13 13:14:16 UTC
AT+CNMI=?
ERROR

AT+CPMS=?
+CPMS: (),(),()

OK

AT+CMGF=?
+CMGF: (0,1)

OK

AT+CMGL=4
ERROR

i dont know if i have to change any setting in minicom except for the device?
Comment 7 Aleksander Morgado 2014-07-15 09:14:55 UTC
(In reply to comment #6)
> AT+CNMI=?
> ERROR
> 
> AT+CPMS=?
> +CPMS: (),(),()
> 
> OK
> 
> AT+CMGF=?
> +CMGF: (0,1)
> 
> OK
> 
> AT+CMGL=4
> ERROR
> 
> i dont know if i have to change any setting in minicom except for the device?

So the modem allows to send SMS, but no reading using standard commands :/ I guess we can try to make an exception for Nokia to handle this case.

Removing NEEDINFO, and leaving it as NEW.
Comment 8 steven vanden branden 2014-07-15 14:14:49 UTC
well i searched around a bit and i noticed that quite some older nokia phone's can send text messages but you cannot receive them on the pc, though it would be handy to type the response messages on a pc instead of the toughscreen or mini keypad of the phone.

so would i be able to test this if  just enable the sms capabilities in the nokia plugin ? or would it error out because it fails to read the messages?

where in the modemmanager does this part of the code resides?

greetings
Comment 9 steven vanden branden 2014-07-15 17:18:27 UTC
i tested the working by adding this to the plugin of nokia: 

static gboolean
modem_check_support_finish (MMIfaceModemMessaging *self, GAsyncResult *res, GError **error){
    return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
}

static void
modem_check_support (MMIfaceModemMessaging *self, GAsyncReadyCallback callback, gpointer user_data){
    /* Only supports sending of messages*/
    mm_base_modem_at_command (MM_BASE_MODEM (self),"+CMGF=0", 3, FALSE,  callback, user_data);
}

static void iface_modem_messaging_init (MMIfaceModemMessaging *iface){
    iface->check_support = modem_check_support;
    iface->check_support_finish = modem_check_support_finish;
}

and i does work to send messages:
the only thing that bugging me to make a fix is the following:

the check_support_finish function is a gboolean that returns true when there are no errors, or false when there are:

should there be added an check_support_sending(_finish) method be added that will be checked for afther the initial one? or should we somehow check for a nokia plugin and skip trough to the latest step of initializing?

i think the first one would make the most sense since then it is confirmed that sending is possible.

just my thoughts
Comment 10 steven vanden branden 2014-07-15 17:43:18 UTC
sorry i have misinterpet the code, only the plugin needs a little change like this to enable the sending of messages:

static gboolean
modem_check_support_finish (MMIfaceModemMessaging *self, GAsyncResult *res,
GError **error){
    return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res),
error);
}

static void
modem_check_support (MMIfaceModemMessaging *self, GAsyncReadyCallback callback,
gpointer user_data){
    /* Only supports sending of messages*/
    mm_base_modem_at_command (MM_BASE_MODEM (self),"+CMGF=0", 3, FALSE, 
callback, user_data);
}

static void iface_modem_messaging_init (MMIfaceModemMessaging *iface){
    //enable the messaging support only for sending messages
    iface->check_support = modem_check_support;
    iface->check_support_finish = modem_check_support_finish;
    iface->load_supported_storages=NULL;
    iface->load_supported_storages_finish=NULL;
}

should i make a patch for the git version? i assume the reason why it is not included is that you dont wont to expose partially messaging capabilities?
Comment 11 Aleksander Morgado 2014-07-16 16:00:26 UTC
Why the CMGF=0 call? The preferred SMS mode is already selected at some other step.

If you want to check whether the modem can send SMS, maybe you can use a command which checks the format of the command you're going to use to actually send the SMS, like:
  AT+CMGS=?
or
  AT+CMGW=?

What do these previous commands return?


Ideally, we should expose in the Messaging interface whether the modem supports sending SMS, receiving SMS or both. Truth be told, this would be the only case in which we don't support receiving.
Comment 12 steven vanden branden 2014-07-16 18:09:00 UTC
ok the purpose was the check if messaging works ill see wich one does provide the info the check if sending works tomorrow when i have acces to the phone.

about the interface yes i thought this would be the case but i dont know the code well enough to add this (without breaking al the programs that dont know about the option).

because its the only one we might just expose the normal interface, then dbus fails to find the storage etc, but with modem-manager-gui at least it does not trouble the program itself or the modem.
Comment 13 steven vanden branden 2014-07-18 13:00:33 UTC
  AT+CMGS=?
gives OK

  AT+CMGW=?
GIVES ERROR.

so making the check function the AT_CMGS=? seems to be the best option.
Comment 14 Aleksander Morgado 2014-10-14 17:08:12 UTC
Moving bugreport to the new ModemManager bugzilla in fd.o; summarized the issue
there as well. Please subscribe to the new bugreport to get new updates.

https://bugs.freedesktop.org/show_bug.cgi?id=85015

Closing this report as NOTGNOME.