As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 753012 - B2G SMS: wrong calculated encoding value for dcs = 0xF?
: B2G SMS: wrong calculated encoding value for dcs = 0xF?
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: ARM Gonk (Firefox OS)
: -- normal (vote)
: mozilla15
Assigned To: Vicamo Yang [:vicamo][:vyang]
: Andrew Overholt [:overholt]
Depends on:
Blocks: b2g-sms
  Show dependency treegraph
Reported: 2012-05-08 11:24 PDT by Vicamo Yang [:vicamo][:vyang]
Modified: 2012-05-15 06:31 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Fix wrong SMS encoding calculated (831 bytes, patch)
2012-05-08 11:29 PDT, Vicamo Yang [:vicamo][:vyang]
philipp: review+
Details | Diff | Splinter Review

Description User image Vicamo Yang [:vicamo][:vyang] 2012-05-08 11:24:19 PDT
See 3GPP TS 23.038 clause 5 "CBS Data Coding Scheme", the encoding shall be 8-bit if bit 2 is on, but code in ril_worker.js does otherwise:

> if (!dcs & 0x04) {
> }

It results the encoding being wrongly set to 7-bit(0) as following:

> I/Gecko   ( 2976): RIL Worker: Got segment no.1 of a multipart SMS:
> {"SMSC":"+14044550009","mti":0,"udhi":64,"sender":"206","recipient":null,"pid":0,
> "epid":0,"dcs":245,"encoding":0,"data":null,"timestamp":1336500242000,"status":null,
> "scts":null,"dt":null,"header":{"length":11,"langIndex":0,"langShiftIndex":0,
> "destinationPort":2948,"originatorPort":9200,"segmentRef":200,"segmentMaxSeq":2,
> "segmentSeq":1},"segmentMaxSeq":2,"receivedSegments":1,"segments":[....]}

This case is reproducible at receiving an MMS notification in T-Mobile network.
Comment 1 User image Vicamo Yang [:vicamo][:vyang] 2012-05-08 11:29:41 PDT
Created attachment 622057 [details] [diff] [review]
Fix wrong SMS encoding calculated
Comment 2 User image Philipp von Weitershausen [:philikon] 2012-05-14 21:13:35 PDT
Comment 3 User image Ed Morley [:emorley] 2012-05-15 06:31:29 PDT

Note You need to log in before you can comment on or make changes to this bug.