Nicolas Paccou | 17 May 2013 15:52
Picon

oFono upstream test results_20130517

Hello all,

 

Please find the test report of oFono v1.12 commit 1c75edf.

Due to Network Simulator License issue, no report has been sent last month, I’m sorry for the inconvenience. This problem is now resolved.

 

During this testing, we ran 462 functional positive cases. 372 cases passed, 1 failed and 89 are blocked due to missing software/missing hardware/Feature not supported. The pass rate is 81% (=) which is equal than previous test cycle (v1.12 commit 4fcd084). No new issue has been found.

 

If you have any comment about this report, contact me please.

 

 

Test Objective

 

The aim of this test cycle was to validate the state of oFono upstream by testing all its features over all material we had (according to what feature was supported and by priority order: Smartphone with real SIM or with Network Simulator, on Laptop with 3G dongle or with Phonesim). oFono has been installed and tested on smartphone device running Tizen 2.0 and Ubuntu 12.04 device.

 

 

Test Environment

 

For all Setup:

oFono: v1.12 (updated to commit 1c75edf)

 

-      Smartphone device Setup:

Image: Tizen Mobile 2.0

Operator & SIM Card: several french and UK SIM Cards according to features

 

-      Laptop + 3G Dongle/Phonesim:

usb_modeswitch: v1.2.3

modeswitch data: 20120120

Hardware: Laptop

Ubuntu: v12.04

Modem: Huawei E173u-2 - Operator & SIM Card: several french and UK SIM Cards according to features

Phonesim: v1.19 (updated to commit c94e6c0)

    

-      Laptop + HFP

HFP Server:

Hardware: Laptop

Ubuntu: v12.04

Bluez 4.101 (updated to commit 67ef3ac)

oFono has been installed with “--enable-bluez4” option instead of using default bluez5 plugin (unable to make HFP using this one)

HFP Client: Android JB device

 

 

Issue Summary

 

New bug: 0

None

 

Known bug: 1

Bug 25982 - Going back from a select item list releases the session

 

Closed bug: 0

None

 

 

Test Result

 

SUMMARY

Total Test Case                  462

Passed                              372

Failed                                1

Blocked                             89

TCs completed                   100,0%

Run rate                            81%

Pass rate total                    81% (=)

Blocked rate total               19% (=)

Pass rate of executed          100%

 

FEATURES                                   TOTAL           PASS  FAIL    BLOCKED      PASS %          MODEM USED

Modem                                        16                16      0        0                  100%            Smartphone using real SIM and Laptop + HFP Modem

SIM                                             20                20      0        0                  100%            Smartphone using real SIM

Phonebook                                   1                  1        0        0                  100%            Smartphone using real SIM

Network                                      18                18      0        0                  100%            Smartphone using real SIM

Radio                                          22                17      0        5                  77%             Smartphone using real SIM

Connectivity                                28                28      0        0                  100%            Smartphone using real SIM and Laptop + 3G Dongle (for PPP tests)

Voice Calls                                   50                45      0        5                  90%             Smartphone using real SIM or Network Simulator

Messaging                                   24                22      0        2                  92%             Smartphone using real SIM or Phonesim

Smart Messaging                         15                15      0        0                  100%            Laptop + Phonesim

Message Waiting                          8                  8        0        0                  100%            Laptop + Phonesim

Cell Broadcast                              15                12      0        3                  80%             Laptop + Phonesim

Call Settings                                13                9        0        4                  69%             Smartphone using real SIM

Supplementary Services               59                56      0        3                  95%             Smartphone (using appropriate SIM Card)

Call Meter                                    15                13      0        2                  87%             Smartphone using Network Simulator

Call Barring                                 49                33      0        16                67%             Smartphone (using appropriate SIM Cards)

Call Forwarding                            5                  5        0        0                  100%            Smartphone (using appropriate SIM Cards)

SimToolKit                                  104               54      1        49                52%             Laptop + Phonesim

 

Please find details in the attached file.

 

 

Notes

 

Please note that I have found a crash of oFono when running two STK TCs in a row:

Bug 25998 - oFono crashes when doing a NAA Initialization+File Change Notification after having done a NAA Initialization+Full File Change Notification with Phonesim.

 

19% of cases are blocked due to:

-      Missing software (e.g.: Missing feature in Phonesim or missing a visual application for some blocked feature as Setup Idle ModeText, Select Item, Send SMS, etc.)

