buggnokii - Bugs: bug #29830, Invalid year in output of getsms...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29830: Invalid year in output of getsms (only on sent/saved items folder)

Submitted by:  Ger-Jan <gerjantd>
Submitted on:  Sun 09 May 2010 08:46:48 AM UTC  
 
Category: gnokiiSeverity: 3 - Normal
Item Group: minor malfunctionStatus: Fixed
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Tue 18 May 2010 03:11:53 PM UTC, comment #11:

As Pawel suggested in IRC, dates in year 2048 can't be represented with 32 bits, for details see http://en.wikipedia.org/wiki/Year_2038_problem

I think we can consider this bug fixed if you can confirm that you correctly read dates from the messages with years 1999, 2000, 2010, 2032.

Daniele Forsi <dforsi>
Project Administrator
Fri 14 May 2010 07:15:03 PM UTC, comment #10:

Did a git pull and applied the patch, set the phone to 2048-05-14 and ran the test as required. Msg appears to be sent 2048-05-14 when viewed on phone, but gnokii --getsms parses the date incorrectly. Output and debug files attached.

(file #20535, file #20536)

Ger-Jan <gerjantd>
Thu 13 May 2010 10:28:59 AM UTC, comment #9:

Make sense. I suggest then to try year 2048. That should have 0x8 as block[2]. Could you please try out this year (if the phone supports it).

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Thu 13 May 2010 09:05:36 AM UTC, comment #8:

Can you test the attached patch?

I think we've been misinterpreting block[2] as length of date instead of high byte of year (both are 7) but it makes little sense to have another length after length in block[1].

For example:
84 0c 07 e0 05 0a 17 23 07 00

    1. 00

Date: 2000-05-10 23:35:07 +0000

84 0c 07 da 05 0a 17 20 35 00

    1. 00

Date: 2010-05-10 23:32:53 +0000

84 0c 07 f0 05 0c 08 28 0c 00

    1. 00

Date: 2032-05-12 08:40:12 +0000

(file #20528)

Daniele Forsi <dforsi>
Project Administrator
Wed 12 May 2010 12:47:52 PM UTC, comment #7:

Test output for 2018, 2032.

(file #20517, file #20518, file #20519, file #20520)

Ger-Jan <gerjantd>
Wed 12 May 2010 12:46:41 PM UTC, comment #6:

No problem. Test output for 1999, 2000, 2018, 2032 attached.

(file #20513, file #20514, file #20515, file #20516)

Ger-Jan <gerjantd>
Tue 11 May 2010 04:08:58 AM UTC, comment #5:

Sorry for bothering you but could you please do the test with 2018+? And 1999? And 2000? The algorithm doesnt look very straightforward to me so I'd like to make sure I get it right? Sorry again if that's a problem.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Mon 10 May 2010 09:49:54 PM UTC, comment #4:

Thanks again Pawel. Installed the missing libs (sudo aptitude install libbluetooth-dev libgnome-bluetooth-dev) and reran ./configure; make. This gave me a working version.

Then tested with the phone date set to today (10 May 2010), and to 10 May 2016.

gnokii --getsms AR 1 -f saved-items-2010.txt 2>errfile-when-getting-saved-items-2010.txt

gnokii --getsms AR 1 -f saved-items-2016.txt 2>errfile-when-getting-saved-items-2016.txt

The first shows the correct date, but as you suggested, on the latter saved message the year is incorrectly parsed as 2000.

Output and debug output attached.

(file #20498, file #20499, file #20500, file #20501)

Ger-Jan <gerjantd>
Mon 10 May 2010 06:39:01 PM UTC, comment #3:

You must have compiled gnokii without bluetooth support (summary of options being compiled is revealed after configure script run). You need *bluetooth-dev packages to make it in.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Mon 10 May 2010 10:02:53 AM UTC, comment #2:

Thanks for your quick fix. I'm happy to run the suggested test but I need some help on getting the new version to run properly.

Exported a git working copy and compiled it (make) without problems. Before running make install, I removed the apt version with sudo aptitude remove gnokii. I ran make install. Before getting the newly installed snapshot version to work I had to add /usr/local/lib to my lib search path and change the location of mgnokiidev to /usr/local/sbin in ~/.gnokiirc.

When I run the snapshot version as follows:

calvin@stammetje:~/Documents/dev/gnokii/gnokii$ ./gnokii --config /home/calvin/.gnokiirc --getsms AR 1 -f saved-items.txt 2>errfile-when-getting-saved-items.txt

it hangs as it doesn't seem to be able to use bluetooth. I get this as my debug output:

calvin@stammetje:~$ cat errfile-when-getting-saved-items.txt
GNOKII Version 0.6.30git
Couldn't read /home/calvin/.config/gnokii/config config file.
Couldn't read /etc/xdg/xdg-gnome/gnokii/config config file.
Couldn't read /etc/xdg/gnokii/config config file.
Unsupported [global] connection value "bluetooth"
Couldn't read /home/calvin/.gnokiirc config file.
Lockfile /var/lock/LCK..ttyS0 is stale. Overriding it...

Any suggestions would be appreciated.

Ger-Jan <gerjantd>
Sun 09 May 2010 06:14:41 PM UTC, comment #1:

Thank you for the report. It should be fixed now in gnokii git version with commit cf56799a4206f0fa87d561d47b58a5f101ccfd7a

That should fix the situation until 2016. At that time I think the current phones will no longer work, however if you would be able to make the test in year 2016 (that is change the date in the phone, save the message, read the message) that would be useful.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Sun 09 May 2010 08:46:48 AM UTC, original submission:

Since Jan 01, 2010, all message dates in the output of getsms on my Nokia 6021's saved items folder show the year 2000 instead of 2010. Up until Dec 31, 2009, the output showed the correct year. The error only occurs when using getsms on saved items (automatically saved sent items). When using getsms on inbox, messages show the correct date. When viewed on the phone itself, saved items show the correct date.

# config file

calvin@stammetje:~$ cat .gnokiirc | grep -v "#"
[global]
port = 00:1A:DC:F6:0F:74
model=6021
initlength = default
connection = bluetooth
use_locking = yes
serial_baudrate = 19200
smsc_timeout = 10
[xgnokii]
allow_breakage = 1
[gnokiid]
bindir = /usr/sbin/
[connect_script]
TELEPHONE = 12345678
[disconnect_script]
[logging]
debug = on
rlpdebug = off
xdebug = off

# Phone model and connection type

Nokia 6021 over Bluetooth

# Gnokii version and binary package

calvin@stammetje:~$ gnokii --version
GNOKII Version 0.6.28
Copyright (C) Hugh Blemings <hugh@blemings.org>, 1999, 2000
Copyright (C) Pavel Janik ml. <Pavel.Janik@suse.cz>, 1999, 2000
Copyright (C) Pavel Machek <pavel@ucw.cz>, 2001
Copyright (C) Pawel Kot <gnokii@gmail.com>, 2001-2009
Copyright (C) BORBELY Zoltan <bozo@andrews.hu>, 2002
Copyright (C) Daniele Forsi <daniele@forsi.it>, 2004-2009
gnokii is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for gnokii. See GPL for details.
Built 09:21:36 Dec 8 2009

calvin@stammetje:~$ apt-cache show gnokii
Package: gnokii
Priority: optional
Section: universe/comm
Installed-Size: 20
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Leo Costela <costela@debian.org>
Architecture: all
Version: 0.6.28.dfsg-1
Depends: gnokii-cli (>= 0.6.28.dfsg-1), xgnokii (>= 0.6.28.dfsg-1), gnokii-common (= 0.6.28.dfsg-1)
Filename: pool/universe/g/gnokii/gnokii_0.6.28.dfsg-1_all.deb
Size: 922
MD5sum: d2326e6e0e524539abbd215aa61d220f
SHA1: 8cac60bf5c8090a051e1b9027b47030c89b65668
SHA256: e4dec0e22468147b243a87f574652fff4fa91878a66c680ac781c6adb81255f7
Description: Datasuite for mobile phone management
Gnokii is a suite of programs that allows communication with mobile phones.
It currently supports many Nokia mobile phones, all AT capable ones as well as
many Symbian based.
For a list of compatible phones, please visit:
http://wiki.gnokii.org
.
This package installs the whole suit of programs.
Homepage: http://gnokii.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

# Debug output

calvin@stammetje:~$ gnokii --getsms AR 1 -f saved-items.txt 2>errfile-when-getting-saved-items.txt
(saved-items.txt and errfile-when-getting-saved-items.txt attached as separate files)

calvin@stammetje:~$ gnokii --getsms IN 1 -f inbox.txt 2>errfile-when-getting-inbox.txt
(inbox.txt and errfile-when-getting-inbox.txt attached as separate files)

Ger-Jan <gerjantd>

 

Attached Files
file #20535:  saved-items-2048.txt added by gerjantd (244B - text/plain)
file #20528:  0001-Treat-block-2-as-high-byte-of-year.patch added by dforsi (1KiB - application/octet-stream)
file #20517:  saved-items-2018.txt added by gerjantd (251B - text/plain)
file #20519:  saved-items-2032.txt added by gerjantd (251B - text/plain)
file #20513:  saved-items-1999.txt added by gerjantd (252B - text/plain)
file #20515:  saved-items-2000.txt added by gerjantd (252B - text/plain)
file #20498:  saved-items-2010.txt added by gerjantd (249B - text/plain)
file #20500:  saved-items-2016.txt added by gerjantd (249B - text/plain)
file #20486:  saved-items.txt added by gerjantd (302B - text/plain - Debug output)
file #20487:  errfile-when-getting-saved-items.txt added by gerjantd (9KiB - text/plain - Debug output)
file #20488:  inbox.txt added by gerjantd (306B - text/plain - Debug output)
file #20489:  errfile-when-getting-inbox.txt added by gerjantd (13KiB - text/plain - Debug output)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dforsi (Updated the item)
  • -unavailable- added by pkot (Posted a comment)
  • -unavailable- added by gerjantd (Submitted the item)
  • -unavailable- added by gerjantd
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 23 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 May 2010 07:15:03 PM UTCgerjantdAttached File-=>Added saved-items-2048.txt, #20535
      Attached File-=>Added errfile-when-getting-saved-items-2048.txt, #20536
    Thu 13 May 2010 09:05:36 AM UTCdforsiAttached File-=>Added 0001-Treat-block-2-as-high-byte-of-year.patch, #20528
    Wed 12 May 2010 12:47:52 PM UTCgerjantdAttached File-=>Added saved-items-2018.txt, #20517
      Attached File-=>Added errfile-when-getting-saved-items-2018.txt, #20518
      Attached File-=>Added saved-items-2032.txt, #20519
      Attached File-=>Added errfile-when-getting-saved-items-2032.txt, #20520
    Wed 12 May 2010 12:46:41 PM UTCgerjantdAttached File-=>Added saved-items-1999.txt, #20513
      Attached File-=>Added errfile-when-getting-saved-items-1999.txt, #20514
      Attached File-=>Added saved-items-2000.txt, #20515
      Attached File-=>Added errfile-when-getting-saved-items-2000.txt, #20516
    Mon 10 May 2010 09:49:54 PM UTCgerjantdAttached File-=>Added saved-items-2010.txt, #20498
      Attached File-=>Added errfile-when-getting-saved-items-2010.txt, #20499
      Attached File-=>Added saved-items-2016.txt, #20500
      Attached File-=>Added errfile-when-getting-saved-items-2016.txt, #20501
    Sun 09 May 2010 06:14:41 PM UTCpkotStatusNone=>Fixed
      Assigned toNone=>pkot
      Open/ClosedOpen=>Closed
    Sun 09 May 2010 08:46:49 AM UTCgerjantdAttached File-=>Added saved-items.txt, #20486
      Attached File-=>Added errfile-when-getting-saved-items.txt, #20487
      Attached File-=>Added inbox.txt, #20488
      Attached File-=>Added errfile-when-getting-inbox.txt, #20489
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1