Added a command to attach to the GPRS network
This commit is contained in:
parent
91b5e7177f
commit
afa14f0d9f
12
src/modem.c
12
src/modem.c
@ -1,5 +1,5 @@
|
||||
/* $Id$ */
|
||||
/* Copyright (c) 2010 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS Desktop Phone */
|
||||
/* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -806,6 +806,16 @@ static void _modem_set_functional_callback(GSM * gsm)
|
||||
}
|
||||
|
||||
|
||||
/* gsm_modem_set_gprs_attach */
|
||||
int gsm_modem_set_gprs_attach(GSMModem * gsmm, gboolean set)
|
||||
{
|
||||
char cmd[] = "AT+CGATT=X";
|
||||
|
||||
cmd[9] = set ? '1' : '0';
|
||||
return (gsm_queue(gsmm->gsm, cmd) != NULL) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
/* gsm_modem_set_message_format */
|
||||
int gsm_modem_set_message_format(GSMModem * gsmm, GSMMessageFormat format)
|
||||
{
|
||||
|
@ -97,6 +97,7 @@ int gsm_modem_set_extended_errors(GSMModem * gsmm, gboolean extended);
|
||||
int gsm_modem_set_extended_ring_reports(GSMModem * gsmm, gboolean extended);
|
||||
int gsm_modem_set_line_presentation(GSMModem * gsmm, gboolean set);
|
||||
int gsm_modem_set_functional(GSMModem * gsmm, gboolean functional);
|
||||
int gsm_modem_set_gprs_attach(GSMModem * gsmm, gboolean set);
|
||||
int gsm_modem_set_message_format(GSMModem * gsmm, GSMMessageFormat format);
|
||||
int gsm_modem_set_message_indications(GSMModem * gsmm, GSMMessageMode mode,
|
||||
gboolean unsollicited);
|
||||
|
Loading…
Reference in New Issue
Block a user