gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't --writephonebook on Nokia 6500 classic. --getphonebook works a


From: Peter Valdemar Mørch
Subject: Re: Can't --writephonebook on Nokia 6500 classic. --getphonebook works and write works on an "older" 6510
Date: Mon, 10 Mar 2008 16:24:05 +0100
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Hi!

Thanks for your answer, Pawel!

Pawel Kot gnokii-at-gmail.com |Lists2| wrote:
It is really hard to say. There are lot of experiments that can be done:
 - try to save an entry without a number (but for example with the
other subentry type)
 - change the number type
 - read phonebook entry and compare the frame content with the one you
get with failed write request.
These I would say are the first experiments that should be tried.

I think what is going on is that the 6500 has "First Name" and "Last Name" fields as well as the contact name. The older 6230i I have only has a "Name" field.

I filled out an entry in the 6230i where "Name" is "First Last", no number, and email is address@hidden When I "--getphonebook ME X Y -r" I get this string returned:
First Last;;ME;112;5;8;0;2;address@hidden

On the new 6500 phone, I created two entries, both without number and both with address@hidden as the email. In one I filled in both first and last name, and in the other I only filled out the first name. When I "--getphonebook ME X Y -r" I get these strings returned:

First Last;;ME;1;5;70;0;0;First;71;0;0;Last;8;0;3;address@hidden
First;;ME;2;5;70;0;0;First;8;0;3;address@hidden

This is the packet containing the First and Last Name (first entry above) as recieved from the phone:

Message received: 0x03 / 0x0076
01 5c 00 08 00 01 01 00 00 10 00 05 00 01 00 00 |  \
00 b3 00 00 00 05 08 00 00 18 03 12 00 70 00 40 |  ³           p @
00 6e 00 6a 00 64 00 2e 00 61 00 64 00 00 07 00 |  n j d . a d
00 1c 3f 16 00 46 00 69 00 72 00 73 00 74 00 20 |   ?  F i r s t
00 4c 00 61 00 73 00 74 00 00 2f 00 00 08 00 3f |  L a s t  /    ?
80 01 46 00 00 14 02 0c 00 46 00 69 00 72 00 73 |   F      F i r s
00 74 00 00 00 00 47 00 00 10 01 0a 00 4c 00 61 |  t    G      L a
00 73 00 74 00 00                               |  s t
Received message type 03

Note the 70 (First Name) and 71 (Last Name) fields that are included in the output of the 6500.

Now, when I try to send the first string from the new phone (The one with both First and Last name elements), they are not included in the Message sent to the phone:

Writing phonebook entry First Last...
Message sent: 0x03 / 0x004e
00 01 00 0b 00 01 01 00 00 10 02 05 00 02 00 00 |
00 00 00 00 00 03 07 00 00 1a ff 14 00 46 00 69 |           ÿ  F i
00 72 00 73 00 74 00 20 00 4c 00 61 00 73 00 74 |  r s t   L a s t
1e 00 00 08 ff 06 00 55 08 00 00 16 ff 10 00 70 |     ÿ  U    ÿ  p
00 40 00 6e 00 6a 00 64 00 2e 00 61 00 64       |  @ n j d . a d
Message received: 0x03 / 0x000e
01 5c 00 0c 00 01 0f 00 00 08 3d 00 00 00       |  \        =
Received message type 03
response 0x10 error 0x3d
Write FAILED (Command failed.): memory type: Internal memory, loc: 2, name: First Last, number:
Serial device: closing device

So I found the spot where the FirstName and LastName were excluded:

> diff -wu orig/common/phones/nk6510.c gnokii-0.6.23/common/phones/nk6510.c
--- orig/common/phones/nk6510.c 2008-02-15 10:20:58.000000000 +0100
+++ gnokii-0.6.23/common/phones/nk6510.c 2008-03-10 15:46:11.000000000 +0100
@@ -2472,8 +2472,8 @@
                                case GN_PHONEBOOK_ENTRY_StateProvince:
                                case GN_PHONEBOOK_ENTRY_ZipCode:
                                case GN_PHONEBOOK_ENTRY_Country:
-                               case GN_PHONEBOOK_ENTRY_LastName:
-                               case GN_PHONEBOOK_ENTRY_FirstName:
+                               /* case GN_PHONEBOOK_ENTRY_LastName:
+                               case GN_PHONEBOOK_ENTRY_FirstName: */
                                        break;
                                case GN_PHONEBOOK_ENTRY_Number:
                                        if (j < i)


And tried again:
Writing phonebook entry First Last...
Message sent: 0x03 / 0x006c
00 01 00 0b 00 01 01 00 00 10 02 05 00 03 00 00 |
00 00 00 00 00 05 07 00 00 1a ff 14 00 46 00 69 |           ÿ  F i
00 72 00 73 00 74 00 20 00 4c 00 61 00 73 00 74 |  r s t   L a s t
1e 00 00 08 ff 06 00 55 46 00 00 10 ff 0a 00 46 |     ÿ  UF   ÿ  F
00 69 00 72 00 73 00 74 47 00 00 0e ff 08 00 4c |  i r s tG   ÿ  L
00 61 00 73 00 74 08 00 00 16 ff 10 00 70 00 40 |  a s t    ÿ  p @
00 6e 00 6a 00 64 00 2e 00 61 00 64             |  n j d . a d
Message received: 0x03 / 0x000e
01 5c 00 0c 00 01 0f 00 00 08 3d 00 00 00       |  \        =
Received message type 03
response 0x10 error 0x3d
Write FAILED (Command failed.): memory type: Internal memory, loc: 3, name: First Last, number:
Serial device: closing device

So now the First and Last name are sent. But, alas, same error.

This is the default clause of the switch statement that gets hit when I apply my "patch":

j = strlen(entry->subentries[i].data.number);
j = char_unicode_encode((string + 1), entry->subentries[i].data.number, j);
string[j + 1] = 0;
string[0] = j;
count += PackBlock(entry->subentries[i].entry_type, j + 1, &block, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count);

Does that look sound also for first and last name? Does it sound to you guys like I'm on the right track?

Any new ideas? Do the FirstName and LastName fields need to be "prepared" or massaged somewhere else? Any other ideas?

Also I got it to work with windows under VMWare using the Nokia standard software. Is there any way to sniff the bluetooth communication in this setup to get a hint about what the right PDU looks like?

Peter

--
Peter Valdemar Mørch
http://www.morch.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]