author | mickeyl <mickeyl> | 2003-01-04 17:18:59 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-01-04 17:18:59 (UTC) |
commit | 68400748895ca7c54ad312afdfe830150d53a801 (patch) (unidiff) | |
tree | ef9e4c85fb8aac71b613af9766e5ca6c4bd58f51 | |
parent | 059caec066275d75501471a49c5465fe4def59cf (diff) | |
download | opie-68400748895ca7c54ad312afdfe830150d53a801.zip opie-68400748895ca7c54ad312afdfe830150d53a801.tar.gz opie-68400748895ca7c54ad312afdfe830150d53a801.tar.bz2 |
Try to gracefully shut down the card after sniffing... this is a temporary
hack until the colleagues implement this in libwellenreiter...
-rw-r--r-- | noncore/net/wellenreiter/README | 27 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 26 |
2 files changed, 41 insertions, 12 deletions
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README index c04d30c..af2e611 100644 --- a/noncore/net/wellenreiter/README +++ b/noncore/net/wellenreiter/README | |||
@@ -3,9 +3,9 @@ | |||
3 | /* =============================== */ | 3 | /* =============================== */ |
4 | /* */ | 4 | /* */ |
5 | /* Version: Opie-ALPHA */ | 5 | /* Version: Opie-ALPHA-January */ |
6 | /*************************************************************************/ | 6 | /*************************************************************************/ |
7 | 7 | ||
8 | -------------------------------------------------- | 8 | -------------------------------------------------- |
9 | Release Notes for Opie-ALPHA Version December 2002 | 9 | Release Notes for Opie-ALPHA Version January 2002 |
10 | -------------------------------------------------- | 10 | -------------------------------------------------- |
11 | 11 | ||
@@ -16,7 +16,4 @@ Release Notes for Opie-ALPHA Version December 2002 | |||
16 | * low-level orinoco_cs-based (including prism2 and spectrum_cs) | 16 | * low-level orinoco_cs-based (including prism2 and spectrum_cs) |
17 | 17 | ||
18 | * Supported Interfaces: wlan0 (yes, I know this is hardcoded and | ||
19 | lame, but we're in a hurry and this can be configured soon...) | ||
20 | |||
21 | ===================== | 18 | ===================== |
22 | = Build = | 19 | = Build = |
@@ -33,4 +30,15 @@ noncore/net/wellenreiter/gui | |||
33 | ./configure and rebuild. Note that you need libpcap in your toolchain. | 30 | ./configure and rebuild. Note that you need libpcap in your toolchain. |
34 | 31 | ||
32 | To compile Wellenreiter within the OZ build environment, add the | ||
33 | following lines to $OPIEDIR/packages | ||
34 | CONFIG_WELLENREITER noncore/net/wellenreiter/libwellenreiter libwellenreiter.pro | ||
35 | CONFIG_WELLENREITER noncore/net/wellenreiter/daemon daemon.pro | ||
36 | CONFIG_WELLENREITER noncore/net/wellenreiter/gui gui.pro | ||
37 | CONFIG_WELLENREITER noncore/net/wellenreiter/contrib/orinoco_hopper orinoco_hopper.pro | ||
38 | |||
39 | make -f Makefile.test clean-configs | ||
40 | cd <BUILDROOT> | ||
41 | make SUBDIRS=packages/opie package | ||
42 | |||
35 | ===================== | 43 | ===================== |
36 | = Install = | 44 | = Install = |
@@ -38,5 +46,5 @@ noncore/net/wellenreiter/gui | |||
38 | 46 | ||
39 | Alternatively, you can use our precompiled ipk. Get it from | 47 | Alternatively, you can use our precompiled ipk. Get it from |
40 | http://opie.net.wox.org/elan/current. You will also need libpcap. | 48 | http://opie.net.wox.org/wellenreiter/current/. This also includes a recent libpcap. |
41 | 49 | ||
42 | ===================== | 50 | ===================== |
@@ -44,4 +52,9 @@ http://opie.net.wox.org/elan/current. You will also need libpcap. | |||
44 | ===================== | 52 | ===================== |
45 | 53 | ||
54 | There are two possible modes: <Manual> and <Automatic>. I suggest, you | ||
55 | start with the <Automatic> Mode. This works just using the "Start" | ||
56 | and "Stop" Pushbuttons in the Wellenreiter GUI. If this doesn't work, | ||
57 | then use the following strategy: | ||
58 | |||
46 | 1. Place card in monitor mode. This is device dependent. | 59 | 1. Place card in monitor mode. This is device dependent. |
47 | 60 | ||
@@ -50,5 +63,5 @@ http://opie.net.wox.org/elan/current. You will also need libpcap. | |||
50 | will freeze: The card can't be used normally when sniffing! | 63 | will freeze: The card can't be used normally when sniffing! |
51 | 64 | ||
52 | For most orinoco-based cards this can be done using | 65 | For most orinoco-based cards this can be done using either |
53 | 'iwpriv <interface> 2' or 'iwpriv <interface> 2 1'. | 66 | 'iwpriv <interface> 2' or 'iwpriv <interface> 2 1'. |
54 | 67 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index b22c5cc..4ee9a35 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -113,5 +113,5 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) | |||
113 | 113 | ||
114 | connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); | 114 | connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); |
115 | button->setEnabled( false ); | 115 | // button->setEnabled( false ); |
116 | netview->setColumnWidthMode( 1, QListView::Manual ); | 116 | netview->setColumnWidthMode( 1, QListView::Manual ); |
117 | 117 | ||
@@ -236,9 +236,26 @@ void Wellenreiter::buttonClicked() | |||
236 | system( "killall wellenreiterd" ); | 236 | system( "killall wellenreiterd" ); |
237 | 237 | ||
238 | // FIXME: reset the card trying to get into a usable state again | 238 | // get configuration from config window |
239 | 239 | ||
240 | // for now, just message the user | 240 | const QString& interface = configwindow->interfaceName->currentText(); |
241 | const QString& cardtype = configwindow->deviceType->currentText(); | ||
242 | const QString& interval = configwindow->hopInterval->cleanText(); | ||
243 | |||
244 | // reset the card trying to get into a usable state again | ||
245 | |||
246 | QString cmdline; | ||
247 | cmdline.sprintf( "iwpriv %s monitor 1", (const char*) interface ); | ||
248 | system( cmdline ); | ||
249 | cmdline.sprintf( "iwpriv %s monitor 1 6", (const char*) interface ); | ||
250 | system( cmdline ); | ||
251 | cmdline.sprintf( "ifconfig %s -promisc", (const char*) interface ); | ||
252 | system( cmdline ); | ||
253 | cmdline.sprintf( "killall -14 dhcpcd" ); | ||
254 | system( cmdline ); | ||
255 | cmdline.sprintf( "killall -10 udhcpc" ); | ||
256 | |||
257 | // message the user | ||
241 | 258 | ||
242 | QMessageBox::information( this, "Wellenreiter/Opie", "You should reset your\ndevice before using it again." ); | 259 | QMessageBox::information( this, "Wellenreiter/Opie", "Your wireless card\nshould now be usable again." ); |
243 | } | 260 | } |
244 | 261 | ||
@@ -266,5 +283,4 @@ void Wellenreiter::buttonClicked() | |||
266 | 283 | ||
267 | QString cmdline; | 284 | QString cmdline; |
268 | |||
269 | cmdline.sprintf( "iwpriv %s monitor 2", (const char*) interface ); | 285 | cmdline.sprintf( "iwpriv %s monitor 2", (const char*) interface ); |
270 | system( cmdline ); | 286 | system( cmdline ); |