12-04-2012 09:10 PM
Hi,
I am learning about how to turn on/off wifi in my app. I have found the API about wifi_service.h and use the function from it like this:
// Default empty project template
#include "Tttt.hpp"
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>
#include <wifi/wifi_service.h>
#include <stdbool.h>
using namespace bb::cascades;
Tttt::Tttt(bb::cascades::Application *app)
: QObject(app)
{
// create scene document from main.qml asset
// set parent to created document to ensure it exists for the whole application lifetime
QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(th is);
AbstractPane *root = qml->createRootObject<AbstractPane>();
app->setScene(root);
}
int Tttt::setWifiStatus(bool status) {
int result;
result = wifi_set_sta_power(status);
if (result != WIFI_SUCCESS) {
// function call to wifi_set_sta_power failed
fprintf(stdout, "%s\n", "call to wifi_set_sta_power failed");
}
return result;
}But it have some problems in error:
src/Tttt.cpp:30: undefined reference to `wifi_set_sta_power'
Could you tell me how to deal with it?
cheers,
02-25-2013 02:23 PM
Hello,
Did you find a solution? If so please provide it.
02-26-2013 08:51 AM
Found a ticket in Jira. This functionality is not available yet.
02-26-2013 09:12 AM
03-20-2013 01:14 AM
Hi,
I am also getting same kind of error.
Did anyone find solution? If so, provide it.
Because in this post they successfully compiled the code.
What should be the problem... Does it related to the sdk version?? I am using 10.0.10.261 version...
Thanks
03-20-2013 05:15 AM
03-20-2013 05:30 AM
Hi,
I am not getting.
Can you please provide some sample code so that i can successfully compile it and make it work..
Thanks