locked
How to get data usage notification

    Question

  • Hi,
    I am working on a mobile broadband campanion app.
    I am interested in getting data usage notification.
    Docs say we can use system trigger to get notification when there is change of 5% in data usage.
    But for that I believe we need to set cost (data limit).

    I tried to set cost through provisioning.
    Most example on net add cost element in DefaultProfile.
    But I am getting error while using this xml as Cost is not part of DefaultProfile.
    <?xml version="1.0"?>
     <CarrierProvisioning xmlns="http://www.microsoft.com/networking/CarrierControl/v1">
         <Global>
             <CarrierId>{00000000-1111-2222-3333-444444444444}</CarrierId>
             <SubscriberId>1234567890</SubscriberId>
         </Global>
         <MBNProfiles>
           <DefaultProfile xmlns="http://www.microsoft.com/networking/CarrierControl/WWAN/v1">
               <Name>Profile Name</Name>
               <Description>The Description</Description>
                 <Cost xmlns="http://www.microsoft.com/networking/CarrierControl/DUSM/v1" PlanType="Fixed" OverDataLimit="true" Congested="true">
                     <UsageInMegabytes Timestamp="2002-05-30T09:30:10+06:00">25</UsageInMegabytes>
                     <DataLimitInMegabytes>10</DataLimitInMegabytes>
                     <BillingCycle StartDate="2011-09-30T09:30:10+06:00" Duration="P1Y4M20DT2H34M78S" Resets="false"></BillingCycle>
                     <BandwidthInKbps>5</BandwidthInKbps>
                     <MaxDownloadFileSizeInMegabytes>25</MaxDownloadFileSizeInMegabytes>
                     <CarrierPolicy>
                         <SecurityUpdatesExempt>true</SecurityUpdatesExempt>
                     </CarrierPolicy>
                 </Cost>
               <HomeProviderName>Contoso</HomeProviderName>
               <Context>
                   <AccessString>apn</AccessString>
                   <UserLogonCred>
                       <UserName>username</UserName>
                       <Password>password</Password>
                   </UserLogonCred>
               </Context>
           </DefaultProfile>
     
        </MBNProfiles>
     </CarrierProvisioning>

     

    Is there any other way to set Datalimit. 

    Thanks, 
    Win8 dev

    Saturday, June 02, 2012 3:33 PM

Answers

  • Hi Eric,
    Thanks for looking into it.
    I found that we can add Plans to CarrierProvisioning.
    But If I add Plan then I get error 82170013 in Plan.
    Where can I find the meaning of this error.

    Thanks,
    Win8 Dev

    Error 0x82170013 means that there was a plan defined but does not link to any profiles. In other words, the Plan name for the plan (Plans/Plan/@name) does not match to the associated plan name in the MBN profile (MBNProfiles/MBNProfile/AssociatedPlan).


    Friday, June 15, 2012 10:53 PM
    Moderator

All replies

  • Win8 Dev,

    I will look into this for you.

    Best Wishes - Eric

    Sunday, June 03, 2012 5:21 AM
    Moderator
  • Hi Eric,
    Thanks for looking into it.
    I found that we can add Plans to CarrierProvisioning.
    But If I add Plan then I get error 82170013 in Plan.
    Where can I find the meaning of this error.

    Thanks,
    Win8 Dev

    Monday, June 04, 2012 2:38 PM
  • DataLimit is set in the Plan.  In the profile, you set an AssociatedPlan which matches the Plan’s Name.  A single Plan can be tied to multiple (MBN, Wi-Fi) profiles.  Could you send a pointer to the documentation which shows the Cost directly embedded in the plan?  That needs to be updated if it hasn’t been already.

    Best Wishes - Eric

    Wednesday, June 06, 2012 11:25 PM
    Moderator
  • Hi Eric,

    What is the schema AssociatedPlan, online docs just say TBD.

    I am not able to set the Plans in CarrierControlSchema, I get error 82170013 when I add Plans to CarrierControlSchema.
    What does this error signifies. Can you provide me an example for Plans.

    Thanks,

    Win8 Dev

    Thursday, June 07, 2012 11:28 AM
  • Win8 Dev,

    Could you send me a pointer to the docs that say TBD? 

    Best Wishes - Eric

    Friday, June 08, 2012 6:23 AM
    Moderator
  • http://msdn.microsoft.com/en-us/library/windows/apps/hh868443.aspx

    Description says TBD.

    How would we use AssociatedPlan if we are not able to set a Plan

    Friday, June 08, 2012 11:01 AM
  • Win 8 Dev,

    I have reported the doc issue.  I am also looking into this for you.

    Best Wishes - Eric

    Wednesday, June 13, 2012 3:30 AM
    Moderator
  • Thanks for looking into this Eric.

    Would you know if system trigger NetworkStateChange also fires when there is a change in data usage by more then 5%.

    Are there any triggers that monitor connection data usage.

    Thanks,

    Win8 Dev

    Wednesday, June 13, 2012 10:35 AM
  • Hi Eric,
    Thanks for looking into it.
    I found that we can add Plans to CarrierProvisioning.
    But If I add Plan then I get error 82170013 in Plan.
    Where can I find the meaning of this error.

    Thanks,
    Win8 Dev

    Error 0x82170013 means that there was a plan defined but does not link to any profiles. In other words, the Plan name for the plan (Plans/Plan/@name) does not match to the associated plan name in the MBN profile (MBNProfiles/MBNProfile/AssociatedPlan).


    Friday, June 15, 2012 10:53 PM
    Moderator