7 #include "../../gsmstate.h" 9 #if defined(GSM_ENABLE_ALCABUS) 15 #include "../../gsmcomon.h" 21 unsigned char buffer[1024];
24 int i = 0, checksum = 0;
26 if ((type == 0) && (len == 0))
return ERR_NONE;
53 memcpy(buffer+5, data, len);
66 smprintf(s,
"WARNING: Wanted to send some unknown packet (%02X)\n", type);
71 for (i=0; i<size; i++) checksum ^= buffer[i];
73 buffer[size] = checksum;
79 while (sent != size ) {
122 smprintf(s,
"WARNING: Expecting alcatel packet type (%02X) but got (%02X)\n", d->
next_frame, rx_char);
143 smprintf(s,
"WARNING: Something went wrong, unknown packet received (%02X)\n", rx_char);
149 smprintf(s,
"WARNING: Unexpected packet number, ignoring (expected %02X, received %02X)\n", d->
in_counter, rx_char);
170 smprintf(s,
"WARNING: Ignoring incorrect packet checksum!\n");
237 smprintf(s,
"Initializing binary mode\n");
244 smprintf(s,
"Closing binary mode\n");
249 ALCABUS_WriteMessage,
250 ALCABUS_StateMachine,
void GSM_DumpMessageBinary(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type)
void DumpMessage(GSM_Debug_Info *d, const unsigned char *message, const size_t messagesize)
struct GSM_Protocol::@1 Data
#define ALCATEL_DISCONNECT_ACK
int GSM_ReadDevice(GSM_StateMachine *s, gboolean waitforreply)
int(* WriteDevice)(GSM_StateMachine *s, const void *buf, size_t nbytes)
#define ALCATEL_DISCONNECT
GSM_Device_Functions * Functions
GSM_Phone_Functions * Functions
GSM_Error(* DispatchMessage)(GSM_StateMachine *s)
#define ALCATEL_MAX_COUNTER
GSM_Protocol_Message * RequestMsg
#define ALCATEL_CONNECT_ACK
void GSM_DumpMessageText(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type)
int smprintf(GSM_StateMachine *s, const char *format,...)