USB-s WiFi antennámat ndiswrapper modullal töltöm fel és a rendszer befagy ha kihúzom. A kép megáll és semmi. Udev szabályt próbáltam rá készíteni sikertelenül.DEVPATH=="/devices/pci0000:00/0000:00:1d.7*", ACTION=="remove", RUN+="/sbin/modprobe -r ndiswrapper"
$ uname -a; ndiswrapper -l; ndiswrapper -v; modinfo ndiswrapper; grep hotplug /etc/network/interfaces
Linux tuxy 2.6.26-2-686 #1 SMP Thu Sep 16 19:35:51 UTC 2010 i686 GNU/Linux
zd1211bu : driver installed
device (0ACE:1215) present (alternate driver: zd1211rw)
utils version: '1.9', utils version needed by module: '1.9'
module details:
filename: /lib/modules/2.6.26-2-686/misc/ndiswrapper.ko
version: 1.53
vermagic: 2.6.26-2-686 SMP mod_unload modversions 686
filename: /lib/modules/2.6.26-2-686/misc/ndiswrapper.ko
license: GPL
version: 1.53
description: NDIS wrapper driver
author: ndiswrapper team
srcversion: D5326EF11A989E9AB61CB8F
depends: usbcore
vermagic: 2.6.26-2-686 SMP mod_unload modversions 686
parm: if_name:Network interface name or template (default: wlan%d) (charp)
parm: proc_uid:The uid of the files created in /proc (default: 0). (int)
parm: proc_gid:The gid of the files created in /proc (default: 0). (int)
parm: debug:debug level (int)
parm: hangcheck_interval:The interval, in seconds, for checking if driver is hung. (default: 0) (int)
parm: utils_version:Compatible version of utils (read only: 1.9) (charp)
allow-hotplug wifi0
- 1585 megtekintés
Hozzászólások
up
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
mi lesz modprobe -r után?
- A hozzászóláshoz be kell jelentkezni
modprobe -r ndiswrapper kiveszi rendesen
$ lsmod |grep ndis
ndiswrapper 152444 0
usbcore 118224 4 ndiswrapper,ehci_hcd,uhci_hcd
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Nagyszerű;
mi történik ifdown-al, és mi lesz ezután ha kihúzod?
(a modulok legyenek bent)
- A hozzászóláshoz be kell jelentkezni
ifdown a modult nem szedi ki
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Ezt tudom, engem most az érdekel, hogy ha nincs
kapcsolat és kihúzod megáll-e!
- A hozzászóláshoz be kell jelentkezni
jó ötlet
# ifdown wifi0
lsmod-ban 0-n van a számláló
ifconfig szerint nem UP az interface
úgy figyeltem meg (5 próbálkozással), ifdown wifi0 után 1-2 másodpercet várva kihúzom, akkor nem fagy
többet nem kockáztattam,
amikor nem vártam egy kicsit, akkor ugyanúgy fagyott
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
ezt találtam
...
e.g. diswrapper always crashes on USB 1.X hosts,AFAIK).
na most az a kérdés, hogy neked milyen usb van beépítve.
- A hozzászóláshoz be kell jelentkezni
2.0-ás:
Bus 004 Device 002: ID 0ace:1215 ZyDAS ZD1211B 802.11g
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
idVendor 0x0ace ZyDAS
idProduct 0x1215 ZD1211B 802.11g
bcdDevice 48.10
iManufacturer 16 ZyDAS
iProduct 32 USB2.0 WLAN
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 46
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.26-2-686 ehci_hcd
iProduct 2 EHCI Host Controller
iSerial 1 0000:00:1d.7
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 6
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0100 power
Port 6: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.26-2-686 uhci_hcd
iProduct 2 UHCI Host Controller
iSerial 1 0000:00:1d.2
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.26-2-686 uhci_hcd
iProduct 2 UHCI Host Controller
iSerial 1 0000:00:1d.1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.26-2-686 uhci_hcd
iProduct 2 UHCI Host Controller
iSerial 1 0000:00:1d.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
-----------
Bus# 4
`-Dev# 1 Vendor 0x1d6b Product 0x0002
`-Dev# 2 Vendor 0x0ace Product 0x1215
Bus# 3
`-Dev# 1 Vendor 0x1d6b Product 0x0001
Bus# 2
`-Dev# 1 Vendor 0x1d6b Product 0x0001
Bus# 1
`-Dev# 1 Vendor 0x1d6b Product 0x0001
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Akkor erre nem tudunk menni.
Esetleg még az ehci-t kiszedheted mielőtt lehúzod:
rmmod ndis.. && rmmod ehci... (sorrend fontos, nem biztos, hogy ez így jó)
ha nincs más modul rajta.
Persze ez így kényelmetlen, más ötletem nincs.
Na, talán az, hogy ráteszed egy usb-hub-ra és a hubot illeszted
a gépbe.
- A hozzászóláshoz be kell jelentkezni
Tudom, fapados, de mi van akkor, ha kihúzás elött kézből lelövöd az interface-t, kiveszed a modult és csak utána húzod ki az eszközt?
Azt meg érdemes végig gondolni, hogy az udev csak akkor tudja eltávolítani az eszközt és modulját, ha észleli az eszköz eltávolítását - de ekkor az eszköz már el van távolítva. Ez egyfelől azért probléma, mert ha a modul nem jó és nem kezeli le az eszköz eltávolításából adódó hibát jól - magyarán: belefagy -, akkor hiába van udev szabály, ami kiveszi a modult, mert mire futna, a rendszer már megállt. Azt se felejtsük el: csak nem használt modul távolítható el. Ha bármiért a számláló nem csökken le nullára, az rmmod - vagy modprobe -r - nem távolítja el a modult. Amíg az interface UP-ban van, addig a számláló legalább 1.
- A hozzászóláshoz be kell jelentkezni
játszhat tovább(feltételeztem, hogy amúgy is tudja):
rmmod ehci.., ohci.. ifdown
(usbmouse!)
Várjuk meg mint mond, talán látunk logot is.
- A hozzászóláshoz be kell jelentkezni
most beállítottam hotkey-re az «modprobe -r» -t, de az nem megoldás, mert másképpen is kihúzódhat, kábel megtörhet...
a legfentebbi udev szabály az akar lenni, hogy hátha hamarabb ki tudom szedni a modult egy eseményhez kötve, mint ahogy az cselekedne és befagyasztaná a rendszert.
# modprobe -r ndiswrapper
# udevadm monitor
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent
UDEV [1290440997.339934] remove /class/usb_endpoint/usbdev4.2_ep01 (usb_endpoint)
UEVENT[1290440997.340895] remove /class/usb_endpoint/usbdev4.2_ep82 (usb_endpoint)
UEVENT[1290440997.341565] remove /class/usb_endpoint/usbdev4.2_ep83 (usb_endpoint)
UEVENT[1290440997.342231] remove /class/usb_endpoint/usbdev4.2_ep04 (usb_endpoint)
UEVENT[1290440997.342936] remove /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0 (usb)
UEVENT[1290440997.353317] remove /class/usb_endpoint/usbdev4.2_ep00 (usb_endpoint)
UEVENT[1290440997.353740] remove /class/usb_device/usbdev4.2 (usb_device)
UEVENT[1290440997.353989] remove /devices/pci0000:00/0000:00:1d.7/usb4/4-1 (usb)
UDEV [1290440997.376169] remove /class/usb_endpoint/usbdev4.2_ep83 (usb_endpoint)
UDEV [1290440997.378920] remove /class/usb_endpoint/usbdev4.2_ep82 (usb_endpoint)
UDEV [1290440997.381780] remove /class/usb_endpoint/usbdev4.2_ep04 (usb_endpoint)
UDEV [1290440997.386934] remove /class/usb_endpoint/usbdev4.2_ep00 (usb_endpoint)
UDEV [1290440997.445416] remove /class/usb_device/usbdev4.2 (usb_device)
UDEV [1290440997.552255] remove /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0 (usb)
UDEV [1290440997.615065] remove /devices/pci0000:00/0000:00:1d.7/usb4/4-1 (usb)
UEVENT[1290441006.607643] add /devices/pci0000:00/0000:00:1d.7/usb4/4-1 (usb)
UEVENT[1290441006.608757] add /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0 (usb)
UEVENT[1290441006.609032] add /class/usb_endpoint/usbdev4.3_ep01 (usb_endpoint)
UEVENT[1290441006.609062] add /class/usb_endpoint/usbdev4.3_ep82 (usb_endpoint)
UEVENT[1290441006.609084] add /class/usb_endpoint/usbdev4.3_ep83 (usb_endpoint)
UEVENT[1290441006.609106] add /class/usb_endpoint/usbdev4.3_ep04 (usb_endpoint)
UEVENT[1290441006.609127] add /class/usb_device/usbdev4.3 (usb_device)
UEVENT[1290441006.609148] add /class/usb_endpoint/usbdev4.3_ep00 (usb_endpoint)
UDEV [1290441006.644581] add /devices/pci0000:00/0000:00:1d.7/usb4/4-1 (usb)
UDEV [1290441006.795905] add /module/ndiswrapper (module)
UDEV [1290441006.799212] add /class/misc/ndiswrapper (misc)
UDEV [1290441006.957816] add /bus/pci/drivers/ndiswrapper (drivers)
UEVENT[1290441008.049026] add /class/net/wlan0 (net)
UDEV [1290441008.070954] add /bus/usb/drivers/ndiswrapper (drivers)
UDEV [1290441008.076147] add /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0 (usb)
UDEV [1290441008.088983] add /class/usb_endpoint/usbdev4.3_ep01 (usb_endpoint)
UDEV [1290441008.090957] add /class/usb_endpoint/usbdev4.3_ep82 (usb_endpoint)
UDEV [1290441008.097276] add /class/usb_endpoint/usbdev4.3_ep83 (usb_endpoint)
UDEV [1290441008.099324] add /class/usb_endpoint/usbdev4.3_ep04 (usb_endpoint)
UDEV [1290441008.116253] add /class/usb_endpoint/usbdev4.3_ep00 (usb_endpoint)
UEVENT[1290441008.130722] move /class/net/wifi0 (net)
UDEV [1290441008.158205] add /class/net/wifi0 (net)
UDEV [1290441008.187355] add /class/usb_device/usbdev4.3 (usb_device)
UDEV [1290441008.190846] move /class/net/wifi0 (net)
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
ez egyre bizarabb!
emlékszem h az elõzõ gépemre, mely valószínũleg régebbi telepítés, így régebbi kernel, be tudtam fordítani az ajánlott gyári kernelmodult.
nem találtam a repóban régebbi kernelt, és tartok attól is h nem férne össze a többi rendszer komponenssel, így 2.6.26-6-686 helyett a 2.6.26-6-486 -osat bootoltam be és ennek a zd1211rw modulját betöltve tudom keresni a wifi hálózatokat (iwlist root jogok nélkÜl nem talál semmit - ez is érdekes) és csatlakozik is rá. valamint iwevent is közöl velem dolgokat, amit 686-os kernellel vagy ndiswrapperrel se tett.
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Így is megáll?
- A hozzászóláshoz be kell jelentkezni
bocsánat azt nem írtam.
natív driverrel nem fagy be!
és a promiszkális mód is megy.
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Ez teljesen eltérő driver, vagy valami javított a gyári?
- A hozzászóláshoz be kell jelentkezni
elvileg ugyanaz a modul, mint amit már próbáltam, a repóból.
fogalmam sincs mi történt vele.
2.6.26-2-686 -os kernelen is jól mũködik már !?!
attól eltekintve h root jog kell iwlist scan -hez
~~~~~~~~
De ezt az egy lépést ki nem tevé,
Az nem tett semmit, nem tud semmit is.
- A hozzászóláshoz be kell jelentkezni
Nekem amd64 van csak.
De nemcsak ez az 1 ilyen eset van, hogy a különböző
arch.-on eltérő hibákat ad valami.
- A hozzászóláshoz be kell jelentkezni