[Top][All Lists]

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

patch for connection of nokia 3220 via CA-42 cable

From: Burkhard Soehne
Subject: patch for connection of nokia 3220 via CA-42 cable
Date: Wed, 5 Dec 2007 19:08:06 +0100
User-agent: KMail/1.8


with this small patch I can use gnokii on my 3220 without constraint. I've 
analyzed the traffic between Nokia PC Suite and the phone. The very first seq 
id sended from the software is always or-ed with 0x20 (the result is 0x60 
instead of 0x40).
Even if there comes a (rare) seq error (0x80) from the phone while working 
with Nokia PC Suite, next seq from the Suite will be 0x60.
Perhaps this patch will connect a few more phones to gnokii.


--- fbus.c_0.6.22       Sat Nov 24 11:31:02 2007
+++ fbus.c      Wed Dec  5 18:02:40 2007
@@ -581,6 +581,7 @@
        u8 seqnum, frame_buffer[FBUS_CONTENT_MAX_LENGTH + 2];
        u8 nom, lml;            /* number of messages, last message len */
        int i;
+       static int firsttime=1;
        if (!FBUSINST(state))
                return GN_ERR_FAILED;
@@ -588,6 +589,9 @@
        seqnum = 0x40 + FBUSINST(state)->request_sequence_number;
        FBUSINST(state)->request_sequence_number =
            (FBUSINST(state)->request_sequence_number + 1) & 0x07;
+       if (firsttime)  /* for the very first time seq should be or-ed with 
0x20 to 
initialisize seq counter in phone */
+               seqnum|=0x20;
+       firsttime=0;
        if (messagesize > FBUS_CONTENT_MAX_LENGTH) {

reply via email to

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