-rw-r--r-- | libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index 607d8f1..fc2026f 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp @@ -47,24 +47,36 @@ int main( int argc, char** argv ) qDebug( "DEMO: Operation Mode change successful." ); // RF channel qDebug( "DEMO: Current Channel is '%d'", iface->channel() ); iface->setChannel( 1 ); if ( iface->channel() != 1 ) qDebug( "DEMO: Warning! Can't change RF channel" ); else qDebug( "DEMO: RF channel change successful." ); iface->setMode( "managed" ); + // network scan + + int stations = iface->scanNetwork(); + if ( stations != -1 ) + { + qDebug( "DEMO: # of stations around = %d", stations ); + } + else + { + qDebug( "DEMO: Warning! Scan didn't work!" ); + } + /* // first some wrong calls to check if this is working iface->setPrivate( "seppel", 10 ); iface->setPrivate( "monitor", 0 ); // now the real deal iface->setPrivate( "monitor", 2, 2, 3 ); // trying to set hw address to 12:34:56:AB:CD:EF /* |