-      Missing hardware (e.g.: Missing other SIM (having appropriate service activated).

-      Feature not supported by oFono

 

Best regards,

Nicolas

Attachment (oFono1.12_1c75edf_TCs_TitlesOnly.xlsx): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, 85 KiB
<div><div class="WordSection1">
<p class="MsoNoSpacing">Hello all,<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Please find the test report of oFono v1.12 commit 1c75edf.<p></p></p>
<p class="MsoNoSpacing">Due to Network Simulator License issue, no report has been sent last month, I&rsquo;m sorry for the inconvenience. This problem is now resolved.<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">During this testing, we ran 462 functional positive cases. 372 cases passed, 1 failed and 89 are blocked due to missing software/missing hardware/Feature not supported. The pass rate is 81% (=) which is equal than previous test cycle (v1.12 commit 4fcd084). No new issue has been found.<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">If you have any comment about this report, contact me please.<p></p></p>
<div><p class="MsoNoSpacing"><p>&nbsp;</p></p></div>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Test Objective<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">The aim of this test cycle was to validate the state of oFono upstream by testing all its features over all material we had (according to what feature was supported and by priority order: Smartphone with real SIM or&nbsp;with Network Simulator, on Laptop with 3G dongle or with Phonesim). oFono has been installed and tested on smartphone device running Tizen 2.0 and Ubuntu 12.04 device.<p></p></p>
<div><p class="MsoNoSpacing"><p>&nbsp;</p></p></div>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Test Environment<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">For all Setup:<p></p></p>
<p class="MsoNoSpacing">oFono: v1.12 (updated to commit 1c75edf)<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Smartphone device Setup:<p></p></p>
<p class="MsoNoSpacing">Image: Tizen Mobile 2.0<p></p></p>
<p class="MsoNoSpacing">Operator &amp; SIM Card: several french and UK SIM Cards according to features<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Laptop + 3G Dongle/Phonesim:<p></p></p>
<p class="MsoNoSpacing">usb_modeswitch: v1.2.3<p></p></p>
<p class="MsoNoSpacing">modeswitch data: 20120120<p></p></p>
<p class="MsoNoSpacing">Hardware: Laptop<p></p></p>
<p class="MsoNoSpacing">Ubuntu: v12.04<p></p></p>
<p class="MsoNoSpacing">Modem: Huawei E173u-2 - Operator &amp; SIM Card: several french and UK SIM Cards according to features<p></p></p>
<p class="MsoNoSpacing">Phonesim: v1.19 (updated to commit c94e6c0)<p></p></p>
<p class="MsoNoSpacing">&nbsp;&nbsp;&nbsp;&nbsp; <p></p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Laptop + HFP<p></p></p>
<p class="MsoNoSpacing">HFP Server:<p></p></p>
<p class="MsoNoSpacing">Hardware: Laptop<p></p></p>
<p class="MsoNoSpacing">Ubuntu: v12.04<p></p></p>
<p class="MsoNoSpacing">Bluez 4.101 (updated to commit 67ef3ac)<p></p></p>
<p class="MsoNoSpacing">oFono has been installed with &ldquo;--enable-bluez4&rdquo; option instead of using default bluez5 plugin (unable to make HFP using this one)<p></p></p>
<p class="MsoNoSpacing">HFP Client: Android JB device<p></p></p>
<div><p class="MsoNoSpacing"><p>&nbsp;</p></p></div>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Issue Summary<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">New bug: <a name="b25952"></a>0<p></p></p>
<p class="MsoNoSpacing">None<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Known bug: 1<p></p></p>
<p class="MsoNoSpacing">Bug <a href="https://bugs.meego.com/show_bug.cgi?id=25982">25982</a> - <span>Going back from a select item list releases the session<p></p></span></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Closed bug: 0<p></p></p>
<p class="MsoNoSpacing"><span>None</span><p></p></p>
<div><p class="MsoNoSpacing"><p>&nbsp;</p></p></div>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Test Result<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">SUMMARY<p></p></p>
<p class="MsoNoSpacing">Total Test Case&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 462<p></p></p>
<p class="MsoNoSpacing">Passed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 372<p></p></p>
<p class="MsoNoSpacing">Failed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<p></p></p>
<p class="MsoNoSpacing">Blocked&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 89<p></p></p>
<p class="MsoNoSpacing">TCs completed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100,0%<p></p></p>
<p class="MsoNoSpacing">Run rate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 81%<p></p></p>
<p class="MsoNoSpacing">Pass rate total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 81% (=)<p></p></p>
<p class="MsoNoSpacing">Blocked rate total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19% (=)<p></p></p>
<p class="MsoNoSpacing">Pass rate of executed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;100%<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">FEATURES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TOTAL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PASS&nbsp; FAIL&nbsp;&nbsp;&nbsp; BLOCKED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PASS %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MODEM USED<p></p></p>
<p class="MsoNoSpacing">Modem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100%&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smartphone using real SIM and Laptop + 3G Dongle (for PPP tests)<p></p></p>
<p class="MsoNoSpacing">Voice Calls&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 45&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90%&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smartphone using real SIM or Network Simulator<p></p></p>
<p class="MsoNoSpacing">Messaging&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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bsp;&nbsp; Laptop + Phonesim<p></p></p>
<p class="MsoNoSpacing">Call Settings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 69%&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smartphone using real SIM<p></p></p>
<p class="MsoNoSpacing">Supplementary Services&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 95%&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smartphone (using appropri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nbsp; 49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 52%&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Laptop + Phonesim<p></p></p>
<p class="MsoNoSpacing"><span><p>&nbsp;</p></span></p>
<p class="MsoNoSpacing">Please find details in the attached file.<p></p></p>
<div><p class="MsoNoSpacing"><p>&nbsp;</p></p></div>
<p class="MsoNoSpacing"><span><p>&nbsp;</p></span></p>
<p class="MsoNoSpacing">Notes<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Please note that I have found a crash of oFono when running two STK TCs in a row: <p></p></p>
<p class="MsoNoSpacing"><span><a href="https://bugs.meego.com/show_bug.cgi?id=25998">Bug&nbsp;25998</a> - oFono crashes when doing a NAA Initialization+File Change Notification after having done a NAA Initialization+Full File Change Notification with Phonesim</span>.<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">19% of cases are blocked due to:<p></p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Missing software (e.g.: Missing feature in Phonesim or missing a visual application for some blocked feature as Setup Idle ModeText, Select Item, Send SMS, etc.)<p></p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Missing hardware (e.g.: Missing other SIM (having appropriate service activated).<p></p></p>
<p class="MsoNoSpacing"><span>-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Feature not supported by oFono<p></p></p>
<p class="MsoNoSpacing"><p>&nbsp;</p></p>
<p class="MsoNoSpacing">Best regards,<p></p></p>
<p class="MsoNormal">Nicolas<p></p></p>
</div></div>
Viallard Anthony | 17 May 2013 12:33

Problem when disable GPRS context and try to re-enable it

Hello,

I start a new thread about a bad thing I seen. I can't re-enable a 
previously disabled context.

Here the command to reproduce the issue:

---------------------------
dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:false

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true
---------------------------

and bellow, the log:

---------------------------
ofonod[10347]: Modem: > AT+CGDCONT=1,"IP","gprs.swisscom.ch"\r
ofonod[10347]: Modem: < \r\nOK\r\n
ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
ofonod[10347]: Modem: > AT+CGDATA="PPP",1\r
ofonod[10347]: Modem: < \r\nCONNECT 115200\r\n
ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1
ofonod[10347]: drivers/atmodem/gprs-context.c:setup_ppp()
ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_connect()
ofonod[10347]: IP: 10.146.60.102
ofonod[10347]: DNS: 195.186.216.33, 195.186.152.33
ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
ofonod[10347]: plugins/udev.c:udev_event() subsystem net add
ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
ofonod[10347]: plugins/udevng.c:check_modem_list()
ofonod[10347]: 
drivers/atmodem/gprs-context.c:at_gprs_deactivate_primary() cid 1
ofonod[10347]: plugins/udevng.c:remove_device() 
/sys/devices/virtual/net/ppp0
ofonod[10347]: plugins/udev.c:udev_event() subsystem net remove
ofonod[10347]: plugins/udev.c:remove_modem() /devices/virtual/net/ppp0
ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_disconnect() Reason: 6
ofonod[10347]: Modem: < \r\nNO CARRIER\r\n

ofonod[10347]: drivers/atmodem/gprs-context.c:at_gprs_activate_primary() 
cid 1
ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
ofonod[10347]: src/gprs.c:pri_activate_callback() Activating context 
failed with error: Unknown error type
---------------------------

I read the code, added some logs and found the function 
at_chat_send_common() doesn't do his job because chat->command_queue is 
NULL.

I guess chat->command_queue is free and set to NULL in 
chat_cleanup(struct at_chat *chat) but I don't dig more why this 
function is call...

Any ideas ?

Regards,
Anthony Viallard.

--

-- 
-----------------------------------------
Viallard Anthony    (+41 024 455 24 82)
[ Embedded System | Software Designer ]
-----------------------------------------
   Syscom Instruments SA
   Rue de l'industrie 21
   1450     Sainte-Croix
-----------------------------------------
Paulo Borges | 16 May 2013 19:16

[RFC 00/22] HFP 1.6 AG implementation

PTS fails in tests related to codec negotiation when the driverless
approach to AG implementation is used. So I am sending this series that
uses card driver as a RFC to get feedback from the mailing list.

This series needs two not-yet-upstream patches from Vinicius Gomes.

Paulo Borges (22):
  include: Add ofono_emulator_create_card()
  emulator: Implement ofono_emulator_create_card()
  hfp_ag_bluez5: Create card when connect
  emulator: Register card when establish SLC
  emulator: Set local and remote address of card
  hfp_ag_bluez5: Check if card creation fails
  include: Add emulator init and cleanup functions
  emulator: Implement init and cleanup functions
  main: Call emulator init and cleanup functions
  emulator: Add HFP 1.6 AG card driver
  emulator: Set card driver
  hfp_ag_bluez5: Send HFP version to card creation
  hfp_ag_bluez5: Register HFP AG version 1.6
  emulator: Add AT+BAC support
  emulator: Add AT+BCC support
  emulator: Setup codec connection
  emulator: Add AT+BCS support
  emulator: Resend +BCS after receive AT+BAC
  emulator: Setup synchronous connection
  emulator: Reuse last negotiated codec
  emulator: Copy callback mechanism from atutil.h
  emulator: Implement AG card .Connect() for HFP 1.6

 include/emulator.h      |    2 +
 plugins/hfp_ag_bluez5.c |   55 +++++++-
 src/emulator.c          |  345 +++++++++++++++++++++++++++++++++++++++++++++++
 src/main.c              |    4 +
 src/ofono.h             |    3 +
 5 files changed, 408 insertions(+), 1 deletion(-)

--

-- 
1.7.9.5

Mikel Astiz | 8 May 2013 15:59
Picon

Testing the iPhone 5

Hi,

I promised Denis I'd send some traces after testing the iPhone 5 and
observing some strange states such as two active calls (test 1) or
active+dialing state (test 2).

I currently don't have a phone to test with but let me reuse some
previous logs. In the second log, the AT commands are not visible so
I'm hoping to repeat the experiment fairly soon.

The first test is probably a bug in oFono while the second one might
be the phone's behavior, to be confirmed.

Cheers,
Mikel

TEST 1:

Steps: Two numbers dialer from the phone while 3-way calling not
available in network
Result: Two active calls in oFono (but phone shows only the first one)

ofonod[14366]: < \r\n+CIEV: 3,2\r\n
ofonod[14366]: > AT+CLCC\r
ofonod[14366]: < \r\n+CLCC: 1,0,2,0,0,"<phone-number-1>",145\r\n
ofonod[14366]: < \r\nOK\r\n
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Got a
voicecall event, status: 2, id: 1, number: <phone-number-1>
called_number: , called_name
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Did not find a
call with id: 1
ofonod[14366]: < \r\n+CIEV: 3,3\r\n
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Got a
voicecall event, status: 3, id: 1, number: <phone-number-1>
called_number: , called_name
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Found call with id: 1
ofonod[14366]: < \r\n+CIEV: 5,5\r\n
ofonod[14366]: src/network.c:ofono_netreg_strength_notify() strength 100
ofonod[14366]: < \r\n+CIEV: 2,1\r\n
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Got a
voicecall event, status: 0, id: 1, number: <phone-number-1>
called_number: , called_name
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Found call with id: 1
ofonod[14366]: < \r\n+CIEV: 3,0\r\n

(At this point, a second call is dialed from the phone)

ofonod[14366]: < \r\n+CIEV: 3,2\r\n
ofonod[14366]: > AT+CLCC\r
ofonod[14366]: < \r\n+CLCC: 1,0,0,0,0,"<phone-number-1>",145\r\n
ofonod[14366]: < \r\n+CLCC: 2,0,2,0,0,"<phone-number-2>",129\r\n
ofonod[14366]: < \r\nOK\r\n
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Got a
voicecall event, status: 2, id: 2, number: <phone-number-2>
called_number: , called_name
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Did not find a
call with id: 2
ofonod[14366]: < \r\n+CIEV: 3,0\r\n
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Got a
voicecall event, status: 0, id: 2, number: <phone-number-2>
called_number: , called_name
ofonod[14366]: src/voicecall.c:ofono_voicecall_notify() Found call with id: 2

TEST 2:

Steps: Two numbers dialer from the phone (3-way calling available)
Result: oFono reports a active+dialing state until held+alerting is reached.

ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall
event, status: 2, id: 1, number: <phone-number-1> called_number: ,
called_name
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Did not find a
call with id: 1
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall
event, status: 3, id: 1, number: <phone-number-1> called_number: ,
called_name
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Found call with id: 1
ofonod[3281]: src/network.c:ofono_netreg_strength_notify() strength 100
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall
event, status: 0, id: 1, number: <phone-number-1> called_number: ,
called_name
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Found call with id: 1
ofonod[3281]: src/network.c:ofono_netreg_strength_notify() strength 80

(At this point, a second call is dialed from the phone)

ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Got a voicecall
event, status: 2, id: 2, number: <phone-number-2> called_number: ,
called_name
ofonod[3281]: src/voicecall.c:ofono_voicecall_notify() Did not find a
call with id: 2
ofonod[3281]: src/modem.c:modem_change_state() old state: 3, new state: 0
Vinicius Costa Gomes | 3 May 2013 02:47

[PATCH] handsfree-audio: Fix replying to an empty D-Bus message

In the case that ofono_handsfree_card_connect_sco() is called outside the
context of a .Connect() call, there's no message we need to reply.  This
happens, for example, when the HFP AG plugin initiates a SCO connection when
it receives an AT+BCC command from the HF.
---
 src/handsfree-audio.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index d78498a..5179ddd 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
 <at>  <at>  -248,7 +248,8  <at>  <at>  static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond,
 	}

 	if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) {
-		reply = __ofono_error_failed(card->msg);
+		if (card->msg)
+			reply = __ofono_error_failed(card->msg);
 		goto done;
 	}

 <at>  <at>  -258,9 +259,13  <at>  <at>  static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond,

 	close(sk);

