Hi experts,
Still fighting with IAP,
I can find an IAP (the one I use daily at home), pass it to QNetworkSession, but when I try to open de conexion it the device says it is open BUT IT IS NOT. Even when the modem is tunr off it says the session is open.
Any clue????
My code:
#include <qmobilityglobal.h>
#include <qnetworksession.h>
#include <QNetworkConfigurationManager>
#include <QNetworkConfiguration>
QTM_USE_NAMESPACE //(2)
QNetworkSession* session;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QNetworkConfigurationManager manager;
const bool selectIap = (manager.capabilities()& QNetworkConfigurationManager::CanStartAndStopInterfaces);
QNetworkConfiguration defaultIap = manager.defaultConfiguration();
if(!defaultIap.isValid() && (!selectIap && defaultIap.state() != QNetworkConfiguration::Active))
{
// let the user know that there is no access point available
qDebug("no IAP");
}
else{ qDebug(defaultIap.name().toAscii());
qDebug(defaultIap.bearerName().toAscii());
}
session = new QNetworkSession(defaultIap,&a);
QObject::connect(session,SIGNAL(opened()),&w,SLOT(conectado()));
QObject::connect(session,SIGNAL(error(QNetworkSession::SessionError)),&w,SLOT(conectado()));
session->open();
session->waitForOpened();
if (session->isOpen())qDebug("open");
AND the .pro:
-----------------------------------
QT += core gui network
TARGET = untitled5
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY = bearer
symbian {
TARGET.UID3 = 0xe0b3a492
TARGET.CAPABILITY += NetworkServices ReadUserData
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}
THANKS



