All of lore.kernel.org
 help / color / mirror / Atom feed
* Support text mode sms send and receive
@ 2010-08-23  9:11 Su, Yong
  2010-08-23  9:25 ` Marcel Holtmann
  2010-08-24 18:51 ` Denis Kenzior
  0 siblings, 2 replies; 4+ messages in thread
From: Su, Yong @ 2010-08-23  9:11 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

Hi, all:
 
Our project used ZTE EVDO modem. But this modem only supports sending
and receiving sms with text mode. 
I have modify oFono gatchat code to support this. But it conflicted with
original gatchat architecture.
Does oFono plan to support text mode sms send&receive?
 
 
Following are some AT commands:
 
Send sms: AT^HCMGS=<da><CR><msg><ctrl-Z>
 
<da>: Receiver phone number
<msg>: value of message content
<ctrl-Z>: end character 0x1A (UCS2 format is 0x001A)
 
Firstly, send ^HCMGS=<da> end of <CR>, TE waits MS response
<CR><LF><greater_than><space> (IRA 13, 10, 62, 32).
Secondly, send message content and end of <ctrl-Z>. 
 
<msg> example, for string "oFono" :
 
chat command is 0x6F, 0x46, 0x6F,0x6E,0x6F, end character is 0x1A  if
<format> is CDMA ASCII
chat command is 0x00, 0x6F, 0x00, 0x46, 0x00, 0x6F,0x00, 0x6E,0x00,
0x6F, end character is 0x00, 0x1A  if <format> is CDMA UCS2 BE
(PS: <format> can be set by another AT command)
 
 
 
Receive sms:  ^HCMT:
<callerID>,<year>,<month>,<day>,<hour>,<minute>,<second>,<lang>,<format>
,<length>,<prt>,<prv>,<type><CR><LF><msg><ctrl-Z><CR><LF>
 
Important tag:
 
<callerID>: Sender phone number
<format>: ASCII or UCS2 BE
<length>: Message content length, not contain <ctrl-Z>
<msg>: value of message content, same as above command
 
 
 
 
 
 
Best Regards
Su Yong
 
 

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 5637 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Support text mode sms send and receive
  2010-08-23  9:11 Support text mode sms send and receive Su, Yong
@ 2010-08-23  9:25 ` Marcel Holtmann
  2010-08-24 18:51 ` Denis Kenzior
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-08-23  9:25 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

Hi Yong,

> Our project used ZTE EVDO modem. But this modem only supports sending
> and receiving sms with text mode. 

That is pretty sad. ZTE modems have the SMS PDU mode for GSM.

> I have modify oFono gatchat code to support this. But it conflicted
> with original gatchat architecture.

Send the patches and Denis can have a look at it.

> Does oFono plan to support text mode sms send&receive?

So for oFono and GSM we were not planning to use text mode all. The only
case where we use text mode is USSD since there is no PDU mode. For all
other pieces we prefer the binary PDU mode. Text mode has caused too
many problems in the past with various hardware that it is just not
worth support it. In the long run it was a lot simple to just write the
PDU SMS support and caused less of a headache.

We need to dig into this. My personal position would be to tell ZTE to
enable PDU mode. Since CDMA will use PDUs over the air as well as GSM.
Or is it sending SMS as text?

Regards

Marcel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Support text mode sms send and receive
  2010-08-23  9:11 Support text mode sms send and receive Su, Yong
  2010-08-23  9:25 ` Marcel Holtmann
@ 2010-08-24 18:51 ` Denis Kenzior
  2010-08-25  2:33   ` Su, Yong
  1 sibling, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2010-08-24 18:51 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]

Hi Su Yong,

On 08/23/2010 04:11 AM, Su, Yong wrote:
> Hi, all:
>  
> Our project used ZTE EVDO modem. But this modem only supports sending
> and receiving sms with text mode.
> I have modify oFono gatchat code to support this. But it conflicted with
> original gatchat architecture.
> Does oFono plan to support text mode sms send&receive?
>  
>  

So oFono explicitly does not want to support text mode.  There are many
reasons for this, but let me list the most important ones:

- oFono core deals with raw PDUs.  That is the universal standard
between AT modems and binary protocol based modems.  This PDU format is
well understood, simple to decode / generate and the utilities in oFono
cover just about every use case.  If you decide to do text mode, then
you will have to:
	- Solve the AT command parser issues
	- Collect all the SMS pieces
	- Encode them back into a PDU

At which point oFono will take the PDU and decode it back to something
that can be used.  This is a MAJOR waste of CPU power and resources.
Changing the driver API here is highly unlikely.

This is not to mention other interaction problems which depend on PDU
mode being available (e.g. Sim Toolkit Send SMS, SMS-PP Data Download, etc)

- Text mode depends on setting or otherwise messing with +CSCS.  Most AT
command based modems do not handle this very gracefully.  Most other
drivers will expect the IRA character set and you will start random
errors.  There's of course a chance that your modem can handle this
properly (perhaps you have a decent multiplexer implementation in which
CSCS affects a single channel only, _and_ you wall-off the SMS part on
that multiplexer channel), but my experience with GSM modems leaves me
extremely skeptical.

- The AT parser for this is essentially a disaster area.  Every modem
has its own quirks for text mode.  It is something that a human being
can understand and work around, but for a library like GAtChat the
complexity will be huge.  Even if you make it work on this particular
modem, it _has_ to work on other modems as well.

Please note that there are no modern GSM telephony stacks that use text
mode SMS for exactly those reasons.  So the question is, can you ask
your modem manufacturer to provide firmware that supports PDU mode?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Support text mode sms send and receive
  2010-08-24 18:51 ` Denis Kenzior