-	reply = dbus_message_new_method_return(card->msg);
+	if (card->msg)
+		reply = dbus_message_new_method_return(card->msg);

 done:
+	if (card->msg == NULL)
+		return FALSE;
+
 	if (reply)
 		g_dbus_send_message(ofono_dbus_get_connection(), reply);

--

-- 
1.8.2.1

Paulo Borges | 26 Apr 2013 21:20

Re: [PATCH v2 09/12] emulator: Add HFP 1.6 AG card driver

Hi Denis,

On Fri, Apr 26, 2013 at 9:39 AM, Denis Kenzior <denkenz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Paulo,


On 04/26/2013 12:53 PM, Paulo Borges wrote:
Hi Denis,

On Thu, Apr 25, 2013 at 2:58 PM, Denis Kenzior <denkenz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<mailto:denkenz <at> gmail.com>> wrote:

    Hi Paulo,


    On 04/25/2013 02:09 PM, Paulo Borges wrote:

        ---
           src/emulator.c |   31 ++++++++++++++++++++++++++++++__-

           1 file changed, 30 insertions(+), 1 deletion(-)

        diff --git a/src/emulator.c b/src/emulator.c
        index 8ac79d5..5027b02 100644
        --- a/src/emulator.c
        +++ b/src/emulator.c
        <at> <at> -45,6 +45,8 <at> <at>

           #define RING_TIMEOUT 3

        +#define HFP_16_AG_DRIVER "hfp16-ag-driver"
        +
           struct ofono_emulator {
                 struct ofono_atom *atom;
                 enum ofono_emulator_type type;
        <at> <at> -1007,6 +1009,32 <at> <at> struct ofono_emulator
        *ofono_emulator_create(struct ofono_modem *modem,
                 return em;
           }

        +static int hfp16_card_probe(struct ofono_handsfree_card *card,
        +                                       unsigned int vendor,
        void *data)
        +{
        +       DBG("HFP 1.6 AG card driver probe");
        +
        +       return 0;
        +}
        +
        +static void hfp16_card_remove(struct ofono_handsfree_card *card)
        +{
        +       DBG("HFP 1.6 AG card driver remove");
        +}
        +
        +static void hfp16_card_connect(struct ofono_handsfree_card *card,
        +                       ofono_handsfree_card_connect___cb_t cb,

        void *data)
        +{
        +       DBG("HFP 1.6 AG card driver connect");
        +}
        +
        +static struct ofono_handsfree_card_driver hfp16_ag_driver = {
        +       .name           = HFP_16_AG_DRIVER,
        +       .probe          = hfp16_card_probe,
        +       .remove         = hfp16_card_remove,
        +       .connect        = hfp16_card_connect,
        +};
        +


    So why do we need this exactly?  There is already a default
    implementation inside handsfree_audio_card if the driver is NULL.
      How is this going to be different from the default implementation?


           static int card_set_local_remote(struct ofono_handsfree_card
        *card, int fd)
           {
                 struct sockaddr_rc saddr;
        <at> <at> -1338,9 +1366,10 <at> <at> void
        __ofono_emulator_set___indicator_forced(struct ofono_emulator *em,


           int __ofono_emulator_init(void)
           {
        -       return 0;
        +       return
        ofono_handsfree_card_driver___register(&hfp16_ag_driver);
           }

           void __ofono_emulator_cleanup(void)
           {
        +       ofono_handsfree_card_driver___unregister(&hfp16_ag_driver);

           }


    Regards,
    -Denis


When both roles support codec negotiation feature AG must first send an
unsolicited +BCS and only call the default implementation after HF
respond with AT+BCS [1].

[1] HFP 1.6 spec page 31: 4.11.3 "Codec Connection Setup".


This is where the spec is a bit fuzzy.  There is some room for interpretation on the timing of the codec negotiation exchange.

Can we do the codec negotiation before hand, not as part of the .connect implementation?  e.g. can we negotiate the codec right after SLC establishment and from then on simply establish the SCO link, or must we always perform codec negotiation right before the SCO link establishment?

Regards,
-Denis

Yes, we can negotiate the codec after an incoming AT+BAC command from HF. This way, we can ensure that the chosen codec is valid and we don't need to use a card driver.

I'll change this and send a new version.

--
Cheers,
Paulo.
<div><div dir="ltr">
<div class="gmail_extra">Hi Denis,</div>
<div class="gmail_extra">
<br><div class="gmail_quote">On Fri, Apr 26, 2013 at 9:39 AM, Denis Kenzior <span dir="ltr">&lt;<a href="mailto:denkenz@..." target="_blank">denkenz@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">Hi Paulo,<div class="im">
<br><br>
On 04/26/2013 12:53 PM, Paulo Borges wrote:<br>
</div>
<blockquote class="gmail_quote">
<div class="im">
Hi Denis,<br><br>
On Thu, Apr 25, 2013 at 2:58 PM, Denis Kenzior &lt;<a href="mailto:denkenz <at> gmail.com" target="_blank">denkenz@...</a><br>
</div>
<div class="im">
&lt;mailto:<a href="mailto:denkenz@..." target="_blank">denkenz <at> gmail.com</a>&gt;&gt; wrote:<br><br>
&nbsp; &nbsp; Hi Paulo,<br><br><br>
&nbsp; &nbsp; On 04/25/2013 02:09 PM, Paulo Borges wrote:<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; ---<br>
</div>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;src/emulator.c | &nbsp; 31 ++++++++++++++++++++++++++++++__-<div><div class="h5">
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 file changed, 30 insertions(+), 1 deletion(-)<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; diff --git a/src/emulator.c b/src/emulator.c<br>
&nbsp; &nbsp; &nbsp; &nbsp; index 8ac79d5..5027b02 100644<br>
&nbsp; &nbsp; &nbsp; &nbsp; --- a/src/emulator.c<br>
&nbsp; &nbsp; &nbsp; &nbsp; +++ b/src/emulator.c<br>
&nbsp; &nbsp; &nbsp; &nbsp;  <at>  <at>  -45,6 +45,8  <at>  <at> <br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#define RING_TIMEOUT 3<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; +#define HFP_16_AG_DRIVER "hfp16-ag-driver"<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;struct ofono_emulator {<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;struct ofono_atom *atom;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enum ofono_emulator_type type;<br>
&nbsp; &nbsp; &nbsp; &nbsp;  <at>  <at>  -1007,6 +1009,32  <at>  <at>  struct ofono_emulator<br>
&nbsp; &nbsp; &nbsp; &nbsp; *ofono_emulator_create(struct ofono_modem *modem,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return em;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; +static int hfp16_card_probe(struct ofono_handsfree_card *card,<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unsigned int vendor,<br>
&nbsp; &nbsp; &nbsp; &nbsp; void *data)<br>
&nbsp; &nbsp; &nbsp; &nbsp; +{<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; DBG("HFP 1.6 AG card driver probe");<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; return 0;<br>
&nbsp; &nbsp; &nbsp; &nbsp; +}<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br>
&nbsp; &nbsp; &nbsp; &nbsp; +static void hfp16_card_remove(struct ofono_handsfree_card *card)<br>
&nbsp; &nbsp; &nbsp; &nbsp; +{<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; DBG("HFP 1.6 AG card driver remove");<br>
&nbsp; &nbsp; &nbsp; &nbsp; +}<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br>
&nbsp; &nbsp; &nbsp; &nbsp; +static void hfp16_card_connect(struct ofono_handsfree_card *card,<br>
</div></div>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ofono_handsfree_card_connect___cb_t cb,<div class="im">
<br>
&nbsp; &nbsp; &nbsp; &nbsp; void *data)<br>
&nbsp; &nbsp; &nbsp; &nbsp; +{<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; DBG("HFP 1.6 AG card driver connect");<br>
&nbsp; &nbsp; &nbsp; &nbsp; +}<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br>
&nbsp; &nbsp; &nbsp; &nbsp; +static struct ofono_handsfree_card_driver hfp16_ag_driver = {<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; .name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = HFP_16_AG_DRIVER,<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; .probe &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= hfp16_card_probe,<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; .remove &nbsp; &nbsp; &nbsp; &nbsp; = hfp16_card_remove,<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; .connect &nbsp; &nbsp; &nbsp; &nbsp;= hfp16_card_connect,<br>
&nbsp; &nbsp; &nbsp; &nbsp; +};<br>
&nbsp; &nbsp; &nbsp; &nbsp; +<br><br><br>
&nbsp; &nbsp; So why do we need this exactly? &nbsp;There is already a default<br>
&nbsp; &nbsp; implementation inside handsfree_audio_card if the driver is NULL.<br>
&nbsp; &nbsp; &nbsp; How is this going to be different from the default implementation?<br><br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;static int card_set_local_remote(struct ofono_handsfree_card<br>
&nbsp; &nbsp; &nbsp; &nbsp; *card, int fd)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;struct sockaddr_rc saddr;<br>
&nbsp; &nbsp; &nbsp; &nbsp;  <at>  <at>  -1338,9 +1366,10  <at>  <at>  void<br>
</div>
&nbsp; &nbsp; &nbsp; &nbsp; __ofono_emulator_set___indicator_forced(struct ofono_emulator *em,<div class="im">
<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int __ofono_emulator_init(void)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; return 0;<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; return<br>
</div>
&nbsp; &nbsp; &nbsp; &nbsp; ofono_handsfree_card_driver___register(&amp;hfp16_ag_driver);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;void __ofono_emulator_cleanup(void)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; + &nbsp; &nbsp; &nbsp; ofono_handsfree_card_driver___unregister(&amp;hfp16_ag_driver);<div class="im">
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br><br>
&nbsp; &nbsp; Regards,<br>
&nbsp; &nbsp; -Denis<br><br><br>
When both roles support codec negotiation feature AG must first send an<br>
unsolicited +BCS and only call the default implementation after HF<br>
respond with AT+BCS [1].<br><br>
[1] HFP 1.6 spec page 31: 4.11.3 "Codec Connection Setup".<br><br>
</div>
</blockquote>
<br>
This is where the spec is a bit fuzzy. &nbsp;There is some room for interpretation on the timing of the codec negotiation exchange.<br><br>
Can we do the codec negotiation before hand, not as part of the .connect implementation? &nbsp;e.g. can we negotiate the codec right after SLC establishment and from then on simply establish the SCO link, or must we always perform codec negotiation right before the SCO link establishment?<br><br>
Regards,<br>
-Denis<br>
</blockquote>
</div>
<br><div class="gmail_extra">Yes, we can negotiate the codec after an incoming AT+BAC command from HF. This way, we can ensure that the chosen codec is valid and we don't need to use a card driver.</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">I'll change this and send a new version.</div>
<div><br></div>-- <br><div dir="ltr">Cheers,<div>Paulo.</div>
</div>
</div>
</div></div>
Vinicius Costa Gomes | 25 Apr 2013 21:05

[PATCH 1/3] include: Add ofono_handsfree_audio_has_defer_setup()

---
 include/handsfree-audio.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/handsfree-audio.h b/include/handsfree-audio.h
index 53e8ab1..846a032 100644
--- a/include/handsfree-audio.h
+++ b/include/handsfree-audio.h
 <at>  <at>  -53,6 +53,8  <at>  <at>  ofono_bool_t ofono_handsfree_card_set_codec(struct ofono_handsfree_card *card,

 ofono_bool_t ofono_handsfree_audio_has_wideband(void);

+ofono_bool_t ofono_handsfree_audio_has_defer_setup(void);
+
 void ofono_handsfree_card_set_data(struct ofono_handsfree_card *card,
 					void *data);
 void *ofono_handsfree_card_get_data(struct ofono_handsfree_card *card);
--

-- 
1.8.2.1

Paulo Borges | 25 Apr 2013 21:09

[PATCH v2 00/12] Add HandsfreeAudioCard to emulator

This patch series starts to implement HandsfreeAudioCard logic to Audio
Gateway role from HFP version 1.6 profile.

Changelog v2:

* Extract fd from emulator's GAtServer
* Add card driver for HFP 1.6 AG
* Send HFP version to card creation

Paulo Borges (12):
  include: Add ofono_emulator_create_card()
  emulator: Implement ofono_emulator_create_card()
  hfp_ag_bluez5: Create card when connect
  emulator: Register card when establish SLC
  emulator: Set local and remote address of card
  include: Add emulator init and cleanup functions
  emulator: Implement init and cleanup functions
  main: Call emulator init and cleanup functions
  emulator: Add HFP 1.6 AG card driver
  emulator: Set card driver
  hfp_ag_bluez5: Send HFP version to card creation
  hfp_ag_bluez5: Register HFP AG version 1.6

 include/emulator.h      |    2 +
 plugins/hfp_ag_bluez5.c |   55 ++++++++++++++++++++++-
 src/emulator.c          |  111 +++++++++++++++++++++++++++++++++++++++++++++++
 src/main.c              |    4 ++
 src/ofono.h             |    3 ++
 5 files changed, 174 insertions(+), 1 deletion(-)

--

-- 
1.7.9.5

Paulo Borges | 24 Apr 2013 19:13

[PATCH 0/6] Add HandsfreeAudioCard to emulator

This patch series starts to implement HandsfreeAudioCard logic to Audio
Gateway role from HFP version 1.6 profile:

* Patches 01 to 03 implement a function to add a new
HandsfreeAudioCard to an emulator and call it when a new connection
arrives.

* Patch 04 registers the card when the Service Level Connection is
established.

* Patches 05 and 06 stores the remote and local address in the card.

What is expected for upcoming series?

* Card driver for Audio Gateway version 1.6
* Handle specific AT commands from HFP version 1.6 (AT+BAC, ...)

Paulo Borges (6):
  include: Add ofono_emulator_create_card()
  emulator: Implement ofono_emulator_create_card()
  hfp_ag_bluez5: Create card when connect
  emulator: Register card when establish SLC
  emulator: Set local and remote address of card
  hfp_ag_bluez5: Send fd to card creation

 include/emulator.h      |    2 ++
 plugins/hfp_ag_bluez5.c |    8 ++++++
 src/emulator.c          |   63 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)

--

-- 
1.7.9.5

Vinicius Costa Gomes | 23 Apr 2013 23:21

[PATCH v2 1/3] bluez5: Unify bt_register_profile_* into a single function

It was a cause of confusion for little gain to have separate
functions for registering profiles with extra information, for
example "role" and "features". We remove those helper functions
in favor of a single one with more parameters, "role" and
"feature" when NULL, will be ignored.
---
 dundee/bluez5.c         |  4 ++--
 plugins/bluez5.c        | 17 +++++++----------
 plugins/bluez5.h        |  7 ++-----
 plugins/dun_gw_bluez5.c |  2 +-
 plugins/hfp_ag_bluez5.c |  2 +-
 plugins/hfp_hf_bluez5.c |  2 +-
 6 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/dundee/bluez5.c b/dundee/bluez5.c
index 3f9c646..79b5ade 100644
--- a/dundee/bluez5.c
+++ b/dundee/bluez5.c
 <at>  <at>  -379,8 +379,8  <at>  <at>  static void connect_handler(DBusConnection *conn, void *user_data)
 {
 	DBG("");

-	bt_register_profile_with_role(conn, DUN_GW_UUID, DUN_VERSION_1_2,
-				"dun_dt", DUN_DT_PROFILE_PATH, "client");
+	bt_register_profile(conn, DUN_GW_UUID, DUN_VERSION_1_2, "dun_dt",
+					DUN_DT_PROFILE_PATH, "client", 0);
 }

 int __dundee_bluetooth_init(void)
diff --git a/plugins/bluez5.c b/plugins/bluez5.c
index 0f997da..979076e 100644
--- a/plugins/bluez5.c
+++ b/plugins/bluez5.c
 <at>  <at>  -90,9 +90,10  <at>  <at>  done:
 	dbus_message_unref(reply);
 }

-int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
+int bt_register_profile(DBusConnection *conn, const char *uuid,
 					uint16_t version, const char *name,
-					const char *object, const char *role)
+					const char *object, const char *role,
+					uint16_t features)
 {
 	DBusMessageIter iter, dict;
 	DBusPendingCall *c;
 <at>  <at>  -114,6 +115,10  <at>  <at>  int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
 	if (role)
 		ofono_dbus_dict_append(&dict, "Role", DBUS_TYPE_STRING, &role);

+	if (features)
+		ofono_dbus_dict_append(&dict, "Features", DBUS_TYPE_UINT16,
+								&features);
+
 	dbus_message_iter_close_container(&iter, &dict);

 	if (!dbus_connection_send_with_reply(conn, msg, &c, -1)) {
 <at>  <at>  -130,14 +135,6  <at>  <at>  int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
 	return 0;
 }

-int bt_register_profile(DBusConnection *conn, const char *uuid,
-					uint16_t version, const char *name,
-							const char *object)
-{
-	return bt_register_profile_with_role(conn, uuid, version, name, object,
-									NULL);
-}
-
 void bt_unregister_profile(DBusConnection *conn, const char *object)
 {
 	DBusMessageIter iter;
diff --git a/plugins/bluez5.h b/plugins/bluez5.h
index 5b8c1f5..db24b1a 100644
--- a/plugins/bluez5.h
+++ b/plugins/bluez5.h
 <at>  <at>  -29,13 +29,10  <at>  <at> 
 #define HFP_HS_UUID	"0000111e-0000-1000-8000-00805f9b34fb"
 #define HFP_AG_UUID	"0000111f-0000-1000-8000-00805f9b34fb"

-int bt_register_profile_with_role(DBusConnection *conn, const char *uuid,
-					uint16_t version, const char *name,
-					const char *object, const char *role);
-
 int bt_register_profile(DBusConnection *conn, const char *uuid,
 					uint16_t version, const char *name,
-					const char *object);
+					const char *object, const char *role,
+					uint16_t features);

 void bt_unregister_profile(DBusConnection *conn, const char *object);

diff --git a/plugins/dun_gw_bluez5.c b/plugins/dun_gw_bluez5.c
index 9844092..faea12b 100644
--- a/plugins/dun_gw_bluez5.c
+++ b/plugins/dun_gw_bluez5.c
 <at>  <at>  -172,7 +172,7  <at>  <at>  static void gprs_watch(struct ofono_atom *atom,

 	if (modems->next == NULL)
 		bt_register_profile(conn, DUN_GW_UUID, DUN_GW_VERSION_1_0,
-					"dun_gw", DUN_GW_EXT_PROFILE_PATH);
+				"dun_gw", DUN_GW_EXT_PROFILE_PATH, NULL, 0);
 }

 static void modem_watch(struct ofono_modem *modem, gboolean added, void *user)
diff --git a/plugins/hfp_ag_bluez5.c b/plugins/hfp_ag_bluez5.c
index 59e84d2..245de21 100644
--- a/plugins/hfp_ag_bluez5.c
+++ b/plugins/hfp_ag_bluez5.c
 <at>  <at>  -233,7 +233,7  <at>  <at>  static void sim_state_watch(enum ofono_sim_state new_state, void *data)
 		return;

 	bt_register_profile(conn, HFP_AG_UUID, HFP_VERSION_1_5, "hfp_ag",
-						HFP_AG_EXT_PROFILE_PATH);
+					HFP_AG_EXT_PROFILE_PATH, NULL, 0);
 }

 static gboolean sim_watch_remove(gpointer key, gpointer value,
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 2b9275b..826796f 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
 <at>  <at>  -639,7 +639,7  <at>  <at>  static void connect_handler(DBusConnection *conn, void *user_data)
 	DBG("Registering External Profile handler ...");

 	bt_register_profile(conn, HFP_HS_UUID, HFP_VERSION_1_6, "hfp_hf",
-						HFP_EXT_PROFILE_PATH);
+					HFP_EXT_PROFILE_PATH, NULL, 0);
 }

 static gboolean has_hfp_ag_uuid(DBusMessageIter *array)
