how to start dedicated bearer through libqmi?

Dan Williams dcbw at redhat.com
Tue Oct 4 17:25:54 UTC 2016


On Fri, 2016-09-23 at 16:58 -0500, Dan Williams wrote:
> On Fri, 2016-09-23 at 21:23 +0000, Chen, Jing wrote:
> > 
> > Hi, Dan:
> > 
> > Thank you so much for your response!
> > 
> > I need to send multiple data traffics with different TFT on
> > secondary
> > PDP contexts/dedicated bearers after primary/default is connected.
> > I
> > saw a definition  of profile in Gobi driver. I am wondering: has
> > libqmi implemented corresponding function as well? 
> 
> Jing,
> 
> GetProfileList and GetProfileSettings are implemented, but
> CreateProfile isn't yet.  ModifyProfile almost certainly could be a
> copy & paste of CreateProfile's JSON with an update to the "id"
> field.

I ended up implementing this last week in the dcbw/wds-updates branch
here:

https://cgit.freedesktop.org/libqmi/log/?h=dcbw/wds-updates

with support for the missing UMTS and LTE QoS stuff.  You should now be
able to create a new profile with CreateProfile and your requested QoS
settings, then pass the returned profile index to StartNetwork's
"Profile Index 3GPP" TLV to use them.

Note that we've seen issues with some CDMA multi-mode devices (like the
UML290) returning bogus TLV data for GetProfileSettings, even when
asking for UMTS profiles that the devices should support.  Other
devices seem to need more input TLVs than just the profile number
(Huawei E397 returns "MalformedRequest" but still includes all the
relevant TLVs anyway).  So YMMV.

Dan

> I've pushed a WDS JSON update adding CreateProfile if you want to
> take
> a stab at filling out the following TLVs:
> 
> UMTSRequestedQoS
> UMTSMinimumQoS
> TrafficFlowTemplateID1Parameters
> TrafficFlowTemplateID2Parameters
> LTEQoSParameters
> 
> which you're probably interested in.  The only not-simple thing about
> these is creating the GLib enums for the enum values in these values.
> 
> Take a look at:
> 
> gobi-api/GobiAPI_2012-09-12-
> 0719/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h
> 
> for the string "WDSCreateProfileRequest" which should hit all the
> TLVs
> that QMI supported in a somewhat older version of the WDS service.
>  Let
> me know if this is something you'd be interested in decoding and I'm
> happy to describe the steps.  Might take a couple hours, but not too
> long.
> 
> Dan
> 
> > 
> > 
> > Jing
> > 
> > 
> > -----Original Message-----
> > From: Dan Williams [mailto:dcbw at redhat.com> > Sent: Friday, September 23, 2016 2:37 PM
> > To: Chen, Jing; libqmi-devel at lists.freedesktop.org
> > Subject: Re: how to start dedicated bearer through libqmi?
> > 
> > On Thu, 2016-09-15 at 20:37 +0000, Chen, Jing wrote:
> > > 
> > > 
> > > Hello, Everybody:
> > > Could libqmi do fine operations/controls on the connected QMI
> > > device?
> > > For example, "+CGACT" is the AT command to control each PDP
> > > context
> > > or 
> > > bearer. And, "+CGDATA" is the AT command to send data traffic
> > > through 
> > > specific context ID.
> > > 
> > > What is the corresponding API function in libqmi to achieve the
> > > same 
> > > goals? I know there is a function "qmi_client_wds_start_network"
> > > could start network, with "ifconfig wwan0 up" + "dhclient wwan0 "
> > > system commands followed to have the interface up and an IP
> > > address 
> > > allocated.
> > > 
> > > If my target is to control each default/dedicated bearer in the 
> > > connected QMI device, assuming the hardware supported, how could
> > > I
> > > use 
> > > libqmi to achieve my goal? Thank you so much!
> > 
> > From what we understand, what QMI calls "Profiles" are equivalent
> > to
> > PDP contexts.  So WDS' GetProfileList command should return the
> > list
> > of contexts, and WDS GetProfileSettings would return the actual
> > settings of the context.
> > 
> > The CGDATA analogue in QMI would pretty much be WDS StartNetwork.
> >  That would of course also include doing the stuff CGACT does.
> > 
> > I'm not sure about the CGACT analogue; I could be wrong but I don't
> > think the GoActive/GoDormant stuff isn't related to context
> > activation, that's more for power control while active.
> > 
> > The CGATT analogue for CGATT would be NAS InitiateAttachRequest.
> > 
> > On a slightly higher level, what are you trying to do with the
> > bearers?
> >  That might help narrow things down.
> > 
> > Dan
> > 
> > > 
> > > 
> > > [cid:image001.png at 01D20F56.5B7FC530]
> > > 
> > > Jing Chen
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Spirent Communications e-mail confidentiality.
> > > ---------------------------------------------------------------
> > > ----
> > > -----
> > > This e-mail contains confidential and / or privileged
> > > information 
> > > belonging to Spirent Communications plc, its affiliates and / or 
> > > subsidiaries. If you are not the intended recipient, you are
> > > hereby 
> > > notified that any disclosure, copying, distribution and / or the 
> > > taking of any action based upon reliance on the contents of this 
> > > transmission is strictly forbidden. If you have received this
> > > message 
> > > in error please notify the sender by return e-mail and delete it
> > > from 
> > > your system.
> > > 
> > > Spirent Communications plc
> > > Northwood Park, Gatwick Road, Crawley, West Sussex, RH10 9XN,
> > > United 
> > > Kingdom.
> > > Tel No. +44 (0) 1293 767676
> > > Fax No. +44 (0) 1293 767677
> > > 
> > > Registered in England Number 470893
> > > Registered at Northwood Park, Gatwick Road, Crawley, West Sussex,
> > > RH10 9XN, United Kingdom.
> > > 
> > > Or if within the US,
> > > 
> > > Spirent Communications,
> > > 27349 Agoura Road, Calabasas, CA, 91301, USA.
> > > Tel No. 1-818-676- 2300
> > > _______________________________________________
> > > libqmi-devel mailing list
> > > libqmi-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel


More information about the libqmi-devel mailing list