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

Regular Contributor
Posts: 63
Registered: ‎08-05-2013
My Device: Blackberry-10 webworks
My Carrier: zcon

why QNetwork Interface returns "tiw_p2pgrp0" for cellular networks?



I used QNetworkInterface of blackberry 10 cascades for getting interfaces which are currently running. Initially it will return "bptp0" for cellular network and  QNetworkInterface::IsUp and QNetworkInterface::IsRunning returns true. 

But when I reset my mobile and upgrade the os to 10.2 QNetworkInterface returns "tiw_p2pgrp0" for cellular and 

QNetworkInterface::IsUp returns false. 

I am not able to understand why interface name is changed? Is there any setting required to get cellular data.

Here is my code:

      if ( !foundMatch )
	    	         possibleMatches.push_back( ip );
	    	        QString program = "ifconfig";
			QStringList arguments;
			QString interfaceName=ifaces[i].humanReadableName();
			qDebug()<<"interface in getConnection "<<interfaceName;
			 bool isup = (bool)(flags & ifaces[i].IsUp);
			 bool isrun = (bool)(flags & ifaces[i].IsRunning);
			qDebug()<<"interface "<<interfaceName <<"isup"<< isup<<"isRun"<<isrun;

			if(isup && isrun)
				arguments << "-v" << interfaceName;
				myProcess = new QProcess(this);
				connect(myProcess, SIGNAL(readyReadStandardOutput()), this,                      SLOT(printOutput()));
				connect(myProcess, SIGNAL(readyReadStandardError()), this, SLOT(printError()));
				myProcess->start(program, arguments);





Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: why QNetwork Interface returns "tiw_p2pgrp0" for cellular networks?



bptp0 is a virtual peer-2-peer network interface that's used for things like Remote File Access - it's not the cell network...



Rob is no longer associated with BlackBerry.