Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #340 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Support SMS delivery reports

Reported by: PaulFertser Owned by: daniel
Priority: minor Milestone: milestone5.5
Component: framework/ogsmd/sms Version: milestone4
Keywords: Cc:

Description

Preliminary patch to FSO and Zhone (not working) attached.

This won't work reliably because of #339. I recommend to make at least one suspend/resume cycle after starting of Zhone for +CNMI command to take effect.

Change History

Changed 4 years ago by PaulFertser

comment:1 Changed 4 years ago by mickey

  • Status changed from new to assigned
  • Owner changed from mickey to daniel

comment:2 Changed 4 years ago by daniel

  • Component changed from framework/ogsmd to framework/ogsmd/sms

comment:3 Changed 4 years ago by daniel

Okay, ogsmd now supports delivery reports. I applied your patch (the one for frameworkd) and then rewrote quite some of the sms handling code in ogsmd.

Enable status reports per message like this:

org.freesmartphone.GSM.SMS.SendMessage(number, text, {'status-report-request':True})

You'll get an org.freesmartphone.GSM.SMS.IncomingMessageReceipt? signal (usually with property "status-message": "Completed: Delivered") which you *will need to ack*

org.freesmartphone.GSM.SMS.AckMessage("", {})

Unless you Ack IncomingMessage? and IncomingMessageReceipt? signals you will not receive any more. This needs to be done in a timely manner as well (not more than a couple seconds delay)

I have not applied the zhone patch since it wont work like this anymore.

comment:4 Changed 4 years ago by PaulFertser

Daniel, great work! :)

Probably this ticket shouldn't be closed yet, because #228 is not yet closed, Zhone support is missing and behaviour is not documented in specs. And to be honest the reasoning behind this idea of Acking the signals is not obvious to me.

comment:5 Changed 4 years ago by daniel

Yeah, that's why I hesitated to close this. I'm working on updating the spec and then I'll at least close #155. I can't say anything about #228, but the usage of Ack/NackMessage? is not really obvious to me, either. :-)

Unfortunately that is what the GSM spec (GSM 07.05, Chapter 4.6) requires you to do. Every +CMT or +CDS needs to be responded. To cite the spec: "If ME does not get acknowledgement within required time (network timeout), ME should send RP-ERROR to the network. ME/TA shall automatically disable routing to TE by setting both <mt> and <ds> values of +CNMI to zero."

Which means that no +CDS or +CMT will be sent by the modem until we set +CNMI back again. Needless to say that sucks, but I don't really know how we can remedy this situation. Sure, we could automatically reply with +CNMA on +CMT or +CDS, but I'm not sure if that's the right way to go.

comment:6 Changed 4 years ago by daniel

Just to catch up here: Delivery reports don't need to be Acked anymore because that probably doesn't make sense...

I don't think zhone support will be implemented any time soon so I would close this bug regardless.

comment:7 Changed 4 years ago by PaulFertser

  • Status changed from assigned to closed
  • Resolution set to fixed

Sounds nice, closing :)

Note: See TracTickets for help on using tickets.