Bastien Nocera | 3 Jul 01:29 2007
Picon

Add "SMS status" reporting for SMS reading (AT driver)

Heya,

Here's a patch to add support for reading the status of a message with
the AT driver. It supports both the "full text" version (used by
Motorola phones, the G20 documentation tells me) and the "short
numerical" version (as used by Nokias in AT mode).

I didn't manage to test it properly on my Nokia in AT mode, as it lies
about the number of SMSes in its different folders.

I'm trying to fix:
http://bugzilla.gnome.org/show_bug.cgi?id=330773
and I noticed that only some Nokia drivers implemented GN_OP_OnSMS or
GN_OP_PollSMS. Would it be interesting to have CNMI support in the
generic AT driver?

Cheers

PS: current gnokii CVS HEAD crashes for me when using the AT driver,
straight after an ATZ. Anyone seeing that?
--

-- 
Bastien Nocera <hadess <at> hadess.net> 
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/gnokii-users
(Continue reading)

Pawel Kot | 3 Jul 10:05 2007
Picon

Re: Add "SMS status" reporting for SMS reading (AT driver)

Hi,

On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> Here's a patch to add support for reading the status of a message with
> the AT driver. It supports both the "full text" version (used by
> Motorola phones, the G20 documentation tells me) and the "short
> numerical" version (as used by Nokias in AT mode).

Given that different models use quotes or not, I would suggest to change:
+		if (strcmp (status, "\"REC UNREAD\"") == 0) {
+			data->raw_sms->status = GN_SMS_Unread;
+		} else if (strcmp (status, "\"REC READ\"") == 0) {
+			data->raw_sms->status = GN_SMS_Read;
+		} else if (strcmp (status, "\"STO UNSENT\"") == 0) {
+			data->raw_sms->status = GN_SMS_Unsent;
+		} else if (strcmp (status, "\"STO SENT\"") == 0) {
+			data->raw_sms->status = GN_SMS_Sent;
into
+		if (strstr(status, "UNREAD")) {
+			data->raw_sms->status = GN_SMS_Unread;
+		} else if (strstr(status, "READ")) {
+			data->raw_sms->status = GN_SMS_Read;
+		} else if (strstr(status, "UNSENT")) {
+			data->raw_sms->status = GN_SMS_Unsent;
+		} else if (strstr(status, "SENT")) {
+			data->raw_sms->status = GN_SMS_Sent;

And is it case sensitive?

> I didn't manage to test it properly on my Nokia in AT mode, as it lies
(Continue reading)

Bastien Nocera | 3 Jul 12:03 2007
Picon

Re: Add

Pawel Kot <gnokii <at> gmail.com> writes:

Hey Pawel,

> On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
<snip>
> And is it case sensitive?

No idea, feel free to add an implementation of strcasestr, for non-GNU systems
to use.
Updated patch at:
http://people.redhat.com/bnocera/gnokii-0.6.16-at-handle-sms-status-2.patch

> > I didn't manage to test it properly on my Nokia in AT mode, as it lies
> > about the number of SMSes in its different folders.
> 
> Well, Nokia AT mode doesn't support folders. :)

Arf. Well, it first reports 20 messages available. Then switching folders
reports 130 ones available.

> > I'm trying to fix:
> > http://bugzilla.gnome.org/show_bug.cgi?id=330773
> 
> But the patch is for the quite different thing...

It's part of it. The bug is that phones using the AT driver can't find new
messages. One reason is that they don't see new messages reported in
GN_OP_GetSMSStatus. The other problem is that they don't report unread messages
as being unread. The provided patch fixes the second, while I worked around the
(Continue reading)

Pawel Kot | 3 Jul 14:05 2007
Picon

Re: Add

Hi,

On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> > On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> <snip>
> > And is it case sensitive?
>
> No idea, feel free to add an implementation of strcasestr, for non-GNU systems
> to use.
> Updated patch at:
> http://people.redhat.com/bnocera/gnokii-0.6.16-at-handle-sms-status-2.patch

Thanks.

> > > I didn't manage to test it properly on my Nokia in AT mode, as it lies
> > > about the number of SMSes in its different folders.
> >
> > Well, Nokia AT mode doesn't support folders. :)
>
> Arf. Well, it first reports 20 messages available. Then switching folders
> reports 130 ones available.

Hm. Need to recheck.

> > > I'm trying to fix:
> > > http://bugzilla.gnome.org/show_bug.cgi?id=330773
> >
> > But the patch is for the quite different thing...
>
> It's part of it. The bug is that phones using the AT driver can't find new
(Continue reading)

Bastien Nocera | 3 Jul 15:37 2007
Picon

Re: Add "SMS status" reporting for SMS reading (AT driver)

On Tue, 2007-07-03 at 14:05 +0200, Pawel Kot wrote:
> Hi,
<snip>
> > > > I didn't manage to test it properly on my Nokia in AT mode, as it lies
> > > > about the number of SMSes in its different folders.
> > >
> > > Well, Nokia AT mode doesn't support folders. :)
> >
> > Arf. Well, it first reports 20 messages available. Then switching folders
> > reports 130 ones available.
> 
> Hm. Need to recheck.

I'm only checking in GN_MT_ME (with the AT driver). But what we do is:
- launch GN_OP_GetSMSStatus with a clean gn_data
- check for messages in GN_MT_ME
- launch GN_OP_GetSMSStatus again (this time, GN_MT_ME is set in
gn_data).

I'm not sure which "default" folder it's reading from the first time.

> > > > I'm trying to fix:
> > > > http://bugzilla.gnome.org/show_bug.cgi?id=330773
> > >
> > > But the patch is for the quite different thing...
> >
> > It's part of it. The bug is that phones using the AT driver can't find new
> > messages. One reason is that they don't see new messages reported in
> > GN_OP_GetSMSStatus. The other problem is that they don't report unread messages
> > as being unread. The provided patch fixes the second, while I worked around the
(Continue reading)

Clemens Fruhwirth | 2 Jul 23:33 2007

[PATCH] atgen.c to parse SMS-SUBMIT PDUs

Here is a patch that allows atgen.c/ReplyGetSMS to parse SMS-SUBMIT
PDUs and correctly parse most first octet bit fields, that were not
parsed at all/or wrongly by the old code.

Also rewrite the function to use a sliding pointer over the parsed
input. I dislike [tmp + offset] idiom.

This is useful if you want to read sms from your outbox.
--
Fruhwirth Clemens - http://clemens.endorphin.org 
Attachment (atgen.patch): application/octet-stream, 6387 bytes
_______________________________________________
gnokii-users mailing list
gnokii-users <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/gnokii-users
Bastien Nocera | 3 Jul 20:06 2007
Picon

GN_OP_OnSMS in nk6510

Heya,

Is there any reason why GN_OP_OnSMS is disabled in the nk6510 driver?

Finally, I want to be notified on calls (and check battery info
regularly) as well, and I can't seem to find a good example of using
both GN_OP_SetCallNotification and GN_OP_OnSMS. Are they exclusive, or
can I set both notifications at once?

Cheers

PS: I subscribed to the list :)
--

-- 
Bastien Nocera <hadess <at> hadess.net> 
Pawel Kot | 3 Jul 21:04 2007
Picon

Re: GN_OP_OnSMS in nk6510

Hi,

On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> Is there any reason why GN_OP_OnSMS is disabled in the nk6510 driver?

Well, there are few possibilities. Either nobody tested it or it didn't work.

> Finally, I want to be notified on calls (and check battery info
> regularly) as well, and I can't seem to find a good example of using
> both GN_OP_SetCallNotification and GN_OP_OnSMS. Are they exclusive, or
> can I set both notifications at once?

You can use both. But the subscription for FBUS are done by
NK6510_Subscribe(). This way phone should send you an unsolicited
frame with an incoming event (of given type).

take care,
pkot
--

-- 
Pawel Kot
Bastien Nocera | 3 Jul 22:04 2007
Picon

Re: GN_OP_OnSMS in nk6510

On Tue, 2007-07-03 at 21:04 +0200, Pawel Kot wrote:
> Hi,
> 
> On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> > Is there any reason why GN_OP_OnSMS is disabled in the nk6510 driver?
> 
> Well, there are few possibilities. Either nobody tested it or it didn't work.
> 
> > Finally, I want to be notified on calls (and check battery info
> > regularly) as well, and I can't seem to find a good example of using
> > both GN_OP_SetCallNotification and GN_OP_OnSMS. Are they exclusive, or
> > can I set both notifications at once?
> 
> You can use both. But the subscription for FBUS are done by
> NK6510_Subscribe(). This way phone should send you an unsolicited
> frame with an incoming event (of given type).

I'm using GN_OP_Subscribe now (in gnokii-sms.c), and after uncommenting
the GN_OP_OnSMS, I get:
Message received: 0x02 / 0x0056
01 84 1d 04 02 55 00 96 55 01 00 4c 04 00 00 70 |      U  U  L   p
70 30 12 10 22 40 55 55 55 03 82 10 01 09 0e d0 | p0  " <at> UUU       
4f 59 2b c8 2e cb e9 55 55 55 82 0c 02 08 07 91 | OY+ .  UUU      
44 87 20 00 30 23 80 20 1c 1f 34 da ed 36 b3 d9 | D   0#    4  6  
6c b5 d8 0c 07 d2 29 d0 ef 3b 28 2c 7e d7 e9 20 | l     )  ;(,~   
3a 3a 4c ff 29 00                               | ::L )           
Received message type 02
Frame of type 0x02 (SMS handling) received!
Unknown subtype of type 0x02 (SMS handling): 0x04
UNHANDLED FRAME RECEIVED
(Continue reading)

