Last Comment Bug 817972 - [Bluetooth][File-Transfer] Support multiple files transferring
: [Bluetooth][File-Transfer] Support multiple files transferring
Status: VERIFIED FIXED
[fixed-in-birch]
:
Product: Firefox OS
Classification: Client Software
Component: Bluetooth (show other bugs)
: unspecified
: ARM Gonk (Firefox OS)
: -- normal (vote)
: 1.1 QE3 (26jun)
Assigned To: Eric Chou [:ericchou] [:echou]
: Walter Chen[:ypwalter][:wachen]
Mentors:
https://moztrap.mozilla.org/manage/ca...
: 859532 865083 874298 (view as bug list)
Depends on: 817930 830551 869287 965498
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-04 01:52 PST by iliu@mozilla.com, ianliu.moz@gmail.com
Modified: 2014-01-29 13:01 PST (History)
17 users (show)
amiller: in‑moztrap+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
leo+
-
wontfix
wontfix
fixed
fixed
wontfix
wontfix
fixed


Attachments
patch 1: v1: Add capability of sending multiple files to a remove device (11.01 KB, patch)
2013-04-24 02:01 PDT, Eric Chou [:ericchou] [:echou]
no flags Details | Diff | Review
patch 1: final: Add capability of sending multiple files to a remove device, r=gyeh (12.50 KB, patch)
2013-04-24 23:31 PDT, Eric Chou [:ericchou] [:echou]
no flags Details | Diff | Review
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406 (355 bytes, text/html)
2013-04-25 03:56 PDT, iliu@mozilla.com, ianliu.moz@gmail.com
no flags Details
patch 1: for b2g18 (17.83 KB, patch)
2013-06-12 20:48 PDT, Eric Chou [:ericchou] [:echou]
no flags Details | Diff | Review

Description iliu@mozilla.com, ianliu.moz@gmail.com 2012-12-04 01:52:51 PST
There is no definition of sharing multiple files in the spec. Bluetooth V2. Do we need to have the feature in V1?

STR:
==========
  1) Launch Gallery App
  2) Click selection button and go into selected mode
  3) Select multiple files(more than one file)
  4) Click share button

Expected:
==========
  It should show the option "Send To Bluetooth Device" to provide the feature. Then, let the selecting file send by Bluetooth.

Actual:
==========
  No way to share multiple files by Bluetooth.
Comment 1 iliu@mozilla.com, ianliu.moz@gmail.com 2012-12-04 01:57:32 PST
Hi Casey,
I need your definition and confirmation for the feature.
If we want to have the feature, should we show each progress(transferring task) per one file in the notification center?
Thank you.
Comment 2 Gina Yeh [:gyeh] [:ginayeh] 2012-12-04 03:46:35 PST
Hi Ian,

Bug 817930 is only for receiving multiple files. If we are going to support sending multiple files at one time, then I'll open a new one.
Comment 3 Walter Chen[:ypwalter][:wachen] 2012-12-04 09:32:45 PST
As far as my checking of v1 application status and other stuffs, I didn't see any user stories or requirement for multiple file transferring.
Comment 4 David Scravaglieri [:scravag] 2012-12-05 01:43:04 PST
Renominate if needed
Comment 5 Casey Yee 2012-12-06 17:00:10 PST
cc Clee to confirm but I'm pretty sure there is no requirement for V1 to be able to transfer multiple files using Bluetooth.

You should only be presented with the share option (with Bluetooth) in the individual image view screen and not in the multi-select gallery view screen.
Comment 6 iliu@mozilla.com, ianliu.moz@gmail.com 2012-12-06 19:40:09 PST
Hey developers and QA,
Thanks for all your confirmation.
Comment 7 Eric Chou [:ericchou] [:echou] 2013-04-08 18:43:31 PDT
*** Bug 859532 has been marked as a duplicate of this bug. ***
Comment 8 iliu@mozilla.com, ianliu.moz@gmail.com 2013-04-24 00:35:28 PDT
*** Bug 865083 has been marked as a duplicate of this bug. ***
Comment 9 Eric Chou [:ericchou] [:echou] 2013-04-24 02:01:47 PDT
Created attachment 741220 [details] [diff] [review]
patch 1: v1: Add capability of sending multiple files to a remove device

