[PATCH 0/1] Limits the send sms retry to network timeout
by Jeevaka Badrappan
Hi,
If sending of SMS fails, then oFono core will try to resend it after
n * 5 seconds(n = retry count). Due to this, conformance test case
27.22.8 sequence 1.4 fails(refer 31.124 spec). Plan is to limit the
failue codes for which the retry will be done. This patch allows the
retry if the failure is only due to network timeout. For all the other
failure cases, retry is not done.
Regards,
Jeevaka
Jeevaka Badrappan (1):
sms: limit the sms sending retry
src/sms.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
11 years, 6 months
[PATCH 0/1] Limits the send sms retry to network timeout
by Jeevaka Badrappan
Hi,
If sending of SMS fails, then oFono core will try to resend it after
n * 5 seconds(n = retry count). Due to this, conformance test case
27.22.8 sequence 1.4 fails(refer 31.124 spec). Plan is to limit the
failue codes for which the retry will be done. This patch allows the
retry if the failure is only due to network timeout. For all the other
failure cases, retry is not done.
Regards,
Jeevaka
Jeevaka Badrappan (1):
sms: limit the sms sending retry
src/sms.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
11 years, 6 months
[PATCH] doc: Update BT HFP / Add Emulator AT command set
by Olivier Guiter
---
doc/dialup-command-set.txt | 252 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 218 insertions(+), 34 deletions(-)
diff --git a/doc/dialup-command-set.txt b/doc/dialup-command-set.txt
index a7a1df3..9d80170 100644
--- a/doc/dialup-command-set.txt
+++ b/doc/dialup-command-set.txt
@@ -1,45 +1,229 @@
-This document specifies the AT command set used in the bluetooth ofono plugins.
+This document specifies the AT command supported in the AT Emulator and atoms.
Bluetooth Dial-up Networking Profile Features Description
=========================================================
-(Ref. document: Dial-up Networking Profile - Bluetooth specification version 1.1 - 22 February 2001)
+(Ref. document: Dial-up Networking Profile - Bluetooth specification
+ version 1.1- 22 February 2001)
-- AT COMMAND SET USED:
+- AT COMMAND set used:
Commands:
- &C Circuit 109 (DCD) Control
- &D Circuit 108 (DTR) Response
- &F Set to Factory Defined Configuration
- +GCAP Request Complete Capabilities List
- +GMI Request Manufacturer Identification
- +GMM Read Model Identification
- +GMR Read Revision Identification
- A Answer Incoming Call
- D Dial
- E Command Echo
- H Hang Up
- L Monitor Speaker Loudness
- M Monitor Speaker Control
- O Return to Online Data Mode
- P Select Pulse Dialling
- Q Result Code Suppression
- S0 Automatic Answer Control
- S10 Automatic Disconnect Delay Control
- S3 Command Line Termination Character
- S4 Response Formatting Character
- S5 Command Line Editing Character (BACKSPACE)
- S6 Blind Dial Delay Control
- S7 Connection Completion Timeout
- S8 Comma Dial Modifier Delay Control
- T Select Tone Dialling
- V DCE Response Format
- X Call Progress Monitoring Control
- Z Reset to Default Configuration
+ &C Circuit 109 (DCD) Control
+ &D Circuit 108 (DTR) Response
+ &F Set to Factory Defined Configuration
+ +GCAP Request Complete Capabilities List
+* +GMI Request Manufacturer Identification
+* +GMM Read Model Identification
+* +GMR Read Revision Identification
+ A Answer Incoming Call
+ D Dial
+ E Command Echo
+ H Hang Up
+ L Monitor Speaker Loudness
+ M Monitor Speaker Control
+ O Return to Online Data Mode
+ P Select Pulse Dialling
+ Q Result Code Suppression
+ S0 Automatic Answer Control
+ S10 Automatic Disconnect Delay Control
+ S3 Command Line Termination Character
+ S4 Response Formatting Character
+ S5 Command Line Editing Character (BACKSPACE)
+ S6 Blind Dial Delay Control
+ S7 Connection Completion Timeout
+ S8 Comma Dial Modifier Delay Control
+ T Select Tone Dialling
+ V DCE Response Format
+ X Call Progress Monitoring Control
+ Z Reset to Default Configuration
Result codes:
OK Acknowledge execution of a command
CONNECT Connection has been established
- RING The DCE has detected an incoming call signal from network
- NO CARRIER The connection has been terminated, or attempt to establish
- a connection failed
+ RING The DCE has detected an incoming call signal
+ from network
+ NO CARRIER The connection has been terminated, or attempt to
+ establish a connection failed
ERROR Error
NO DIALTONE No dial-tone detected
BUSY Busy signal detected
+
+Bluetooth Hands-Free Profile Description
+=========================================================
+(Ref. document: HFP1.5_SPEC (Car Working Group) - version V10r00 - 2005-11-25)
+
+- AT COMMAND set used:
+Commands:
+ D> Extension of the standard ATD command, intended for
+ memory dialing. Only voice calls are covered here
+ +CIND Standard indicator update AT command.
+
+ +NREC Noise Reduction and Echo Canceling
+ +VGM Gain of Microphone
+ +VGS Gain of Speaker
+ +BINP Bluetooth INPut
+ +BLDN Bluetooth Last Dialed Number
+ +BVRA Bluetooth Voice Recognition Activation
+ +BRSF Bluetooth Retrieve Supported Features
+ +BTRH Bluetooth Response and Hold Feature
+* +CCWA
+* +CHLD
+* +CHUP
+* +CLCC
+* +COPS
+* +CMEE
+* +CLIP
+* +CMER
+* +VTS
+* +CNUM
+(* : see below )
+
+Unsolicited result:
+ +CIEV
+ +BSIR Bluetooth Setting of In-band Ring tone
+Result codes:
+ NO ANSWER
+ DELAYED
+ BLACKLISTED
+
+AT commands supported in emulator:
+=========================================
+
+Call management:
+----------------
+ +CBST Select bearer service type
+ +CHLD Standard call hold and multiparty handling AT command
+ +CHUP Hangup call
+ +CMOD Call mode
+ +CPAS Phone activity status
+ +CVHU Voice Hangup Control
+ +CLIP Calling line identification presentation
+ +CNUM Subscriber number
+ +VTS DTMF and tone generation
+ +CACM Accumulated Call Meter
+ +COLP Connected Line Identification Presentation
+
+Device:
+--------
+ +CBC Battery charge
+ +CBKLT Backlight
+ +CCLK Clock
+ +CSO Command Screen Orientation
+ +CPWROFF Switch off MS
+ +CPOS Positioning Control
+ +CSS Command Screen Size
+ +CGMI Request manufacturer identification
+ +CGMM Request model identification
+ +CGMR Request revision identification
+ +GMI Request Manufacturer Identification
+ +GMM Request Model Identification
+ +GMR Request Revision Identification
+ +CGSN Request product serial number identification
+ +CKPD Keypad control
+
+General:
+--------
+ +CEER Extended error report
+ +CFUN Set phone functionality
+ +CGEQMIN 3G Quality of Service Profile (Minimum acceptable)
+ +CLAC List all available AT commands
+ +CLCK Facility lock
+ +CMEC Mobile Termination control mode
+ +CMEC Mobile Termination control mode
+ +CMEE Report Mobile Termination error
+ +CMER Mobile Termination event reporting
+ +CPWD Change password
+ +CTSA Command Touch Screen Action
+ +CIMI Request international mobile subscriber identity
+ +FCLASS Service Class Selection and Identification
+
+GPRS:
+-----
+ +CGACT PDP context activate or deactivate
+ +CGATT PS attach or detach
+ +CGCMOD PDP Context Modify
+ +CGDCONT Define PDP Context
+ +CGEQREQ 3G Quality of Service Profile (Requested)
+ +CGQREQ Quality of Service Profile (Requested)
+ +CGREG GPRS network registration status
+ +CGDSCONT Define Secondary PDP Context
+ +CGDATA Enter Data State
+ +CGTFT Traffic Flow Template
+ +CGQMIN Quality of Service Profile (Minimum Acceptable)
+ +CGEQNEG 3G Quality of Service Profile (Negotiated)
+ +CGCMOD PDP Context Modify
+ +CGCLASS GPRS Mobile Station Class
+ +CGPADDR Show PDP address
+ +CGCLASS GPRS Mobile Station Class
+ +DR Data Compression Reporting
+ +DS Data Compression
+
+Network:
+--------
+ *CNTI Network RAT capabilities
+ +COPS PLMN selection
+ +CPOL Preferred PLMN list
+ +CREG Network registration
+ +CSQ Signal quality
+ +CTZU Automatic Time Zone Update
+ +CTZR Time Zone Reporting
+
+SIM:
+----
+ +CPBR Read phonebook entries
+ +CPBS Select phonebook memory storage
+ +CPBW Write phonebook entry
+ +CPBF Find Phonebook Entries
+ +CPIN Enter PIN
+ +CRSM Restricted SIM access
+ +CSIM Generic SIM access
+ +CUSD Unstructured supplementary service data
+ +CASIM SIM Slot
+ +CRES Restore Settings (SMS)
+ +CSAS Save Settings (SMS)
+ +CCID Request SIM Card Identification
+
+Supplementary Services:
+-----------------------
+ +CCFC Call forwarding number and conditions
+ +CCWA Call waiting
+ +CLCC List current calls
+ +CLIR Calling line identification restriction
+ +CSSN Supplementary Service Notifications
+
+SMS:
+----
+ +CMTI A GSM/GPRS modem or mobile phone uses +CMTI to notify
+ the computer / PC that a new SMS message has been
+ received and the memory location where it is stored.
+ +CMT A GSM/GPRS modem or mobile phone uses +CMT to forward
+ a newly received SMS message to the computer / PC.
+ +CGSMS Select service for MO SMS messages
+ +CMGF Message Format
+ +CMGS Send Message
+ +CSCA Service Centre Address
+ +CESP Enter SMS Block Mode Protocol
+ +CMGC Send Command
+ +CMGD Delete Message
+ +CMGL List Messages
+ +CMGR Read Message
+ +CMGW Write Message to Memory
+ +CMMS More Messages to Send
+ +CMSS Send Message from Storage
+ +CNMA New Message Acknowledgement to ME/TA
+ +CNMI New Message Indications to TE
+ +CPMS Preferred Message Storage
+ +CSCS Select TE Character Set
+ +CSCB Select Cell Broadcast Message Types
+ +CSDH Show Text Mode Parameters
+ +CSMP Set Text Mode Parameters
+ +CSMS Select Message Service
+
+Debug:
+------
+ +TRACE Switch Trace ON/OFF
+
+AGPS:
+-----
+ +CMOLR Mobile Originated Location Request
+ +CCLRAD Needed for clearing of old Assistance Data stored
+ for AGPS positioning
+
--
1.7.1
11 years, 6 months
[HELP Required]Routing Of SCO data to BT Host Speaker
by milan.satpathy@accenture.com
Hi,
Recently I have been trying to use Ofono to write a Handsfree based application( Using C on Ubuntu 10.10).
I am able to connect(SLC) to the AG using Ofono. After connection I am also successful in dialing to another number.
Bluetoothd indicates status as "Playing" ( SCO connection successful) once the call is established.
Problem Faced:
----------------------
However, after accepting the call I am unable to hear any voice through the speaker.
Clarification Request:
-----------------------------
1. Do I need any specific settings / configurations to be able to hear the audio?
2.Or ,Do I need to make use of any available dbus methods / interfaces to enable the audio functionality?
Please guide me on this.
current config settings :
path : /etc/ofono/modem.conf , /usr/local/etc/ofono/modem.conf
#[hfp]
Address=A8:7E:33:AF:23:A4
Driver=hfp
path :/etc/bluetooth/audio.conf
[General]
Enable=Gateway
AutoConnect=true
HFP=true
MaxConnected=1
Regards,
Milan
________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
11 years, 6 months
[PATCH] PPP: Switch ringbuffer.c to g_slice allocator
by Patrick Porlan
This should allow for more efficient handling of equally sized
buffers, in terms of alignment and recycling.
---
gatchat/ringbuffer.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gatchat/ringbuffer.c b/gatchat/ringbuffer.c
index 27be3a8..775498c 100644
--- a/gatchat/ringbuffer.c
+++ b/gatchat/ringbuffer.c
@@ -51,11 +51,11 @@ struct ring_buffer *ring_buffer_new(unsigned int size)
if (real_size > MAX_SIZE)
return NULL;
- buffer = g_try_new(struct ring_buffer, 1);
+ buffer = g_slice_new(struct ring_buffer);
if (buffer == NULL)
return NULL;
- buffer->buffer = g_try_new(unsigned char, real_size);
+ buffer->buffer = g_slice_alloc(real_size);
if (buffer->buffer == NULL) {
g_free(buffer);
return NULL;
@@ -202,6 +202,6 @@ void ring_buffer_free(struct ring_buffer *buf)
if (buf == NULL)
return;
- g_free(buf->buffer);
- g_free(buf);
+ g_slice_free1(buf->size, buf->buffer);
+ g_slice_free1(sizeof(struct ring_buffer), buf);
}
--
1.7.1
11 years, 6 months
[PATCH 0/1] Fixes issue with Get Inkey variable timeout
by Jeevaka Badrappan
Hi,
As per the ETSI TS 102 384 specification 27.22.4.2.8 section, duration
data object needs to be sent as part of the Get Inkey terminal response
for "No response from user" result.
Regards,
Jeevaka
Jeevaka Badrappan (1):
stk: fix issue with Get Inkey variable timeout
src/stk.c | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
11 years, 6 months
[PATCH] CBMs are always fixed size, so improve PDU length check
by Bertrand Aygon
---
drivers/atmodem/cbs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/atmodem/cbs.c b/drivers/atmodem/cbs.c
index 8cc3ef0..e2e1ca4 100644
--- a/drivers/atmodem/cbs.c
+++ b/drivers/atmodem/cbs.c
@@ -68,8 +68,8 @@ static void at_cbm_notify(GAtResult *result, gpointer user_data)
if (!g_at_result_iter_next_number(&iter, &pdulen))
return;
- if (pdulen > 88) {
- ofono_error("Got a CBM message bigger than maximum size!");
+ if (pdulen != 88) {
+ ofono_error("Got a CBM message with invalid PDU size!");
return;
}
--
1.7.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
11 years, 6 months
IMS support plan
by Fallon, Michael F
Hello,
Can anybody provide any insight into oFono's plans to support IMS (ISIM interface)? I'm particularly interested in feature set and scheduling details if this information is available. Will ISIM support be included in MeeGo 1.2?
Thank you!
11 years, 6 months
[PATCH] PPP: Optimize write buffer management
by Patrick Porlan
Extend the write buffer handling in gathdlc.c to minimize stalling and
process switching during large PPP transfers. The single write buffer
is replaced by a queue of buffers, allowing for much larger emission
windows without hugely impacting memory consumption. This reduces the
time required to send 50 MB between a couple of local PPP interfaces on
my laptop from ~53s to ~3s.
---
gatchat/gathdlc.c | 95 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 73 insertions(+), 22 deletions(-)
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c
index 6c39e6c..893e061 100644
--- a/gatchat/gathdlc.c
+++ b/gatchat/gathdlc.c
@@ -37,7 +37,9 @@
#include "gatio.h"
#include "gathdlc.h"
-#define BUFFER_SIZE 2048
+#define BUFFER_SIZE (2 * 2048)
+#define MAX_BUFFERS 64 /* Maximum number of in-flight write buffers */
+#define HDLC_OVERHEAD 256 /* Rough estimate of HDLC protocol overhead */
#define HDLC_FLAG 0x7e /* Flag sequence */
#define HDLC_ESCAPE 0x7d /* Asynchronous control escape */
@@ -51,7 +53,7 @@
struct _GAtHDLC {
gint ref_count;
GAtIO *io;
- struct ring_buffer *write_buffer;
+ GQueue *write_queue; /* Write buffer queue */
unsigned char *decode_buffer;
guint decode_offset;
guint16 decode_fcs;
@@ -201,6 +203,7 @@ GAtHDLC *g_at_hdlc_new_from_io(GAtIO *io)
{
GAtHDLC *hdlc;
unsigned char *buf;
+ struct ring_buffer* write_buffer;
if (io == NULL)
return NULL;
@@ -218,16 +221,22 @@ GAtHDLC *g_at_hdlc_new_from_io(GAtIO *io)
hdlc->xmit_accm[3] = 0x60000000; /* 0x7d, 0x7e */
hdlc->recv_accm = ~0U;
- hdlc->write_buffer = ring_buffer_new(BUFFER_SIZE * 2);
- if (!hdlc->write_buffer)
+ write_buffer = ring_buffer_new(BUFFER_SIZE);
+ if (!write_buffer)
+ goto error;
+
+ hdlc->write_queue = g_queue_new();
+ if (!hdlc->write_queue)
goto error;
+ g_queue_push_tail(hdlc->write_queue, write_buffer);
+
/* Write an initial 0x7e as wakeup character */
- buf = ring_buffer_write_ptr(hdlc->write_buffer, 0);
+ buf = ring_buffer_write_ptr(write_buffer, 0);
*buf = HDLC_FLAG;
- ring_buffer_write_advance(hdlc->write_buffer, 1);
+ ring_buffer_write_advance(write_buffer, 1);
- hdlc->decode_buffer = g_try_malloc(BUFFER_SIZE * 2);
+ hdlc->decode_buffer = g_try_malloc(BUFFER_SIZE);
if (!hdlc->decode_buffer)
goto error;
@@ -239,8 +248,11 @@ GAtHDLC *g_at_hdlc_new_from_io(GAtIO *io)
return hdlc;
error:
- if (hdlc->write_buffer)
- ring_buffer_free(hdlc->write_buffer);
+ if (hdlc->write_queue)
+ g_queue_free(hdlc->write_queue);
+
+ if (write_buffer)
+ ring_buffer_free(write_buffer);
if (hdlc->decode_buffer)
g_free(hdlc->decode_buffer);
@@ -277,6 +289,8 @@ GAtHDLC *g_at_hdlc_ref(GAtHDLC *hdlc)
void g_at_hdlc_unref(GAtHDLC *hdlc)
{
+ struct ring_buffer *write_buffer;
+
if (hdlc == NULL)
return;
@@ -294,7 +308,11 @@ void g_at_hdlc_unref(GAtHDLC *hdlc)
g_at_io_unref(hdlc->io);
hdlc->io = NULL;
- ring_buffer_free(hdlc->write_buffer);
+ while ((write_buffer = g_queue_pop_head(hdlc->write_queue)))
+ ring_buffer_free(write_buffer);
+
+ g_queue_free(hdlc->write_queue);
+
g_free(hdlc->decode_buffer);
if (hdlc->in_read_handler)
@@ -328,15 +346,32 @@ static gboolean can_write_data(gpointer data)
unsigned int len;
unsigned char *buf;
gsize bytes_written;
+ struct ring_buffer* write_buffer;
- len = ring_buffer_len_no_wrap(hdlc->write_buffer);
- buf = ring_buffer_read_ptr(hdlc->write_buffer, 0);
+ /* Write data out from the head of the queue */
+ write_buffer = g_queue_peek_head(hdlc->write_queue);
+
+ len = ring_buffer_len_no_wrap(write_buffer);
+ buf = ring_buffer_read_ptr(write_buffer, 0);
bytes_written = g_at_io_write(hdlc->io, (gchar *) buf, len);
hdlc_record(hdlc->record_fd, FALSE, buf, bytes_written);
- ring_buffer_drain(hdlc->write_buffer, bytes_written);
+ ring_buffer_drain(write_buffer, bytes_written);
- if (ring_buffer_len(hdlc->write_buffer) > 0)
+ if (ring_buffer_len(write_buffer) > 0)
+ return TRUE;
+
+ /* All data in current buffer is written, free it
+ * unless it's the last buffer in the queue.
+ */
+ if ((ring_buffer_len(write_buffer) == 0) &&
+ (g_queue_get_length(hdlc->write_queue) > 1)) {
+ write_buffer = g_queue_pop_head(hdlc->write_queue);
+ ring_buffer_free(write_buffer);
+ write_buffer = g_queue_peek_head(hdlc->write_queue);
+ }
+
+ if (ring_buffer_len(write_buffer) > 0)
return TRUE;
return FALSE;
@@ -370,19 +405,35 @@ GAtIO *g_at_hdlc_get_io(GAtHDLC *hdlc)
gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
{
- unsigned int avail = ring_buffer_avail(hdlc->write_buffer);
- unsigned int wrap = ring_buffer_avail_no_wrap(hdlc->write_buffer);
- unsigned char *buf = ring_buffer_write_ptr(hdlc->write_buffer, 0);
+ struct ring_buffer* write_buffer = g_queue_peek_tail(hdlc->write_queue);
+
+ unsigned int avail = ring_buffer_avail(write_buffer);
+ unsigned int wrap = ring_buffer_avail_no_wrap(write_buffer);
+ unsigned char *buf;
unsigned char tail[2];
unsigned int i = 0;
guint16 fcs = HDLC_INITFCS;
gboolean escape = FALSE;
gsize pos = 0;
- if (avail < size)
- return FALSE;
+ if (avail < size + HDLC_OVERHEAD) {
+
+ if (g_queue_get_length(hdlc->write_queue) > MAX_BUFFERS)
+ return FALSE; /* Too many pending buffers */
+
+ write_buffer = ring_buffer_new(BUFFER_SIZE);
+
+ if (!write_buffer)
+ return FALSE;
+
+ g_queue_push_tail(hdlc->write_queue, write_buffer);
+
+ avail = ring_buffer_avail(write_buffer);
+ wrap = ring_buffer_avail_no_wrap(write_buffer);
+ }
i = 0;
+ buf = ring_buffer_write_ptr(write_buffer, 0);
while (pos < avail && i < size) {
if (escape == TRUE) {
@@ -401,7 +452,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
pos++;
if (pos == wrap)
- buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
+ buf = ring_buffer_write_ptr(write_buffer, pos);
}
if (i < size)
@@ -428,7 +479,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
pos++;
if (pos == wrap)
- buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
+ buf = ring_buffer_write_ptr(write_buffer, pos);
}
if (i < sizeof(tail))
@@ -440,7 +491,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
*buf = HDLC_FLAG;
pos++;
- ring_buffer_write_advance(hdlc->write_buffer, pos);
+ ring_buffer_write_advance(write_buffer, pos);
g_at_io_set_write_handler(hdlc->io, can_write_data, hdlc);
--
1.7.1
11 years, 6 months