Pawel Kot | 3 Jul 22:15 2007
Picon

Re: GN_OP_OnSMS in nk6510

Hi,

On 7/3/07, Bastien Nocera <hadess <at> hadess.net> wrote:
> Unknown subtype of type 0x02 (SMS handling): 0x04
> UNHANDLED FRAME RECEIVED
> request: 0x10 / 0x000b
> 00 01 00 10 06 01 02 0a 14 15 17                |
> reply: 0x02 / 0x0056
> 01 84 1d 04 02 55 00 96 55 01 00 4c 04 00 00 70 |      U  U  L   p
> 70 30 12 10 22 40 55 55 55 03 82 10 01 09 0e d0 | p0  " <at> UUU
> 4f 59 2b c8 2e cb e9 55 55 55 82 0c 02 08 07 91 | OY+ .  UUU
> 44 87 20 00 30 23 80 20 1c 1f 34 da ed 36 b3 d9 | D   0#    4  6
> 6c b5 d8 0c 07 d2 29 d0 ef 3b 28 2c 7e d7 e9 20 | l     )  ;(,~
> 3a 3a 4c ff 29 00                               | ::L )
> Please read Docs/Bugs and send a bug report!
>
> Full log attached. Any ideas?

Are you able to provide --getsms when reading exactly this SMS?

take care,
pkot
--

-- 
Pawel Kot

Gmane