@ 2010-08-25  2:33   ` Su, Yong
  0 siblings, 0 replies; 4+ messages in thread
From: Su, Yong @ 2010-08-25  2:33 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3147 bytes --]


 Hi Denis,

> -----Original Message-----
> From: Denis Kenzior [mailto:denkenz(a)gmail.com] 
> Sent: 2010年8月25日 2:52
> To: ofono(a)ofono.org
> Cc: Su, Yong
> Subject: Re: Support text mode sms send and receive
> 
> Hi Su Yong,
> 
> On 08/23/2010 04:11 AM, Su, Yong wrote:
> > Hi, all:
> >  
> > Our project used ZTE EVDO modem. But this modem only 
> supports sending 
> > and receiving sms with text mode.
> > I have modify oFono gatchat code to support this. But it conflicted 
> > with original gatchat architecture.
> > Does oFono plan to support text mode sms send&receive?
> >  
> >  
> 
> So oFono explicitly does not want to support text mode.  
> There are many reasons for this, but let me list the most 
> important ones:
> 
> - oFono core deals with raw PDUs.  That is the universal 
> standard between AT modems and binary protocol based modems.  
> This PDU format is well understood, simple to decode / 
> generate and the utilities in oFono cover just about every 
> use case.  If you decide to do text mode, then you will have to:
> 	- Solve the AT command parser issues
> 	- Collect all the SMS pieces
> 	- Encode them back into a PDU
> 
> At which point oFono will take the PDU and decode it back to 
> something that can be used.  This is a MAJOR waste of CPU 
> power and resources.
> Changing the driver API here is highly unlikely.
> 
> This is not to mention other interaction problems which 
> depend on PDU mode being available (e.g. Sim Toolkit Send 
> SMS, SMS-PP Data Download, etc)
> 
> - Text mode depends on setting or otherwise messing with 
> +CSCS.  Most AT command based modems do not handle this very 
> gracefully.  Most other drivers will expect the IRA character 
> set and you will start random errors.  There's of course a 
> chance that your modem can handle this properly (perhaps you 
> have a decent multiplexer implementation in which CSCS 
> affects a single channel only, _and_ you wall-off the SMS 
> part on that multiplexer channel), but my experience with GSM 
> modems leaves me extremely skeptical.
> 
> - The AT parser for this is essentially a disaster area.  
> Every modem has its own quirks for text mode.  It is 
> something that a human being can understand and work around, 
> but for a library like GAtChat the complexity will be huge.  
> Even if you make it work on this particular modem, it _has_ 
> to work on other modems as well.
> 
> Please note that there are no modern GSM telephony stacks 
> that use text mode SMS for exactly those reasons.  So the 
> question is, can you ask your modem manufacturer to provide 
> firmware that supports PDU mode?
> 
> Regards,
> -Denis
> 

Thank you very much.  As you said, every modem has its own quirks for text mode, so my patch only works on particular modem, like ZTE EVDO modem or Huaiwei EVDO modem for China Telcom.

We will push ZTE to update modem firmware to support PDU mode, but I am afraid that ZTE can't agree with us.

I have one question. If ZTE doesn't plan to modify, can we modify code without oFono team verified in our project?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-25  2:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23  9:11 Support text mode sms send and receive Su, Yong
2010-08-23  9:25 ` Marcel Holtmann
2010-08-24 18:51 ` Denis Kenzior
2010-08-25  2:33   ` Su, Yong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.