Ticket #1591 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

SMS not decoded properly, gets truncated

Reported by: stiell Owned by: openmoko-kernel
Priority: high Milestone:
Component: kernel Version: 2007.2
Severity: major Keywords: HasPatch
Cc: Jeffrey.Ratcliffe@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

Regular, 7-bit encoded SMS messages are not decoded properly when received. Non-ASCII text like æøå shows up as boxes containing hexadecimal values of the characters, GSM-encoded, in the Messages program.

Messages containing the "@" character (encoded as 0x00 in the GSM alphabet) are truncated right before "@" and don't seem to be recoverable.

These problems also appear in /home/root/.evolution/memos/local/system/journal.ics.

The messages seem to follow the alphabet at http://www.dreamfabric.com/sms/default_alphabet.html.

I'm using the 2008-07-06 build of the 2007.2 image, later upgraded via opkg.

Attachments

libgsmd-sms-unpacking-7bit-return-dest-length.patch (765 bytes) - added by stiell 5 years ago.
Return the length of dest (which moko-sms needs to know) instead of src->length (already known).
openmoko-dialer2-sms-7bit-code-properly.patch (12.2 KB) - added by stiell 5 years ago.
Encode and decode 7-bit messages properly.

Change History

comment:1 Changed 5 years ago by roh

  • Owner changed from openmoko-kernel@… to openmoko-kernel

comment:2 Changed 5 years ago by JJR

  • Cc Jeffrey.Ratcliffe@… added

ä is shown as {, ü as ~, also, as posted above, in /home/root/.evolution/memos/local/system/journal.ics

This renders SMS in languages with such characters (e.g. German), rather useless.

comment:3 Changed 5 years ago by stiell

It looks like the problem is in moko-sms.c, function on_incoming_sms. It assumes ALPHABET_DEFAULT means "7-bit ASCII message" instead of the GSM 7 bit default alphabet. Although I'm not a C developer, I would try to make a patch, but I don't have the development environment set up.

comment:4 Changed 5 years ago by stiell

I've got the toolchain set up and am in progress of fixing this bug! The "@" problem is fixed, and I'm now going to make it translate the other characters.

I'm using Unicode's maping document on the GSM 7-bit default alphabet:
http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT

I'll submit a patch once I'm done.

comment:5 Changed 5 years ago by zecke

Once you do please set "HasPatch?" in the keywords so we are seeing your patch and can act on it (http://wiki.openmoko.org/wiki/Bug_Filing_Policy)

Changed 5 years ago by stiell

Return the length of dest (which moko-sms needs to know) instead of src->length (already known).

Changed 5 years ago by stiell

Encode and decode 7-bit messages properly.

comment:6 Changed 5 years ago by stiell

These patches fix both encoding and decoding.
There are some additional fixes:

  • A potential buffer overflow on receiving (old line 292, new line 297)
  • Not being able to send more than 140 UTF-8 bytes even in 7-bit (old line 798, new line 1011)

I'm not able to set "HasPatch" in the keywords, presumably because of [admin-trac https://admin-trac.openmoko.org/trac/ticket/1504 #1504].

comment:7 Changed 5 years ago by tick

  • Keywords HasPatch added

comment:8 Changed 5 years ago by erin_yueh

  • Status changed from new to in_testing

patch committed to revision 4618 and 4619. Thanks a lot for your contributions!

comment:9 Changed 5 years ago by regina_kim

stiell ~!

please check this ticket.

comment:10 Changed 5 years ago by erin_yueh

are you testing with 2007.02 version? it's GTK applications, not free runner image.

comment:11 Changed 5 years ago by erin_yueh

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

i marked it as fixed. after applied this patch, it can display non-ASCII texts correctly!

Note: See TracTickets for help on using tickets.