author | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
commit | 88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22 (patch) (unidiff) | |
tree | 6331418973714243beb674abc87692277b83869d /gammu/emb/common/protocol/alcatel/alcabus.h | |
parent | ef8a09ce74ad3f0a51484d03fdf009bd5b3677bf (diff) | |
download | kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.zip kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.gz kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.bz2 |
Initial revision
Diffstat (limited to 'gammu/emb/common/protocol/alcatel/alcabus.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/protocol/alcatel/alcabus.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/gammu/emb/common/protocol/alcatel/alcabus.h b/gammu/emb/common/protocol/alcatel/alcabus.h new file mode 100644 index 0000000..3b9b44e --- a/dev/null +++ b/gammu/emb/common/protocol/alcatel/alcabus.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* (c) 2002-2003 by Michal Cihar */ | ||
2 | /* | ||
3 | * Low level functions for communication with Alcatel One Touch phones. | ||
4 | * | ||
5 | * This code implements the protocol used for synchronisation with PC. | ||
6 | */ | ||
7 | |||
8 | #ifndef alcabus_h | ||
9 | #define alcabus_h | ||
10 | |||
11 | #include "../protocol.h" | ||
12 | |||
13 | #define ALCATEL_HEADER 0x7E | ||
14 | |||
15 | /* packet types: */ | ||
16 | /* used for starting binary connection (must be preceeded by | ||
17 | * AT+CPROT=16,"V1.0",16 and phone should response to it by CONNECT_ACK) | ||
18 | */ | ||
19 | #define ALCATEL_CONNECT 0x0A | ||
20 | /* received when connect suceeded */ | ||
21 | #define ALCATEL_CONNECT_ACK 0x0C | ||
22 | /* used for stopping binary connection */ | ||
23 | #define ALCATEL_DISCONNECT 0x0D | ||
24 | /* received when binnary connection ends */ | ||
25 | #define ALCATEL_DISCONNECT_ACK 0x0E | ||
26 | /* some control ack, I really don't know what should it do, so currently it | ||
27 | * is just ignored. It comes time to time, and communication continues OK also | ||
28 | * if no reply was made. */ | ||
29 | #define ALCATEL_CONTROL 0x0F | ||
30 | /* sending/recieving data */ | ||
31 | #define ALCATEL_DATA 0x02 | ||
32 | /* acknowledge to data */ | ||
33 | #define ALCATEL_ACK 0x06 | ||
34 | |||
35 | /* Maximal value for packet counter */ | ||
36 | #define ALCATEL_MAX_COUNTER 0x3D | ||
37 | |||
38 | typedef struct { | ||
39 | GSM_Protocol_Message Msg; | ||
40 | /* Incoming packets ID counter */ | ||
41 | int in_counter; | ||
42 | /* Outgoing packets ID counter */ | ||
43 | int out_counter; | ||
44 | /* Expected size of incoming packet */ | ||
45 | int expected_size; | ||
46 | /* What is type of frame we expect next */ | ||
47 | unsigned char next_frame; | ||
48 | /* State of mobile, if we expect something (generally some ack) we set | ||
49 | * this to true and no other action can be performed until it is false. */ | ||
50 | bool busy; | ||
51 | } GSM_Protocol_ALCABUSData; | ||
52 | |||
53 | #ifndef GSM_USED_SERIALDEVICE | ||
54 | # define GSM_USED_SERIALDEVICE | ||
55 | #endif | ||
56 | |||
57 | #endif | ||
58 | |||
59 | /* How should editor hadle tabs in this file? Add editor commands here. | ||
60 | * vim: noexpandtab sw=8 ts=8 sts=8: | ||
61 | */ | ||