Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 24
Registered: ‎02-07-2013
My Device: Z10
My Carrier: Company

ifconfig result



I am currently checking the network condition with the "ifconfig -v" command via QProcess.

However, I found that different device model return different value of the network interface.


For example the WiFI of the device STA100-1 is "bcm0", but it is "tiw_drv0" in STL100-1.

It is confused that different device provides different interface name.

I want to know all "tags" of different device models.

It is better to have documentation for it.

Otherwise I cannot support all devices.


Thank you very much.


Here is the model list that I have at this moment.


Posts: 292
Registered: ‎07-25-2008
My Device: Passport

Re: ifconfig result

There is a much better way of doing this.  Use QNetworkConfigurationManager to return a list of QNetworkConfiguration objects.  These objects have a property called "bearerType", which can tell you what kind of interface it is.  In practice, I've only seen this return two of the possible values: "BearerWLAN" for WiFi, and "Bearer2G" for the cellular network.  However, this will tell you what you want to know.


(If you really need something like ifconfig output, there's also the QNetworkInterface class, but it may take some work to match it up with the results from QNetworkConfigurationManager.)

Posts: 24
Registered: ‎02-07-2013
My Device: Z10
My Carrier: Company

Re: ifconfig result

I already know both Classes, but they are not sufficient my need.

What I want is not just the WiFi/ Cellular network.

QNetworkConfigurationManager doesn't provide the ip addrees for those networks and it doesn't fully access all entries from ifconfig.

QNetworkInterface only provide all IP addresses that current device has, but not the information to match up to WiFi/Cellular.

From ifconfig, I can also get information about USB, BlueTooth, even other network interface information.

That's what I need.

BlackBerry Development Advisor
Posts: 57
Registered: ‎10-04-2012
My Device: developer
My Carrier: none

Re: ifconfig result

Posts: 24
Registered: ‎02-07-2013
My Device: Z10
My Carrier: Company

Re: ifconfig result

IsaacGordezky wrote:

The native netstatus api has more detailed information available:


But it doesn't provide the data traffic information, right?