Diffstat (limited to 'libopie2/examples/opienet/onetworkdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index f801b15..fd68772 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | |||
@@ -21,3 +21,2 @@ int main( int argc, char** argv ) | |||
21 | qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() ); | 21 | qDebug( "DEMO: Current SSID is '%s'", (const char*) iface->SSID() ); |
22 | qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() ); | ||
23 | qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() ); | 22 | qDebug( "DEMO: Antenna is tuned to '%f', that is channel %d", iface->frequency(), iface->channel() ); |
@@ -29,3 +28,19 @@ int main( int argc, char** argv ) | |||
29 | 28 | ||
30 | // try to set monitor mode | 29 | // nickname |
30 | qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() ); | ||
31 | iface->setNickName( "MyNickName" ); | ||
32 | if ( iface->nickName() != "MyNickName" ) | ||
33 | qDebug( "DEMO: Warning! Can't change nickname" ); | ||
34 | else | ||
35 | qDebug( "DEMO: Nickname change successful." ); | ||
36 | |||
37 | // operation mode | ||
38 | qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() ); | ||
39 | iface->setMode( "adhoc" ); | ||
40 | if ( iface->mode() != "adhoc" ) | ||
41 | qDebug( "DEMO: Warning! Can't change operation mode" ); | ||
42 | else | ||
43 | qDebug( "DEMO: Operation Mode change successful." ); | ||
44 | |||
45 | iface->setMode( "managed" ); | ||
31 | 46 | ||
@@ -40,4 +55,2 @@ int main( int argc, char** argv ) | |||
40 | 55 | ||
41 | */ | ||
42 | |||
43 | // trying to set hw address to 12:34:56:AB:CD:EF | 56 | // trying to set hw address to 12:34:56:AB:CD:EF |