Closed Bug 794342 Opened 12 years ago Closed 11 years ago

B2G 3G: Handle multiple sharing on one APN connection

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 837488

People

(Reporter: swu, Assigned: kchang)

References

Details

Attachments

(1 file)

For some operators, different applications(ex: Data, MMS, A-GPS) share one APN connection, instead of going through multiple APNs separately.

In the shared condition, there are several things we need to consider:

1. If user has data APN disabled, the user may want to avoid any data call charge.  Do we allow MMS to activate the data APN when there's MMS message to send/receive?

2. If the previous case is true, then we need a way to handle multiple sharing, for example, by reference count.  Think about the case that both MMS and A-GPS wants to use the data APN.

3. If MMS activates data APN when data APN disabled by user, we should only enable the routes necessary for MMS, and we should not set navigator.mozMobileConnection.data.connected and navigator.onLine to true.
Adding Beatriz and Jose Antonio, perhaps they can help us answer these questions.
(In reply to Shian-Yow Wu from comment #0)
> For some operators, different applications(ex: Data, MMS, A-GPS) share one
> APN connection, instead of going through multiple APNs separately.
> 
> In the shared condition, there are several things we need to consider:
> 
> 1. If user has data APN disabled, the user may want to avoid any data call
> charge.  Do we allow MMS to activate the data APN when there's MMS message
> to send/receive?
Some operators has MMS service included in the APN data tariff and others don't regarless of the APN value.
In case of movistar Spain, the MMS/AGPS/Data APN is the same but the traffic has different tarifications. MMS and AGPS data traffic should be alllowed when data is disabled becasuse:
- MMS has a different tarification, not included in data plan and the incoming MMS are free.
- AGPS service, there is a AGPS server in movistar Spain, with SUPL traffic FREE. But this is only when using movistar AGPS server, not for any other provider. This is very specific case.
> 
> 2. If the previous case is true, then we need a way to handle multiple
> sharing, for example, by reference count.  Think about the case that both
> MMS and A-GPS wants to use the data APN.
Yes, we need a way to handle it. This is a real situation in Spain with movistar.
> 
> 3. If MMS activates data APN when data APN disabled by user, we should only
> enable the routes necessary for MMS, and we should not set
> navigator.mozMobileConnection.data.connected and navigator.onLine to true.
Yes, this is true, enable only MMS but not email, FB or any other data sync.

If you had additional question, feel free to contact me.
Thanks for these information, Beatriz.
Blocks: b2g-3g
Summary: B2G RIL: Handle multiple sharing on one APN connection → B2G 3G: Handle multiple sharing on one APN connection
Assignee: nobody → kchang
Attachment #678667 - Flags: review?(vyang)
Comment on attachment 678667 [details] [diff] [review]
Bug 794343 patch V1

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

You're adding a PUBLIC entry that is visible by the content process. For this reason, I think I have to give a r-.

::: dom/system/gonk/NetworkManager.js
@@ +222,5 @@
> +      }
> +      //Add a virtual network interface.
> +      let key = network.name + "-" + network.type;
> +      this.networkInterfaces[key] = network;      
> +      return;

What happens when you're:

  Step 1. register MMS interface only
  Step 2. unregister MMS interface
  // What's the MMS host route state? What's the default route state?

Or,

  Step 1. register data connection
  Step 2. register MMS connection
  Step 3. unregister data connection
  // What's the MMS host route state? What's the default route state?

DO NOT add multiple alias interfaces for shared connections. It will only brings troubles.

::: dom/system/gonk/RadioInterfaceLayer.js
@@ +836,5 @@
>     * Handle data errors
>     */
>    handleDataCallError: function handleDataCallError(message) {
>      // Notify data call error only for data APN
> +    if ((message.apn == this.dataNetworkInterface["default"].dataCallSettings["apn"]) &&

It seems this patch is based on bug 794336 but that's not listed in dependent bugs.

@@ +1026,5 @@
>      if (this.dataNetworkInterface["default"].state == RIL.GECKO_NETWORK_STATE_CONNECTING ||
>          this.dataNetworkInterface["default"].state == RIL.GECKO_NETWORK_STATE_DISCONNECTING) {
> +
> +      //If user enable the data connection in disconnecting state, 
> +      //we should check if there is already a data connection. 

That's a multi-line comment, please use /** ... */ and mind tailing white spaces.
Attachment #678667 - Flags: review?(vyang) → review-
Depends on: 794336
::: dom/system/gonk/NetworkManager.js
@@ +222,5 @@
> +      }
> +      //Add a virtual network interface.
> +      let key = network.name + "-" + network.type;
> +      this.networkInterfaces[key] = network;      
> +      return;

What happens when you're:

>   Step 1. register MMS interface only
It doesn't enter these codes; It follows the original design to add "rmnet0" interface into the networkInterfaces[].
>   Step 2. unregister MMS interface.
It also follows the original design to delete "rmnet0" interface from the networkInterfaces[].

> Or,
> 
>   Step 1. register data connection
To add "rmnet0" interface , default route, and data host route.
>   Step 2. register MMS connection
Only to add the virtual network interface,"rmnet0-2".
>   Step 3. unregister data connection.
To remove "rmnet0" interface, default route, and host route.

Moreover, because these interfaces with same APN unregister their network interfaces at the same time when the connection is ended, the RadioInterfaceLayer will also unregister MMS interface right away. 

> 
> DO NOT add multiple alias interfaces for shared connections. It will only
> brings troubles.
I will think another implementation for this problem.

> ::: dom/system/gonk/RadioInterfaceLayer.js
> @@ +836,5 @@
> >     * Handle data errors
> >     */
> >    handleDataCallError: function handleDataCallError(message) {
> >      // Notify data call error only for data APN
> > +    if ((message.apn == this.dataNetworkInterface["default"].dataCallSettings["apn"]) &&
> 
> It seems this patch is based on bug 794336 but that's not listed in
> dependent bugs.
I have added the dependency between these 2 bugs.

> @@ +1026,5 @@
> >      if (this.dataNetworkInterface["default"].state == RIL.GECKO_NETWORK_STATE_CONNECTING ||
> >          this.dataNetworkInterface["default"].state == RIL.GECKO_NETWORK_STATE_DISCONNECTING) {
> > +
> > +      //If user enable the data connection in disconnecting state, 
> > +      //we should check if there is already a data connection. 
> 
> That's a multi-line comment, please use /** ... */ and mind tailing white
> spaces.
I will modify it.
Depends on: 837488
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
No longer depends on: 837488
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: