Gammu internals  1.38.0
alcabus.h
Go to the documentation of this file.
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 {
40  /* Incoming packets ID counter */
42  /* Outgoing packets ID counter */
44  /* Expected size of incoming packet */
45  size_t 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. */
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  */
GSM_Protocol_Message Msg
Definition: alcabus.h:39
int gboolean
Definition: gammu-types.h:23
unsigned char next_frame
Definition: alcabus.h:47