Summary:ASTERISK-14270: [patch] SMS FIX for motorola phones
Reporter:jongerenchaos (jongerenchaos)Labels:
Date Opened:2009-06-04 14:24:51Date Closed:2011-07-26 14:21:16
Versions:Frequency of
Environment:Attachments:( 0) cnmi-test1.diff
Description:The motorola phone (L6) accept only AT+CNMI=3,1,0,0,0

SMS support is broken again for this devices. Maybe that you can add AT+CNMI=3,1,0,0,0. and the currently AT codes (if doesn't accept try or something).
Comments:By: Ronald Chan (loloski) 2009-06-04 14:44:10

i thinks this is related to this


By: jongerenchaos (jongerenchaos) 2009-06-04 15:45:40

Thats correct!But the motorola phones doesnt accept: AT+CNMI=2,1,0,0,0

By: Artem Makhutov (artem) 2009-06-05 04:28:23


ok, maybe we should do a vendor check during initialization?

So we could also use vendor specific commands?

By: Matthew Nicholson (mnicholson) 2009-06-05 11:26:43

That is a good idea.  I don't know how feasible that is though.  I am not sure if there is a way to detect which vendor you are connecting to.  There may be some bluetooth api to do that.

By: Jason Parker (jparker) 2009-06-05 11:56:10

mnicholson, this might be a good excuse to do what we talked about.  An AT+CNMI=? should tell you which modes are supported.

By: Matthew Nicholson (mnicholson) 2009-06-05 12:01:03

Good point.

By: Artem Makhutov (artem) 2009-06-05 12:11:10

There are some AT commands which can be used to find out the model and vendor of the phone, but I don't remember them anymore. I will search for them...

By: Leif Madsen (lmadsen) 2009-06-07 21:29:37

Changed status to feedback while waiting for AT commands that will tell us model and vendor. Thanks!

By: Artem Makhutov (artem) 2009-06-08 12:44:57

Here are some commands to get the info:

ATI - same as ATI0
ATI0 - TA vendor and/or model
ATI1 - TA serial number
ATI2 - TA version
ATI3 - TA name
ATI4 - TA minor SW version
ATI9 - TA plug and play info

AT+GMI - Request TA manufacturer identification
AT+GMM - Request TA model identification
AT+GMR - Request TA revision identification
AT+GSN - Request TA serial number identification

This commands to not work with all phones (using a bluetooth connection).
They also seem to behave a little bit different.

I would use the AT+GMI and AT+GMM commands to get the model and vendor because the ATI commands behaves absolutly different on different phones.

The AT+GMM and AT+GMI also beahaves different on different phones. So I would propose to try figure out the phone model and vendor using this commands and if this does not work fall back to the configuration file and use the vendor/model setting from there.

Here is an example output of this commands:

--- Sony Ericsson K800i ---
Sony Ericsson

Sony Ericsson K800

--- Motorola V600 ---
+GMI: "Motorola CE, Copyright 2000"

+GMM: "GSM900","GSM1800","GSM1900","GSM850","MODEL=V600"

--- Nokia E51 ---





By: Matthew Nicholson (mnicholson) 2009-06-09 13:18:41

Please post what AT+CNMI=? returns for these devices.

By: Artem Makhutov (artem) 2009-06-11 05:54:39

--- Sony Ericsson K800i ---
+CNMI: (2),(0,1,3),(0,2),(0,1),(0)


--- Motorola V600 ---
+CNMI: (0,3),(0-2),(0),(0),(0)

--- Nokia E51 ---

By: Matthew Nicholson (mnicholson) 2009-06-12 09:44:03

Does the Nokia E51 accept the AT+CNMI=3,1,0,0,0 or AT+CNMI=2,1,0,0,0 commands?

By: Artem Makhutov (artem) 2009-06-13 02:36:36

The Nokia phone accepts AT+CNMI=2,1,0,0,0.

By: Matthew Nicholson (mnicholson) 2009-07-20 12:31:28

Please test the patch I just uploaded, let me know if it resolves this issue.

By: Leif Madsen (lmadsen) 2009-08-04 15:19:17

How are you sending these AT commands?

mobile rfcomm  -or-  mobile cusd?  (either?)

By: Artem Makhutov (artem) 2009-08-06 05:12:02

You must use mobile rfcomm to send custom command.

The mobile cusd command is only usefull to query availible money on a prepaid gsm cards and refill them.

By: Matthew Nicholson (mnicholson) 2009-08-06 09:39:37

Have you been able to test my patch?

By: Leif Madsen (lmadsen) 2009-08-06 10:36:43

Artem: ok cool -- I'm not getting anything back from my Nokia E71, even though it seems to connect fine. However I haven't been able to get it to show up as available to send SMS messages, so not sure what I did wrong there (or if it just isn't supported in my phone).

If I find some time I'll try again, but it'd probably be best if you could test this out. Thanks!

By: Matthew Nicholson (mnicholson) 2009-08-06 11:38:42

I have tested it with my blackberry, but it does not support SMS.  The code handles that fine.  Can you post a debug log for what you see from the E71?

By: Leif Madsen (lmadsen) 2009-08-06 11:59:17

I have just enabled all the debugging on the console, and all I can get back it the ERROR on the E71 (the same as note #106134).

Anything else I can do here?

By: Matthew Nicholson (mnicholson) 2009-08-06 12:06:48

enable debug level 1 and the check the /var/logs/asterisk/debug log.

By: Matthew Nicholson (mnicholson) 2009-08-06 12:08:51

With the patch, you should see ERROR then asterisk should send AT+CNMI=2,1,0,0,0 and in theory, that should succeed.

By: Artem Makhutov (artem) 2009-08-06 16:33:26

I was not been able to test the patch. Maybe I can do it tomorrow.

My Nokia E51 does not support SMS in Text-Mode over Bluetooth. I think that it is the same with the E71. I have also read that other E51 do support Text-SMS over Bluetooth to this must be dependent on the firmware.

By: Matthew Nicholson (mnicholson) 2009-08-06 17:21:21

This patch is not intended to address that issue.  This patch is intended to fix support for the Motorola L6.

By: Leif Madsen (lmadsen) 2009-08-07 09:19:47

Agreed. The Nokia issue is a separate issue that should be opened separately (and is potentially considered a feature request).

If you have a chance to try out the Motorola and see if the patch works for that, then we can get this committed. Thanks!

By: Matthew Nicholson (mnicholson) 2009-08-19 15:52:07

Has anyone been able to test this with a motorola L6?

By: Artem Makhutov (artem) 2009-08-20 04:03:59

Sorry, still not had the time to do it. Will do it during this weekend.

By: Matthew Nicholson (mnicholson) 2009-11-25 12:03:54.000-0600

Any updates on this?

By: Artem Makhutov (artem) 2009-11-26 03:32:42.000-0600

Sorry, I don't have the hardware anymore to test this.

By: jongerenchaos (jongerenchaos) 2009-11-26 03:38:56.000-0600

I'll test it. With the first test  i get no SMS option. I'll send the debug log as fast as possible

By: Leif Madsen (lmadsen) 2011-07-26 14:21:08.987-0500

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines