[RFC] HFP support into oFono and BlueZ
by Gustavo F. Padovan
Hi,
These patches implement the new API for the Audio Gateway in BlueZ. It
follows the last version of the HandsfreeGateway and HandsfreeAgent
Intefaces API.
The first two patches is for BlueZ and the other for oFono. You can
test it with using enable-modem and test-voicecall scripts into the
test dir of oFono.
Feel free to test it and send me your comments. We have some bugs yet.
The audio part is not working yet. We are going to work on pulseaudio
this week to get this done soon.
Regards,
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
8 years, 6 months
CDMA SMS Handling
by Rajesh.Nagaiah@elektrobit.com
Hi,
There was a discussion about the CDMA SMS handling and CDMA PDUs in the
IRC channel couple of days before. I would like to highlight the
differences between CDMA and GSM PDU and how we should proceed with this
from my understanding. Let me know your opinion.
Even though oFono supports +CMT and +CMTI, if we feed the incoming CDMA
PDUs to the SMS core it wont get decoded correctly, as there is
substantial differences between the GSM and CDMA SMS PDUs as described
in 3GPP2 specification C.S0015-B Short Message Service (SMS) for
Wideband Spread Spectrum Systems
For eg, the incoming PDU example that was mentioned in the IRC
discussion
+CMT: , 40,
00000210020207028CE95DCC65800601FC08150003168D30010610241830608003061010
04044847
40 - Length of the PDU in bytes
00 - Message Type ( 00 - SMS Point-to-Point)
00 - TeleService Identifier Tag (SMS Parameter Indentifier)
02 - TeleService Identifier Length (SMS Parameter Length)
10 - TeleService Identifier Value - First 8 bits
02 - TeleService Identifier Value - Second 8 bits
TeleService Identifier - 0x1002 - CDMA Messaging Teleservice
(CMT-95)
02 - Originating Address Tag
07 - Originating Address Length
02 - Originating Address 1st 8 Bits
8C - Originating Address 2nd 8 Bits
E9 - Originating Address 3rd 8 Bits
5D - Originating Address 4th 8 Bits
CC - Originating Address 5th 8 Bits
65 - Originating Address 6th 8 Bits
80 - Originating Address 7th 8 Bits
Digit Mode - 1 Bit
Number Mode - 1 Bit
Number Type - 0 or 3 bits
Number Plan - 0 or 4 bits
Number Fields - 8 Bits
Number Field occurrence of CHARi
CHARi - 4 or 8 bits ( 4 - in case of DTMF encoding, 8 - incase
of ASCII encoding)
Reserved - 0-7 bits
Lets take the 1st and 2nd 8 bits
02 - 0000 0010 ( Digit Mode bit - 0, Number Mode bit - 0)
8C - 1000 1100
As Digit mode bit is set to 0, Number Plan and Number Type is void
(0 bits) in this case.
So the remaining 6 bits of 1st 8bits and the first 2 bits of 2nd
8bit is Number fields
Number fields - 00 0010 10 - 0000 1010 - 0x0A (10 digits)
As Digit mode bit is set to 0, each address digit here is
represented as 4bit DTMF digit
0x8C 0xE9 0x5D 0xCC 0x65 0X80
1000 1100 1110 1001 0101 1101 1100 1100 0110 0101 1000 0000
10 0011 0011 1010 0101 0111 0111 0011 0001 1001 0110 0000 00
3 3 0 5 7 7 3 1 9 6 Last 6 bits
are reserved bits
Originating Address - 3305773196
06 - Bearer Reply Option Tag
01 - Bearer Reply Option Length
FC - First 6 bits Reply Sequence number and last 2 bits reserved set to
0
1111 1100 - 111111 REPLY_SEQ
00 Reserved
08 - Bearer Data Tag
15 - Bearer Data Length
00 - Message Indentifier Tag ( Bearer Data Sub parameter )
03 - Message Indentifier Length
16 - Message Type 4 bits Message Id 4 Bits
8D - Message Id 8 Bits
30 - Message Id 4 Bits, UDH Header indicator 1 Bit, Reserved 3 Bits
How Message Identifier value 16 8D 30 was formed ?
Message type ( 4 bits ) - 1( 0001 - Deliver)
Message Identifier ( 16 bits ) - 26835( 0x68D3)
Header Indicator (1 bit) - 0 (UDH not present in User Data
Subparameter)
Reserved ( 3bits) - 0 (000)
01 - User Data Tag ( Bearer Data Sub parameter )
06 - User Data Length
10 - Message Encoding 5 bits ( 0001 0000 ( 00010 = 2 -> 7-bit ASCII )) &
Number Fields 3 bits ( 000)
24 - Number Fields 5 Bits + User char field 1's 3 bits ( 0010 0100 )
18 - User char field 1's remaining 5 bits + User char field 2's 3 bits
(0001 1000)
30 - User char field 2's remaining 5 bits + User char field 3's 3 bits
(0011 0000)
60 - User char field 3's remaining 5 bits + User char field 4's 3 bits
(0110 0000)
80 - User char field 4's remaining 5 bits + Reserved 3 Bits (1000 0000)
Number Fields: 000 00100 - 04 (4 Character fields)
User Char [1] - 100 00011 - 0x83
User Char [2] - 000 00110 - 0x06
User Char [3] - 000 01100 - 0x0C
User Char [4] - 000 10000 - 0x10
Hex 0x83 0x06 0x0C 0x10
Octets 1000 0011 0000 0110 0000 1100 0001 0000
Septets 1000 001 10000 01 100000 1 1000001
Character A(0x41) A(0x41) A(0x41) A(0x41)
Message content: AAAA
Message Encoding - 2 (00010 - 5 bits)
Number Fields - 4 (0000 0100 - 8 bits)
User characters - 0x83 0x06 0x0C 0x10 ( 8 bits each)
00010 0000 0100 1000 0011 0000 0110 0000 1100 0001 0000
0001 0000 - 0x10
0010 0100 - 0x24
0001 1000 - 0x18
0011 0000 - 0x30
0110 0000 - 0x60
1000 0000 - 0x80 (Last 3 bits set to 0's(reserved bit) to complete
the octets)
03 - Message Center Time Stamp Tag ( Bearer Data Sub parameter )
06 - Message Center Time Stamp Length
all date and time fields contain two 4-bit BCD numbers giving the
decimal value of the field.
10 - Year (2010)
10 - Month (10 - October)
04 - Day
04 - Hour
48 - Minutes
47 - Seconds
Time Stamp 04:48:47 04/10/2010
Decoded Information:
Message Type: Deliver (Incoming Message)
Teleservice: CMT-95
Message Identifier: 26835
Originating Address: 3305773196
Message content: AAAA
Message Center Time Stamp: 04:48:47 04/10/2010
As from the above decoding example we can see there is substantial
differences between the GSM and CDMA SMS specifications and so the SMS
atom needs many additions and needs to be heavily modified to support
also CDMA SMS handling. Currently the oFono sms file unit handles the
common and the GSM technology aspects of the SMS stack along with the
smsutils. The SMS atom has the GSM specific members, segmentation and
queuing logic. The smsutils mainly takes care of encoding/decoding of
the PDUs, which is GSM specific. As the segmentation and queuing logic
and the interface is common for both GSM and CDMA, we could reuse this
common code and add the CDMA handling into it and create a new
cdmasmsutils unit to support the CDMA SMS specifics, much like the
smsutils does already for GSM.
BR,
Rajesh
8 years, 8 months
[PATCH 1/1] Fix primary context active/deactive result d-bus reply missing issue
by martin.xu@intel.com
From: Martin Xu <martin.xu(a)intel.com>
If user offline modem when the gprs_context is in enabling or disabling
state(activating/disactivating), the GPRS primary context activate/disactivate
result will not be replied to the corresponding application.
---
drivers/atmodem/gprs-context.c | 7 +++++++
src/gprs.c | 5 +++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index ba95cbf..bfbd2c5 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -301,6 +301,13 @@ static void at_gprs_context_remove(struct ofono_gprs_context *gc)
if (gcd->state != STATE_IDLE && gcd->ppp) {
g_at_ppp_unref(gcd->ppp);
+
+ if (gcd->state == STATE_ENABLING)
+ CALLBACK_WITH_FAILURE(gcd->cb, gcd->cb_data);
+
+ if (gcd->state == STATE_DISABLING)
+ CALLBACK_WITH_SUCCESS(gcd->cb, gcd->cb_data);
+
g_at_chat_resume(gcd->chat);
}
diff --git a/src/gprs.c b/src/gprs.c
index deffeb8..99cb55d 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -351,6 +351,9 @@ static struct pri_context *gprs_context_by_path(struct ofono_gprs *gprs,
static void context_settings_free(struct context_settings *settings)
{
+ if (settings == NULL)
+ return;
+
if (settings->ipv4) {
g_free(settings->ipv4->ip);
g_free(settings->ipv4->netmask);
@@ -736,6 +739,8 @@ static void pri_reset_context_settings(struct pri_context *ctx)
return;
settings = ctx->context_driver->settings;
+ if (settings == NULL)
+ return;
interface = settings->interface;
settings->interface = NULL;
--
1.7.2.2
9 years, 9 months
[PATCH v3 00/26] Escape Sequence Dectection implementation
by Guillaume Zajac
Hi,
This set of patches is an update of the previous one.
The main diff are:
- Rework Escape Sequence detection mechanism:
* we don't need a timeout to detect the 3 '+'
GUARD_TIMEOUTS only is enough.
* Be sure g_source timeout is deleted at hdlc_unref().
- GAtIO: add API to drain write buffer when hdlc is suspended
because we can't acces to GAtIO ring buffer externally.
- ppp_net: add API to suspend/resume GIOCHannel read watch
of TUN/TAP interface.
- GAtChat: add API to send <pause> +++ <pause> escape sequence
- gsmdial controls only the time interval between escape sequence
and ATO0/ATHO.
- emulator: rework ATH0 and ATO0 callbacks, add switch on emulator
type to register AT callbacks.
Kind regards,
Guillaume
Guillaume Zajac (26):
gat: add GAtSuspendFunc CB typedef
gatio: add prototype to drain GAtIO read buffer
gatio: add g_at_io_drain_ring_buffer() definition
gathdlc: add g_at_hdlc_set_suspend_function() prototype
gathdlc: add mechansim to detect '+++' escape sequence
gatppp: add g_at_ppp_set_suspend_function() prototype
gatppp: add g_at_ppp_set_suspend_function() definition
gathdlc: add g_at_hdlc_suspend() prototype
gathdlc: add g_at_hdlc_suspend() definition
ppp: add ppp_net_suspend_interface() prototype
ppp_net: add ppp_net_suspend_interface() definition
gatppp: add g_at_ppp_suspend() prototype
gatppp: add g_at_ppp_suspend() definition
emulator: add ppp_suspend() CB and register it
emulator: add dun_ath_cb() and register it
gathdlc: add g_at_hdlc_resume() prototype
gathdlc: add g_at_hdlc_resume() definition
ppp: add ppp_net_resume_interface() prototype
ppp_net: add ppp_net_resume_interface() definition
gatppp: add g_at_ppp_resume() prototype
gatppp: add g_at_ppp_resume() definition.
emulator: add dun_ato_cb() and register it
gsmdial: add new option to test sending escape sequence
gatchat: add g_at_chat_send_escape_sequence() prototype
gatchat: add g_at_chat_send_escape_sequence() definition
gsmdial: implement test sequence +++-ATO0-+++-ATH0
gatchat/gat.h | 1 +
gatchat/gatchat.c | 32 +++++++++++++
gatchat/gatchat.h | 2 +
gatchat/gathdlc.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++
gatchat/gathdlc.h | 6 +++
gatchat/gatio.c | 5 ++
gatchat/gatio.h | 2 +
gatchat/gatppp.c | 34 ++++++++++++++
gatchat/gatppp.h | 4 ++
gatchat/gsmdial.c | 81 ++++++++++++++++++++++++++++++++++
gatchat/ppp.h | 2 +
gatchat/ppp_net.c | 19 ++++++++
src/emulator.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++-
13 files changed, 437 insertions(+), 2 deletions(-)
9 years, 10 months
[PATCH] isimodem: use a specific call id when answering
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
---
drivers/isimodem/voicecall.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
index 333f9b8..4d4e16b 100644
--- a/drivers/isimodem/voicecall.c
+++ b/drivers/isimodem/voicecall.c
@@ -1480,7 +1480,27 @@ static void isi_dial(struct ofono_voicecall *ovc,
static void isi_answer(struct ofono_voicecall *ovc, ofono_voicecall_cb_t cb,
void *data)
{
- isi_call_answer_req(ovc, CALL_ID_ALL, cb, data);
+ struct isi_voicecall *ivc = ofono_voicecall_get_data(ovc);
+ int id;
+
+ for (id = 1; id <= 7; id++) {
+ switch (ivc->calls[id].status) {
+ case CALL_STATUS_COMING:
+ case CALL_STATUS_MT_ALERTING:
+ case CALL_STATUS_WAITING:
+ goto answer;
+ case CALL_STATUS_PROCEEDING:
+ if (ivc->calls[id].mode_info & CALL_MODE_ORIGINATOR)
+ goto answer;
+ break;
+ }
+ }
+
+ CALLBACK_WITH_FAILURE(cb, data);
+ return;
+
+answer:
+ isi_call_answer_req(ovc, id, cb, data);
}
static void isi_hangup_current(struct ofono_voicecall *ovc,
--
1.7.1
9 years, 10 months
[PATCH_v2 0/4] Request private petwork creation to ConnMan
by Guillaume Zajac
Hi,
This new version contains some fixes of some typos into plugins/connman.c:
- in dun_emulator_watch() missing some brackets
- in connman_init(), multiple return and unused variable err.
Guillaume Zajac (4):
gatppp: Add new contructor to use external fd
emulator: add routine to request/release private network from ConnMan
connman: add plugin in oFono to request request/release private
network
Makefile: add connman plugin build
Makefile.am | 3 +
gatchat/gatppp.c | 43 +++++++++-
gatchat/gatppp.h | 2 +
gatchat/ppp.h | 2 +-
gatchat/ppp_net.c | 46 ++++++----
include/emulator.h | 10 ++
plugins/connman.c | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/emulator.c | 75 +++++++++++++++--
8 files changed, 387 insertions(+), 29 deletions(-)
create mode 100644 plugins/connman.c
9 years, 10 months
[PATCH] Remove a debug information, since the info is useless, and more, it can display invalid info due to var not initialise in some case
by Bertrand Aygon
---
src/sms.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/sms.c b/src/sms.c
index 74c943a..2940762 100644
--- a/src/sms.c
+++ b/src/sms.c
@@ -1336,7 +1336,7 @@ static void sms_dispatch(struct ofono_sms *sms, GSList *sms_list)
}
}
- DBG("dst %d src %d 8bit %u", cdst, csrc, is_8bit);
+ DBG("dst %d src %d", cdst, csrc);
if (srcport != csrc || dstport != cdst) {
ofono_error("Source / Destination ports across "
--
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.
9 years, 10 months
[PATCH] gisi: log normal responses in a less confusing way
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
---
gisi/modem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gisi/modem.c b/gisi/modem.c
index 384983d..070cb9c 100644
--- a/gisi/modem.c
+++ b/gisi/modem.c
@@ -163,7 +163,8 @@ static void pending_remove_and_dispatch(GIsiPending *op, GIsiMessage *msg)
modem = op->service->modem;
ISIDBG(modem, "%s %s to %p [res=0x%02X, id=0x%02X, utid=0x%02X]",
- g_isi_msg_strerror(msg), pend_type_to_str(op->type), op,
+ g_isi_msg_error(msg) ? g_isi_msg_strerror(msg) : "normal",
+ pend_type_to_str(op->type), op,
g_isi_msg_resource(msg), g_isi_msg_id(msg),
g_isi_msg_utid(msg));
--
1.7.1
9 years, 10 months
[PATCH 0/6] phonesim: Add call status UI
by Nicolas Bertrand
This patch introduce a new tab "call" in phonesim UI in order to display calls
informations (id, number, status, name and direction).
The interface to send CSSU and CSSI notification is now dynamic based on the
type of current calls.
Nicolas Bertrand (6):
callmanager: Add signal on call status change
control: Update UI using call status
hardwaremanipulator: add callmanagement method
phonesim: Connect call status signal
controlbase.ui: Add call mangement tab
control: Update call view
src/callmanager.cpp | 34 ++++++++---
src/callmanager.h | 3 +
src/control.cpp | 140 ++++++++++++++++++++++++++++++++++++++-----
src/control.h | 6 ++
src/controlbase.ui | 61 +++++++++++++++++++
src/hardwaremanipulator.cpp | 4 +
src/hardwaremanipulator.h | 2 +
src/phonesim.cpp | 2 +
8 files changed, 228 insertions(+), 24 deletions(-)
9 years, 10 months
Qualcomm Gobi 2000 Modem Issues
by Kai Scharwies
Hi everyone.
I ran into two issues trying to setup a data connection with a Gobi 2000 card.
The first one seems to be an error regarding simcard onlocking. After
enabling the modem test/list-modems shows the following, despite the
simcard is inserted correctly:
[ /gobi0 ]
Features = sim
Emergency = 0
Powered = 1
Lockdown = 0
Interfaces = org.ofono.SimManager
Online = 0
Model = Qualcomm Gobi 2000
Revision = D1025-STUTABGD-3600 1 [Jan 14 2010 14:00:00]
Serial = 353093033460401
Manufacturer = Qualcomm Incorporated
[ org.ofono.SimManager ]
Present = 0
Our current workaround is quitting ofono and using minicom to unlock
the sim directly, then restarting ofono.
> at+cpin?
+CPIN: SIM PIN
OK
> at+cpin="1234"
OK
$QCSIMSTAT: 1 SIM INIT COMPLETED
The second issue is not being able to activate an internet context:
(Network registration and attachment is alright)
test/enable-modem
Connecting modem /gobi0...
test/online-modem
Setting modem /gobi0 online...
test/list-contexts
[ /gobi0 ]
[ /gobi0/context1 ]
Username =
Protocol = ip
Name = Internet
Settings = { }
IPv6.Settings = { }
Active = 0
AccessPointName = internet.t-mobile
Password =
Type = internet
test/activate-context
Error activating /gobi0/context1: org.ofono.Error.NotImplemented:
Implementation not provided
If you could give me a little assisting on where to look, maybe I
would be able to contribute patches, too.
Best regards,
Kai
9 years, 10 months