--

-- 
1.8.2.1

Vinicius Costa Gomes | 23 Apr 2013 00:53

[PATCH] hfp_hf_bluez5: Fix re-registering a modem for a device

Even for outgoing pairing requests we may receive the UUIDs property
changed after the device is paired and try to register it twice.

The easiest way to reproduce this is when Extended Inquiry Response is
supported.

When the device is paired, we receive the "Paired" PropertyChanged,
inside modem_register_from_proxy(), g_dbus_proxy_get_property() gets
the UUIDs extracted from the EIR data.  Later, when the service
discovery is finished, the UUIDs property is re-sent and both may
contain the HFP AG UUID.

Valgrind log:

ofonod[8157]: src/modem.c:ofono_modem_create() name:
hfp/org/bluez/hci0/dev_40_98_4E_32_D7_39, type: hfp
ofonod[8157]: src/modem.c:set_modem_property() modem 0x66a2db0 property Remote
ofonod[8157]: src/modem.c:set_modem_property() modem 0x66a2db0 property DevicePath
ofonod[8157]: src/modem.c:ofono_modem_register() 0x66a2db0
ofonod[8157]: plugins/hfp_hf_bluez5.c:hfp_probe() modem: 0x66a2db0
ofonod[8157]: Modem register failed on path /hfp/org/bluez/hci0/dev_40_98_4E_32_D7_39
ofonod[8157]: plugins/hfp_hf_bluez5.c:hfp_remove() modem: 0x66a2db0
ofonod[8157]: plugins/hfp_hf_bluez5.c:profile_new_connection() Profile handler NewConnection
ofonod[8157]: src/modem.c:get_modem_property() modem 0x66a2db0 property DevicePath
==8157== Invalid write of size 4
==8157==    at 0x4712A5: hfp_slc_info_init (slc.c:59)
==8157==    by 0x486B00: profile_new_connection (hfp_hf_bluez5.c:168)
==8157==    by 0x412C70: process_message.isra.4 (object.c:258)
==8157==    by 0x5381984: _dbus_object_tree_dispatch_and_unlock (in /usr/lib64/libdbus-1.so.3.7.2)
==8157==    by 0x5373C4F: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.2)
==8157==    by 0x4107B7: message_dispatch (mainloop.c:76)
==8157==    by 0x5089BCA: g_timeout_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
==8157==    by 0x5089044: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
==8157==    by 0x5089377: g_main_context_iterate.isra.24 (in /usr/lib64/libglib-2.0.so.0.3400.2)
==8157==    by 0x5089771: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
==8157==    by 0x41042B: main (main.c:249)
==8157==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==8157==
---
 plugins/hfp_hf_bluez5.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 2b9275b..86d8c72 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
 <at>  <at>  -713,6 +713,12  <at>  <at>  static void modem_register_from_proxy(GDBusProxy *proxy, const char *path)
 	if (g_dbus_proxy_get_property(proxy, "Address", &iter) == FALSE)
 		return;

+	modem = ofono_modem_find(device_path_compare, (void *) path);
+	if (modem) {
+		DBG("Modem for device %s already registered", path);
+		return;
+	}
+
 	dbus_message_iter_get_basic(&iter, &remote);

 	modem = modem_register(path, remote, alias);
--

-- 
1.8.2.1


Gmane