Add Gecko support for multiple file-trasfering. Users can select more than one photo in Gallery and send those to a paired Bluetooth device. Photos would be sent sequentially, which means that one photo at a time.
Comment 10 Gina Yeh [:gyeh] [:ginayeh] 2013-04-24 19:21:56 PDT
Comment on attachment 741220 [details] [diff] [review]
patch 1: v1: Add capability of sending multiple files to a remove device

Review of attachment 741220 [details] [diff] [review]:
-----------------------------------------------------------------

I'd like to review again with nits addressed and question answered.




Question: When shall we broadcast system messages of "bluetooth-opp-transfer-start" and "bluetooth-opp-transfer-complete"? In the case of sending multiple files sequentially, I think we should broadcast a start message right before sending out a put header request and broadcast a complete message right after receiving response code of a put final packet.

So, here's an example of what I expect.
-> Connect request
<- response code of Success
* Broadcast "bluetooth-opp-transfer-start" for the first file
-> PutHeader request
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the first file
* Broadcast "bluetooth-opp-transfer-start" for the second file
-> PutHeader request
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the second file
-> Disconnect request
<- response code: Success


Here's the actual process of this patch.
-> Connect request
* Broadcast "bluetooth-opp-transfer-start" for the first file
<- response code of Success
-> PutHeader request
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the first file
-> PutHeader request
* Broadcast "bluetooth-opp-transfer-start" for the second file
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the second file
-> Disconnect request
<- response code: Success

Since the actual result is different from what I expect, what do you think? Please let me know if I misunderstood something.

::: dom/bluetooth/BluetoothOppManager.cpp
@@ +392,3 @@
>     *  - Create an OPP connection by SendConnectRequest()
>     *  - After receiving the response, start to read file and send.
>     */

These comments are out-of-date, please update them.

@@ +1177,1 @@
>  

For the same reason here, I think we don't have to set mConnected to false in ReplyToDisconnect(), right?
Comment 11 Eric Chou [:ericchou] [:echou] 2013-04-24 23:31:34 PDT
Created attachment 741686 [details] [diff] [review]
patch 1: final: Add capability of sending multiple files to a remove device, r=gyeh

* nits fixed, and send system message "bluetooth-opp-transfer-start" before sending the first PUT header of each file. (SendPutHeaderRequest())
Comment 12 Gina Yeh [:gyeh] [:ginayeh] 2013-04-25 02:28:07 PDT
Comment on attachment 741686 [details] [diff] [review]
patch 1: final: Add capability of sending multiple files to a remove device, r=gyeh

Review of attachment 741686 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. 

Just want to point out here that, for the first file, "start" system message is broadcasted before sending Connect request (which is a bit different from what I expect at first but I think it should be ok), and here's the process of current patch:

