modify connection property
This commit is contained in:
parent
f04dff6299
commit
c8fb25edee
|
@ -124,7 +124,6 @@ void modifyEapMethodPeapSettings(NetworkManager::ConnectionSettings::Ptr connSet
|
|||
|
||||
QList<NetworkManager::Security8021xSetting::EapMethod> list;
|
||||
list.append(NetworkManager::Security8021xSetting::EapMethod::EapMethodPeap);
|
||||
wifi_8021x_sett->setInitialized(true);
|
||||
wifi_8021x_sett->setEapMethods(list);
|
||||
wifi_8021x_sett->setPhase2AuthMethod((NetworkManager::Security8021xSetting::AuthMethod)peapInfo.phase2AuthMethod);
|
||||
wifi_8021x_sett->setIdentity(peapInfo.userName);
|
||||
|
|
|
@ -72,12 +72,12 @@ public:
|
|||
bool bChanged;
|
||||
};
|
||||
|
||||
void assembleEapMethodTlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTlsInfo &);
|
||||
void assembleEapMethodPeapSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodPeapInfo &);
|
||||
void assembleEapMethodTtlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTtlsInfo &);
|
||||
void assembleEapMethodTlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTlsInfo &tlsInfo);
|
||||
void assembleEapMethodPeapSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodPeapInfo &peapInfo);
|
||||
void assembleEapMethodTtlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTtlsInfo &ttlsInfo);
|
||||
|
||||
void modifyEapMethodTlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTlsInfo &);
|
||||
void modifyEapMethodPeapSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodPeapInfo &);
|
||||
void modifyEapMethodTtlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTtlsInfo &);
|
||||
void modifyEapMethodTlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTlsInfo &tlsInfo);
|
||||
void modifyEapMethodPeapSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodPeapInfo &peapInfo);
|
||||
void modifyEapMethodTtlsSettings(NetworkManager::ConnectionSettings::Ptr connSettingPtr, const KyEapMethodTtlsInfo &ttlsInfo);
|
||||
|
||||
#endif // KYENTERPRICESETTINGINFO_H
|
||||
|
|
|
@ -52,13 +52,16 @@ NetworkManager::ConnectionSettings::Ptr assembleWirelessSettings(const KyWireles
|
|||
wifi_sett->setSsid(connSettingInfo.m_ssid.toUtf8());
|
||||
wifi_sett->setSecurity("802-11-wireless-security");
|
||||
|
||||
NetworkManager::WirelessSecuritySetting::Ptr security_sett
|
||||
= settings->setting(NetworkManager::Setting::WirelessSecurity).dynamicCast<NetworkManager::WirelessSecuritySetting>();
|
||||
security_sett->setInitialized(true);
|
||||
security_sett->setKeyMgmt((NetworkManager::WirelessSecuritySetting::KeyMgmt)connSettingInfo.m_type);
|
||||
if (KyKeyMgmt::SAE == connSettingInfo.m_type || KyKeyMgmt::WpaPsk == connSettingInfo.m_type)
|
||||
if (connSettingInfo.m_type != KyKeyMgmt::WpaNone && connSettingInfo.m_type != KyKeyMgmt::Unknown)
|
||||
{
|
||||
security_sett->setPsk(connSettingInfo.m_psk);
|
||||
NetworkManager::WirelessSecuritySetting::Ptr security_sett
|
||||
= settings->setting(NetworkManager::Setting::WirelessSecurity).dynamicCast<NetworkManager::WirelessSecuritySetting>();
|
||||
security_sett->setInitialized(true);
|
||||
security_sett->setKeyMgmt((NetworkManager::WirelessSecuritySetting::KeyMgmt)connSettingInfo.m_type);
|
||||
if (KyKeyMgmt::SAE == connSettingInfo.m_type || KyKeyMgmt::WpaPsk == connSettingInfo.m_type)
|
||||
{
|
||||
security_sett->setPsk(connSettingInfo.m_psk);
|
||||
}
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
@ -288,6 +291,10 @@ void KyWirelessConnectOperation::updateWirelessPersonalConnect(const QString &uu
|
|||
return;
|
||||
}
|
||||
|
||||
NetworkManager::Security8021xSetting::Ptr wifi_8021x_sett
|
||||
= connectionSettings->setting(NetworkManager::Setting::Security8021x).dynamicCast<NetworkManager::Security8021xSetting>();
|
||||
wifi_8021x_sett->setInitialized(false);
|
||||
|
||||
updateWirelessSecu(connectionSettings, connSettingInfo, bPwdChange);
|
||||
connectPtr->update(connectionSettings->toMap());
|
||||
return;
|
||||
|
@ -357,8 +364,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessConnect(QString & devIface,
|
|||
NMVariantMapMap map_settings;
|
||||
|
||||
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
|
||||
if (!isHidden && wifiNet.isNull())
|
||||
{
|
||||
if (!isHidden && wifiNet.isNull()) {
|
||||
qDebug() << "addAndActiveWirelessConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
|
||||
return;
|
||||
}
|
||||
|
@ -366,8 +372,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessConnect(QString & devIface,
|
|||
qDebug() << "addAndActiveWirelessConnect find " << connSettingInfo.m_ssid << " in " << devIface << " or hide";
|
||||
|
||||
auto dev = m_networkResourceInstance->findDeviceInterface(devIface);
|
||||
if (dev.isNull())
|
||||
{
|
||||
if (dev.isNull()) {
|
||||
emit andAndActivateConnectionError("can not find device");
|
||||
return;
|
||||
}
|
||||
|
@ -375,16 +380,11 @@ void KyWirelessConnectOperation::addAndActiveWirelessConnect(QString & devIface,
|
|||
qDebug() << "addAndActiveWirelessConnect device " << devIface << " exist";
|
||||
dev_uni = dev->uni();
|
||||
auto spec_dev = dev->as<NetworkManager::WirelessDevice>();
|
||||
qDebug() << dev_uni;
|
||||
if (!isHidden)
|
||||
{
|
||||
if (!isHidden) {
|
||||
qDebug() << "start assemble";
|
||||
auto access_point = wifiNet->referenceAccessPoint();
|
||||
qDebug() << "1";
|
||||
conn_uni = access_point->uni();
|
||||
qDebug() << "2";
|
||||
conn_name = access_point->ssid();
|
||||
qDebug() << "3";
|
||||
spec_object = conn_uni;
|
||||
qDebug() << "start findBestWirelessSecurity";
|
||||
NetworkManager::WirelessSecurityType sec_type = NetworkManager::findBestWirelessSecurity(spec_dev->wirelessCapabilities()
|
||||
|
@ -402,11 +402,9 @@ qDebug() << dev_uni;
|
|||
break;
|
||||
case NetworkManager::WpaPsk:
|
||||
case NetworkManager::Wpa2Psk:
|
||||
if (NetworkManager::ConnectionSettings::Ptr settings = assembleWpaXPskSettings(access_point, connSettingInfo.m_psk, connSettingInfo.isAutoConnect))
|
||||
{
|
||||
if (NetworkManager::ConnectionSettings::Ptr settings = assembleWpaXPskSettings(access_point, connSettingInfo.m_psk, connSettingInfo.isAutoConnect)) {
|
||||
map_settings = settings->toMap();
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
qWarning() << QStringLiteral("connection settings assembly for '%1' failed, abandoning activation...").arg(conn_name);
|
||||
return;
|
||||
}
|
||||
|
@ -426,8 +424,7 @@ qDebug() << dev_uni;
|
|||
QDBusPendingCallWatcher * watcher;
|
||||
watcher = new QDBusPendingCallWatcher{NetworkManager::addAndActivateConnection(map_settings, dev_uni, spec_object), this};
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, [&] (QDBusPendingCallWatcher * watcher) {
|
||||
if (watcher->isError() || !watcher->isValid())
|
||||
{
|
||||
if (watcher->isError() || !watcher->isValid()) {
|
||||
QString errorMessage = watcher->error().message();
|
||||
qDebug() << "activation of connection failed " << errorMessage;
|
||||
emit andAndActivateConnectionError(errorMessage);
|
||||
|
@ -438,15 +435,12 @@ qDebug() << dev_uni;
|
|||
|
||||
void KyWirelessConnectOperation::requestWirelessScan()
|
||||
{
|
||||
for (auto const & dev : m_networkResourceInstance->m_devices)
|
||||
{
|
||||
for (auto const & dev : m_networkResourceInstance->m_devices) {
|
||||
auto spec_dev = dev->as<NetworkManager::WirelessDevice>();
|
||||
if (nullptr != spec_dev)
|
||||
{
|
||||
if (nullptr != spec_dev) {
|
||||
m_networkResourceInstance->requestScan(spec_dev);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapMethodTlsInfo &info, KyWirelessConnectSetting &connSettingInfo,
|
||||
|
@ -458,11 +452,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapM
|
|||
QString spec_object;
|
||||
NMVariantMapMap map_settings;
|
||||
|
||||
if (!isHidden)
|
||||
{
|
||||
if (!isHidden) {
|
||||
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
|
||||
if (wifiNet.isNull())
|
||||
{
|
||||
if (wifiNet.isNull()) {
|
||||
qDebug() << "addAndActiveWirelessEnterPriseTlsConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
|
||||
return;
|
||||
}
|
||||
|
@ -474,8 +466,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapM
|
|||
}
|
||||
|
||||
auto dev = m_networkResourceInstance->findDeviceInterface(devIface);
|
||||
if (dev.isNull())
|
||||
{
|
||||
if (dev.isNull()) {
|
||||
emit andAndActivateConnectionError("can not find device");
|
||||
return;
|
||||
}
|
||||
|
@ -484,8 +475,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapM
|
|||
NetworkManager::ConnectionSettings::Ptr settings = assembleWirelessSettings(connSettingInfo);
|
||||
assembleEapMethodTlsSettings(settings, info);
|
||||
|
||||
if(settings.isNull())
|
||||
{
|
||||
if(settings.isNull()) {
|
||||
qDebug() << "assembleEapMethodTlsSettings failed";
|
||||
return;
|
||||
}
|
||||
|
@ -495,8 +485,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapM
|
|||
QDBusPendingCallWatcher * watcher;
|
||||
watcher = new QDBusPendingCallWatcher{NetworkManager::addAndActivateConnection(map_settings, dev_uni, spec_object), this};
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, [&] (QDBusPendingCallWatcher * watcher) {
|
||||
if (watcher->isError() || !watcher->isValid())
|
||||
{
|
||||
if (watcher->isError() || !watcher->isValid()) {
|
||||
QString errorMessage = watcher->error().message();
|
||||
qDebug() << "addAndActiveWirelessEnterPriseTlsConnect failed " << errorMessage;
|
||||
emit andAndActivateConnectionError(errorMessage);
|
||||
|
@ -519,8 +508,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPrisePeapConnect(KyEap
|
|||
if (!isHidden)
|
||||
{
|
||||
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
|
||||
if (wifiNet.isNull())
|
||||
{
|
||||
if (wifiNet.isNull()) {
|
||||
qDebug() << "addAndActiveWirelessEnterPrisePeapConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
|
||||
return;
|
||||
}
|
||||
|
@ -533,8 +521,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPrisePeapConnect(KyEap
|
|||
}
|
||||
|
||||
auto dev = m_networkResourceInstance->findDeviceInterface(devIface);
|
||||
if (dev.isNull())
|
||||
{
|
||||
if (dev.isNull()) {
|
||||
emit andAndActivateConnectionError("can not find device");
|
||||
return;
|
||||
}
|
||||
|
@ -543,8 +530,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPrisePeapConnect(KyEap
|
|||
NetworkManager::ConnectionSettings::Ptr settings = assembleWirelessSettings(connSettingInfo);
|
||||
assembleEapMethodPeapSettings(settings, info);
|
||||
|
||||
if(settings.isNull())
|
||||
{
|
||||
if(settings.isNull()) {
|
||||
qDebug() << "assembleEapMethodPeapSettings failed";
|
||||
return;
|
||||
}
|
||||
|
@ -553,8 +539,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPrisePeapConnect(KyEap
|
|||
QDBusPendingCallWatcher * watcher;
|
||||
watcher = new QDBusPendingCallWatcher{NetworkManager::addAndActivateConnection(map_settings, dev_uni, spec_object), this};
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, [&] (QDBusPendingCallWatcher * watcher) {
|
||||
if (watcher->isError() || !watcher->isValid())
|
||||
{
|
||||
if (watcher->isError() || !watcher->isValid()) {
|
||||
QString errorMessage = watcher->error().message();
|
||||
qDebug() << "addAndActiveWirelessEnterPrisePeapConnect failed " << errorMessage;
|
||||
emit andAndActivateConnectionError(errorMessage);
|
||||
|
@ -573,11 +558,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTtlsConnect(KyEap
|
|||
QString spec_object;
|
||||
NMVariantMapMap map_settings;
|
||||
|
||||
if (!isHidden)
|
||||
{
|
||||
if (!isHidden) {
|
||||
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
|
||||
if (wifiNet.isNull())
|
||||
{
|
||||
if (wifiNet.isNull()) {
|
||||
qDebug() << "addAndActiveWirelessEnterPriseTtlsConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
|
||||
return;
|
||||
}
|
||||
|
@ -589,8 +572,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTtlsConnect(KyEap
|
|||
}
|
||||
|
||||
auto dev = m_networkResourceInstance->findDeviceInterface(devIface);
|
||||
if (dev.isNull())
|
||||
{
|
||||
if (dev.isNull()) {
|
||||
emit andAndActivateConnectionError("can not find device");
|
||||
return;
|
||||
}
|
||||
|
@ -599,8 +581,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTtlsConnect(KyEap
|
|||
NetworkManager::ConnectionSettings::Ptr settings = assembleWirelessSettings(connSettingInfo);
|
||||
assembleEapMethodTtlsSettings(settings, info);
|
||||
|
||||
if(settings.isNull())
|
||||
{
|
||||
if(settings.isNull()) {
|
||||
qDebug() << "assembleEapMethodTtlsSettings failed";
|
||||
return;
|
||||
}
|
||||
|
@ -610,8 +591,7 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTtlsConnect(KyEap
|
|||
QDBusPendingCallWatcher * watcher;
|
||||
watcher = new QDBusPendingCallWatcher{NetworkManager::addAndActivateConnection(map_settings, dev_uni, spec_object), this};
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, [&] (QDBusPendingCallWatcher * watcher) {
|
||||
if (watcher->isError() || !watcher->isValid())
|
||||
{
|
||||
if (watcher->isError() || !watcher->isValid()) {
|
||||
QString errorMessage = watcher->error().message();
|
||||
qDebug() << "addAndActiveWirelessEnterPriseTtlsConnect failed " << errorMessage;
|
||||
emit andAndActivateConnectionError(errorMessage);
|
||||
|
@ -635,8 +615,7 @@ bool KyWirelessConnectOperation::getConnSecretFlags(QString &connUuid, NetworkMa
|
|||
{
|
||||
NetworkManager::Connection::Ptr conn;
|
||||
conn = m_networkResourceInstance->getConnect(connUuid);
|
||||
if (conn.isNull())
|
||||
{
|
||||
if (conn.isNull()) {
|
||||
qDebug() <<"get failed";
|
||||
return false;
|
||||
}
|
||||
|
@ -650,19 +629,15 @@ bool KyWirelessConnectOperation::getConnSecretFlags(QString &connUuid, NetworkMa
|
|||
//private
|
||||
NetworkManager::WirelessNetwork::Ptr KyWirelessConnectOperation::checkWifiNetExist(QString ssid, QString devName)
|
||||
{
|
||||
for (auto const & net : m_networkResourceInstance->m_wifiNets)
|
||||
{
|
||||
for (auto const & net : m_networkResourceInstance->m_wifiNets) {
|
||||
auto dev = m_networkResourceInstance->findDeviceUni(net->device());
|
||||
if (dev == nullptr)
|
||||
{
|
||||
if (dev == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (dev->type() != NetworkManager::Device::Wifi || dev->interfaceName() != devName)
|
||||
{
|
||||
if (dev->type() != NetworkManager::Device::Wifi || dev->interfaceName() != devName) {
|
||||
continue;
|
||||
}
|
||||
if (ssid == net->ssid())
|
||||
{
|
||||
if (ssid == net->ssid()) {
|
||||
return net;
|
||||
}
|
||||
}
|
||||
|
@ -692,9 +667,14 @@ void KyWirelessConnectOperation::updateWirelessSecu(NetworkManager::ConnectionSe
|
|||
|
||||
KyKeyMgmt type = connSettingInfo.m_type;
|
||||
qDebug() << "set keyMgmt " << type;
|
||||
// security_sett->setKeyMgmt((NetworkManager::WirelessSecuritySetting::KeyMgmt)type);
|
||||
if (bPwdChange)
|
||||
{
|
||||
if (type == WpaNone) {
|
||||
security_sett->setInitialized(false);
|
||||
return;
|
||||
} else {
|
||||
security_sett->setInitialized(true);
|
||||
}
|
||||
security_sett->setKeyMgmt((NetworkManager::WirelessSecuritySetting::KeyMgmt)type);
|
||||
if (bPwdChange) {
|
||||
qDebug() << "get psk " << security_sett->psk();
|
||||
security_sett->setPsk(connSettingInfo.m_psk);
|
||||
}
|
||||
|
@ -706,6 +686,7 @@ void KyWirelessConnectOperation::setWirelessSecuWpaXEap(NetworkManager::Connecti
|
|||
NetworkManager::WirelessSecuritySetting::Ptr security_sett
|
||||
= connSettingPtr->setting(NetworkManager::Setting::WirelessSecurity).dynamicCast<NetworkManager::WirelessSecuritySetting>();
|
||||
|
||||
security_sett->setInitialized(true);
|
||||
security_sett->setKeyMgmt(NetworkManager::WirelessSecuritySetting::KeyMgmt::WpaEap);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -259,8 +259,6 @@ void NmDemo::onConnectClicked()
|
|||
}
|
||||
if (isEnterPirse)
|
||||
{
|
||||
qDebug() <<"EnterPrice";
|
||||
return;
|
||||
if(!isNew)
|
||||
{
|
||||
KyEapMethodPeapInfo a;
|
||||
|
@ -273,14 +271,22 @@ void NmDemo::onConnectClicked()
|
|||
m_wco->activeWirelessConnect(devIface,uuid);
|
||||
return;
|
||||
} else {
|
||||
KyEapMethodTtlsInfo c;
|
||||
c.authType = AUTH_NO_EAP;
|
||||
c.authNoEapMethod = KyAuthMethodMschapv2;
|
||||
KyEapMethodPeapInfo c;
|
||||
c.m_passwdFlag = NetworkManager::Setting::SecretFlagType::None;
|
||||
c.phase2AuthMethod = KyAuthMethodMschapv2;
|
||||
c.userName = "steve";
|
||||
c.userPWD = "testing";
|
||||
|
||||
KyWirelessConnectSetting a;
|
||||
a.m_connectName = ssid;
|
||||
a.m_ssid = ssid;
|
||||
a.isAutoConnect = true;
|
||||
a.m_type = WpaEap;
|
||||
|
||||
appendDebugLog("addAndActiveWirelessEnterPriseTtlsConnect...");
|
||||
qDebug() << "addAndActiveWirelessEnterPriseTtlsConnect";
|
||||
// m_wco->addAndActiveWirelessEnterPriseTtlsConnect(c, devIface, isHidden, true, 0);
|
||||
m_wco->addAndActiveWirelessEnterPrisePeapConnect(c, a, devIface, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +298,7 @@ void NmDemo::onConnectClicked()
|
|||
a.m_ssid = ssid;
|
||||
a.isAutoConnect = true;
|
||||
a.m_psk = pwd;
|
||||
a.m_type = WpaPsk;
|
||||
a.m_type = WpaNone;
|
||||
|
||||
|
||||
m_wco->addAndActiveWirelessConnect(devIface,a, isHidden);
|
||||
|
@ -363,14 +369,19 @@ void NmDemo::onModifyClicked()
|
|||
{
|
||||
return;
|
||||
}
|
||||
QString psk = m_wco->getPsk(uuid);
|
||||
appendDebugLog(ssid +" getPsk is " + psk);
|
||||
return;
|
||||
|
||||
// KyEapMethodTtlsInfo info;
|
||||
// m_wco->updateWirelessEnterPriseTtlsConnect(uuid, info);
|
||||
|
||||
// QString psk = m_wco->getPsk(uuid);
|
||||
// appendDebugLog(ssid +" getPsk is " + psk);
|
||||
// return;
|
||||
|
||||
appendDebugLog("getConnectKeyMgmt" + QString::number(m_wco->getConnectKeyMgmt(uuid)));
|
||||
|
||||
KyWirelessConnectSetting wcs;
|
||||
wcs.m_type = SAE;
|
||||
wcs.m_type = WpaPsk;
|
||||
wcs.m_psk = "123456zsx";
|
||||
m_wco->updateWirelessPersonalConnect(uuid, wcs ,true);
|
||||
appendDebugLog("getConnectKeyMgmt" + QString::number(m_wco->getConnectKeyMgmt(uuid)));
|
||||
return;
|
||||
|
@ -462,17 +473,17 @@ void NmDemo::onAddClick()
|
|||
{
|
||||
appendDebugLog("onAddClick...");
|
||||
KyWirelessConnectSetting sett;
|
||||
sett.m_connectName = "zsx";
|
||||
sett.m_ssid = "zsxsz";
|
||||
sett.m_connectName = "test";
|
||||
sett.m_ssid = "test";
|
||||
sett.isAutoConnect = false;
|
||||
sett.m_psk = "123456zsx";
|
||||
sett.m_type = Wep;
|
||||
//ipv4
|
||||
sett.setIpConfigType(IPADDRESS_V4, CONFIG_IP_MANUAL);
|
||||
QString ipv4Address("192.168.1.17"), ipv4NetMask("255.255.255.0"), ipv4GateWay("192.168.1.0");
|
||||
QStringList list;
|
||||
list << "127.17.50.100";
|
||||
sett.ipv4AddressConstruct(ipv4Address, ipv4NetMask, ipv4GateWay, list);
|
||||
sett.m_psk = "";
|
||||
sett.m_type = WpaEap;
|
||||
// //ipv4
|
||||
sett.setIpConfigType(IPADDRESS_V4, CONFIG_IP_DHCP);
|
||||
// QString ipv4Address("192.168.1.17"), ipv4NetMask("255.255.255.0"), ipv4GateWay("192.168.1.0");
|
||||
// QStringList list;
|
||||
// list << "127.17.50.100";
|
||||
// sett.ipv4AddressConstruct(ipv4Address, ipv4NetMask, ipv4GateWay, list);
|
||||
// m_wco->addConnect(sett);
|
||||
KyEapMethodPeapInfo peap;
|
||||
peap.phase2AuthMethod = KyAuthMethodMschapv2;
|
||||
|
|
Loading…
Reference in New Issue