One StateMachine for both protocol types


Marcel Holtmann (marcel@rvs.uni-bielefeld.de)
Tue, 16 Nov 1999 17:48:43 +0100


Hi,

today I hacked a little bit of receiving messages from phone. I think we
merge some parts of the diffrent fbus-* codes. First I think the serial
handling can be done in a diffrent file and used by both. Second we can
construct a state machine which can handle both messages, so maybe
gnokii can chose the protocol version and the types by itself and the
user has only to plugin the phone.

First - this is only theoretical and I can not test it. I have only a
Nokia 6110 and the original cable. Here is my question: Will someone
sell me his dau-4f and/or a 3110/8110 so I can do coding between the
diffrent protocols (my second phone is only a 1611 with a dau-4s and I
think it would not work with a dau-4f cable, but has someone tested
it?).

Second - Choosing the protocol depending on the id byte.

Incoming messages from 38xx phones differs in the first byte.
0x03 means data/fax
0x04 means nokia messages

And messages form 61xx phones differs also in the first byte
0x1c means messages over Ir
0x1e means messages over dau-9p (fbus) cable
0x1f means messages over dau-9p (mbus) cable

As every one can see, there are 5 diffrent id bytes on which the state
machine can decide to go in the 38xx part or 61xx part.

Sending a message is the same. We only wrap some other bytes around the
message. It like to display a message like this:

typedef struct {
  u8 identifier;
  u8 *data;
  u16 length;
} NOK_Message;

Greetings

Marcel




WAP-gateway IP: 79.186.132.242
Port: 9201

Русский
Powered by COMPPAG 0.50
2022-2024 © Compys S&N Systems