* Broadcast "bluetooth-opp-transfer-start" for the first file
-> Connect request
<- response code of Success
-> PutHeader request
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the first file
* Broadcast "bluetooth-opp-transfer-start" for the second file
-> PutHeader request
<- response code: Success
-> Put request
<- response code: Continue
-> Put request
<- response code: Continue
-> PutFinal request
<- response code: Success
* Broadcast "bluetooth-opp-transfer-complete" for the second file
-> Disconnect request
<- response code: Success
Comment 13 Eric Chou [:ericchou] [:echou] 2013-04-25 03:22:56 PDT
(In reply to Gina Yeh [:gyeh] [:ginayeh] from comment #12)
> Comment on attachment 741686 [details] [diff] [review]
> patch 1: v2: Add capability of sending multiple files to a remove device
> 
> Review of attachment 741686 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good to me. 
> 
> Just want to point out here that, for the first file, "start" system message
> is broadcasted before sending Connect request (which is a bit different from
> what I expect at first but I think it should be ok), and here's the process
> of current patch:
> 
> * Broadcast "bluetooth-opp-transfer-start" for the first file
> -> Connect request
> <- response code of Success
> -> PutHeader request
> <- response code: Success
> -> Put request
> <- response code: Continue
> -> Put request
> <- response code: Continue
> -> PutFinal request
> <- response code: Success
> * Broadcast "bluetooth-opp-transfer-complete" for the first file
> * Broadcast "bluetooth-opp-transfer-start" for the second file
> -> PutHeader request
> <- response code: Success
> -> Put request
> <- response code: Continue
> -> Put request
> <- response code: Continue
> -> PutFinal request
> <- response code: Success
> * Broadcast "bluetooth-opp-transfer-complete" for the second file
> -> Disconnect request
> <- response code: Success

Yes, it's a little different but it's easier to implement and I don't think it would be problem.
Comment 14 Eric Chou [:ericchou] [:echou] 2013-04-25 03:29:22 PDT
This bug needs help from Gaia side as well. I'm going to reassign this bug to Ian and will test my patch along with his implementation.
Comment 15 iliu@mozilla.com, ianliu.moz@gmail.com 2013-04-25 03:56:41 PDT
Created attachment 741775 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406

Pointer to Github pull-request
Comment 16 iliu@mozilla.com, ianliu.moz@gmail.com 2013-04-25 04:06:54 PDT
Comment on attachment 741775 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406

* Remove the filter of sharing number.
* Use a for loop to send all sharing files.
* This is a WIP patch.
Comment 17 iliu@mozilla.com, ianliu.moz@gmail.com 2013-04-25 04:08:56 PDT
(In reply to Ian Liu [:ianliu] from comment #16)
> Comment on attachment 741775 [details]
> Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406
> 
> * Remove the filter of sharing number.
> * Use a for loop to send all sharing files.
> * This is a WIP patch.

Eric,
Please use "make reset-gaia" to flash with the patch. Thanks.
Comment 18 Eric Chou [:ericchou] [:echou] 2013-04-26 03:11:38 PDT
https://hg.mozilla.org/projects/birch/rev/a609b918e159
Comment 19 Eric Chou [:ericchou] [:echou] 2013-04-26 03:32:49 PDT
Comment on attachment 741775 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406

Hi Ian,

I've tested the patch. Most of the time it works well, however, once I tried to send a number of photos (say, more than 10), somtimes the operation

  var getRequest = storage.get(file);

wouldn't return any response, which means neither getRequest.onsuccess nor getRequest.onerror would be called. Would you please take a look at this part?

Thank you.
Comment 20 Ryan VanderMeulen [:RyanVM] 2013-04-26 13:46:48 PDT
https://hg.mozilla.org/mozilla-central/rev/a609b918e159
Comment 21 iliu@mozilla.com, ianliu.moz@gmail.com 2013-04-28 20:51:27 PDT
Because of gaia patch is not landed yet, I reopen the issue.
Comment 22 iliu@mozilla.com, ianliu.moz@gmail.com 2013-05-02 21:24:23 PDT
Comment on attachment 741775 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406

Eric,
After refined the coding style of storage.get(file), it looks working fine for me.

Evelyn,
Could you please help to review my pull request? Thank you.
Comment 23 Evelyn Hung [:evelyn] 2013-05-06 06:03:39 PDT
(In reply to Ian Liu [:ianliu] from comment #21)
> Because of gaia patch is not landed yet, I reopen the issue.

I think it's better to file another issue for tracking Gaia part implementation. Please file one, and submit your patch there. Thanks.
Comment 24 Evelyn Hung [:evelyn] 2013-05-06 06:08:35 PDT
Comment on attachment 741775 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/9406

I'll review on the new filed issue. Please request there again. Thanks.
Comment 25 iliu@mozilla.com, ianliu.moz@gmail.com 2013-05-06 19:26:32 PDT
Evelyn,
Thanks for your reviewing effort. Let's move the tracking Gaia part implementation to Bug 869287.
Comment 26 Tim Guan-tin Chien [:timdream] (please needinfo; OOO and on leave until July) 2013-05-06 21:04:11 PDT
(In reply to Ian Liu [:ianliu] from comment #21)
> Because of gaia patch is not landed yet, I reopen the issue.

Should we close this bug now the that Gaia part lives in bug 869287?
Comment 27 Eric Chou [:ericchou] [:echou] 2013-05-06 21:08:12 PDT
Close this bug since Gaia side implementation has been moved to bug 869287
Comment 28 Eric Chou [:ericchou] [:echou] 2013-05-20 19:23:27 PDT
*** Bug 874298 has been marked as a duplicate of this bug. ***
Comment 29 qingluo.wang 2013-05-20 20:12:31 PDT
Hi Daniel,

  Refer to bug 874298,I nominate this bug as tef?,please help to decide the priority.

Thank you.
Comment 30 Alex Keybl [:akeybl] 2013-05-22 10:17:02 PDT
https://bugzilla.mozilla.org/show_bug.cgi?id=874298#c1 suggests that this is out of scope for v1.0.1
Comment 31 Alex Keybl [:akeybl] 2013-05-24 10:12:59 PDT
Not blocking, please renominate if this is a blocker for you Daniel.
Comment 32 Walter Chen[:ypwalter][:wachen] 2013-06-06 07:17:08 PDT
we should add a test cases for this.
Comment 33 leo.bugzilla.gecko 2013-06-09 19:02:06 PDT
Dear Mozilla Team,

We should support this feature, so I nominate this bug as leo?.
Please check this.

Thanks.
Comment 34 David Scravaglieri [:scravag] 2013-06-10 01:16:46 PDT
Leo will check with the Bluetooth Team to figure out if this feature is still requested as It will need work in gaia too.
Comment 35 iliu@mozilla.com, ianliu.moz@gmail.com 2013-06-10 04:13:20 PDT
Gaia part: Bug 869287 - [Bluetooth][File-Transfer] Remove the transfer restriction on the number of files
Comment 36 leo.bugzilla.gecko 2013-06-10 07:26:51 PDT
OK. I checked the gaia part and nominate bug 869287 too.
Thanks for your help.
Comment 37 Ryan VanderMeulen [:RyanVM] 2013-06-11 06:46:54 PDT
https://hg.mozilla.org/releases/mozilla-b2g18/rev/a83f9ca78c33

This definitely required some fixing up to apply to b2g18. Probably want to look it over to make sure all's well :)
Comment 39 Eric Chou [:ericchou] [:echou] 2013-06-12 20:48:03 PDT
Created attachment 761860 [details] [diff] [review]
patch 1: for b2g18

* Rebased b2g18-specific patch
Comment 40 Eric Chou [:ericchou] [:echou] 2013-06-12 20:50:55 PDT
https://hg.mozilla.org/releases/mozilla-b2g18/rev/d85aa34a49f2
Comment 42 Walter Chen[:ypwalter][:wachen] 2013-06-16 18:42:45 PDT
Verified fixed in 2013/06/16 V1train pvt build.
Gaia:     f2d6ed54a236e6e3b94f0abad9f0dacb8a1cc7b3
  B-D     2013-06-15 07:33:44
Gecko:    http://hg.mozilla.org/releases/mozilla-b2g18/rev/15d9885034a0
BuildID   20130616070209
Version   18.0

Tried to transfer images and music. 
It worked pretty smooth,

Note You need to log in before you can comment on or make changes to this bug.