Results 1 to 11 of 11

Thread: [SCRIPT] Remind missed with calendar note reminding

  1. #1
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Lightbulb [SCRIPT] Remind missed with calendar note reminding

    I was missing reminders for missed calendar alerts like remind_missed.nrx do for missed calls and messages. My updated version adds this functionality and also introduces a completely different code which allows REXX to set any number (up to 8 ) format ids for reminding.

    By default it reminds for six format ids: missed calls, SMS, calendar reminders (if id found), calendar calls (if id found), calendar meetings (if id found), and calendar birthdays (if id found). I guess that the way how the format ids are located is not very portable so the calendar things may not be remindered on other phones than 6110. (Run the script in verbose mode to see how many format ids it finds on your phone.)

    Download my remind_missed.nrx from:
    www.panuworld.net/nuukiaworld/download/nokix/improved


    druidbartek seem to be working this night on NokiX but now I close the computer and stop doing this shit for a while... Happy new year!
    Last edited by nuukiaworld; 03-01-2008 at 10:31 AM. Reason: 8) -> 8 )

  2. #2
    hi

    since I started using 8850 flash file in my 5210 cell phone I put aside reversing the code of 5210 but I want to stay 5210 compatible as far as it is possible

    so I made small update which is compatible with all dct-3 models (except 6210/7110)

    download from link below:
    http://druidbartek.info/remind_missed_1.23.zip

    PS. At sourceforge we included new version of GCC (4.2.2), can be obtained from:
    http://druidbartek.info/GCC_4.2.2_NokiX.zip

    regards,
    Bartek
    Last edited by druidbartek; 04-01-2008 at 12:34 PM.

  3. #3
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Thanks, this update is something that I wanted to see because it was impossible for me to test the other models.

    The code still exits when it founds formats with msg1 = 0x26C and msg1 = 0xC1C, even if no other formats have been found. It is not the cleanest way to end searching as it depends on the order of the format table (calendar-related ids must be before missed call and SMS ids).

    However, I did not quickly invent any better way to detect the end of the formats table. If we could reliably detect the end of the format table, then we can loop through the whole table and collect all matching ids (in any order).

  4. #4
    Quote Originally Posted by nuukiaworld View Post
    It is not the cleanest way to end searching as it depends on the order of the format table (calendar-related ids must be before missed call and SMS ids).
    therefore we are lucky guys
    i tested it with all dct-3 firmwares and only 6210 and 7110 firmwares failure for obvious reason - simply NokiX doesn't support it

    each other firmwares have the calendar ids before sms/missed call

  5. #5
    btw, to be sure I tested in on my all models wchich I own and it work even on 3410

    but the biggest surprise for me was patching the 5210 firmware which includes about 20 calendar ids! so i checked the icons related to ids - everythinh is ok, 5210 is designed to sportsmen and has a lot of sport related stuff inside


    /**********************************************/

    I'm not @ home and i can't check it...
    somewhere in the middle of a standby display functions is a piece of code with format ids count. If we get it we could replace the endless loop with do i=0 to ids_count...
    as simple as that

    /**********************************************/

    another thing - most of all models can receive calendar
    reminders/calls/meetings&birthdays but internally is possible to creat only calendar reminder

    oh and I mess up one thing - as I said 5210 has a lot of calendar format ids so the sms and missed calls will be omitted becouse of 8 ids limit. Fortunatelly it's minor bug and will be fixed soon
    Last edited by druidbartek; 03-01-2008 at 11:42 PM.

  6. #6
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Quote Originally Posted by druidbartek View Post
    oh and I mess up one thing - as I said 5210 has a lot of calendar format ids so the sms and missed calls will be omitted becouse of 8 ids limit. Fortunatelly it's minor bug and will be fixed soon
    Yep, just changing the mask variable type from unsigned char to unsigned int, and the starting value of the loop from 0x80 to 0x8000 will allow up to 32 format ids.

    However, in such case the flags will reserve 4 bytes of RAM and the format_list will take 32 bytes of FLASH in all phones. It is better idea change the masking function so that it starts from mask 0x0001 and shifts left. And stop the scanning when a predefined unused format id is found, e.g. 0xFF.

    It is so hard to say it in words, i'll try to do it by coding soon.

    Edit: Ok, it was not an 10-second trick. I hope you find a good solution. Expanding the format_list and flags variable is the quickest way if you are not afraid of using a few bytes of memories.
    Last edited by nuukiaworld; 04-01-2008 at 07:19 AM. Reason: Laziness

  7. #7
    Quote Originally Posted by nuukiaworld View Post
    Edit: Ok, it was not an 10-second trick. I hope you find a good solution. Expanding the format_list and flags variable is the quickest way if you are not afraid of using a few bytes of memories.
    huh, 5210 has plenty of memory (512KB SRAM ) so I'll check it as soon as posssible...

  8. #8
    from my own observations...
    the calendar format ids occur consecutive...
    we could return to Yaks method of setting flags, eg.:
    Code:
    #define FLG_CALL    1
    #define FLG_SMS     2
    #define FLG_CLND    3
    then we should specific the range of calendar ids and simply check if the given format is calendars one - if yes set the FLG_CLND.

    summarise results:
    • RAM needed space doesn't change (1 byte). +
    • Currently we need 8 bytes to store the format_list. Calendar range will takes 8 bytes(min+max, rexx_uint always takes DWORD ). +
    • Code should be a bit smaller (I'm not shure - I did simply comparision of length Yaks code and yours)


    what do you thuink?

  9. #9
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Quote Originally Posted by druidbartek View Post
    Currently we need 8 bytes to store the format_list. Calendar range will takes 8 bytes(min+max, rexx_uint always takes DWORD ).
    Good idea. To save flash, let's pack all the id information in one DWORD this way (that is effective because DWORD is the smallest object that can be created in flash):

    REXX:
    formats=d2c(format_call)d2c(format_sms)d2c(format_clnd_min)d2c(format_clnd_max)
    create "formats"; formats=rc


    C:
    external struct {
    unsigned char call;
    unsigned char sms;
    unsigned char clnd_min;
    unsigned char clnd_max;
    } formats;


    Actually, SDK documentation decscribes this method for transferring other objects than DWORDs from REXX to C. However, using it for carefully* designed structs can save flash space.

    * As we know (but usually forgot), the order of struct members can affect the struct size (because of align requirements of WORD and DWORD).

    If clnd_max means the first format that is not a calendar format, then setting min == max (eg. 0 and 0) effective disables the calendar reminding (in phones without calendar note support, if any).

    But... What about calendar notes that appear on top of other calendar notes? Could we track them if they all are represented with same flag bit? Or does the phone unset first the existing format and then set the new one (and reset the first one when the latter note is acknowledged by the user)?

    If the behavior is the latter one, then we need only one flag (bit) for all formats (flag meaning: 'some tracked format is currently active').

    Note: Nested formats (if the UI behaves that way, e.g. does not unset the active format_sms when a call is missed but just activates format_call on top of format_sms) can be handled by using single unsigned char variable, which is incremented when a new tracked format is set and decremented when such format is unset. I wonder why Yak did not do it that way.

  10. #10
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Thanks for the new version (in SVN)... but... the HEAD version I downloaded yesterday worked incorrectly if many reminding formats appear on the top of each other! The phone continued reminding even when all missed items were acknowledged...

    The typo was easy to find: FLG_CLND was set to 3, although it should be 4, in order to make all flags independent from each other. Also the use of exclusive-or ( ^= ) to clear flag bits instead of "anding inverted" ( &=~ ) in remove_standby_text() seemed first slightly suspicious. However, each format is set once and removed exactly once, so the exor effectively clears the flag bits, never sets.

    Because the count of format sets and removals seem to match each other, the flags can be replaced with much easier counter: It just counts how many matching formats has been set and if it is non-zero, the reminder is working. After all matching formats are removed, it is zero again and reminding stops. See www.panuworld.net/nuukiaworld/download/nokix/improved for source (and binary compiled with SDKV2).

  11. #11
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Exclamation Yak was right...

    The "counter method" I introduced in the previous post is not good: my 6110 continued to remind me until reboot after I had received two SMS and read them. It seems that the original flag method is the best way.

    I updated my implementation (now 1.26) to use flags like druidbartek's version a few versions ago but used 4 for FLG_CLND, which does not conflict with the other flags. This implementation use still only one common flag value for all calendar alert types, which means that it will fail if the calendar alerts are "stacked" on each other.

    However, if I remember correct, at least 6110 actually removed the previous calendar alert when a new one was shown (and then redisplayed the first one after closing the later one), which is not a problem for this implementation.

    NokiX SF team: Are you planning to do a stable release (or tag) of NokiX soon? I would like to switch to your newest code base but I would like to be sure to start from as stable basis as possible to avoid unnecessary problem with my daily-used phone.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Script] Missed Call Alert
    By spaceimpact33 in forum NokiX
    Replies: 37
    Last Post: 14-09-2005, 03:28 PM
  2. Ringtones from the Nokia Club
    By RosOne in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 22
    Last Post: 09-06-2003, 10:08 AM
  3. some useful stuff concerning communication portable<->pc
    By ||Joe in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 3
    Last Post: 19-05-2003, 01:37 PM
  4. converting bin to *.re help!
    By victor in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 4
    Last Post: 27-08-2002, 05:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •