linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rtl8192cu not working with Edimax EW-7811Un
@ 2011-11-22 10:34 Jan Dvořák
  2011-11-22 14:01 ` Stanislaw Gruszka
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Dvořák @ 2011-11-22 10:34 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi,

I have Edimax EW-7811Un USB dongle.

The reason I purchased it was that I needed as small close-range AP to
connect my laptop to my work PC. Now, I have not managed to make it even
connect as client.

I have attached various logs and information about the HW from when I
was attempting to use it as AP. The client kept repeating

  wlan0: authenticate with 00:1f:1f:e4:5b:67 (try 1)
  wlan0: authenticated
  wlan0: waiting for beacon from 00:1f:1f:e4:5b:67

over and over, but never really connected.

Can you give me some advice on how to debug this? Where can I create a
formal bug report, with kernel bugzilla down?

Oh, this is with 3.1.0-5.fc16.x86_64 (Fedora 16).

Thanks for your help,
	Jan Dvorak

[-- Attachment #2: dmesg.txt --]
[-- Type: text/plain, Size: 2085 bytes --]

[ 2915.695039] usb 1-3: new high speed USB device number 5 using ehci_hcd
[ 2915.810561] usb 1-3: New USB device found, idVendor=7392, idProduct=7811
[ 2915.810568] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2915.810573] usb 1-3: Product: 802.11n WLAN Adapter
[ 2915.810577] usb 1-3: Manufacturer: Realtek
[ 2915.810581] usb 1-3: SerialNumber: 00e04c000001
[ 2916.177961] cfg80211: Calling CRDA to update world regulatory domain
[ 2916.243818] cfg80211: World regulatory domain updated:
[ 2916.243823] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 2916.243827] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 2916.243830] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 2916.243834] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 2916.243837] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 2916.243840] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 2916.404945] rtl8192cu: MAC address: 00:1f:1f:e4:5b:67
[ 2916.404954] rtl8192cu: Board Type 0
[ 2916.440318] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[ 2916.478141] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[ 2916.478850] usbcore: registered new interface driver rtl8192cu
[ 2916.592701] cfg80211: Calling CRDA for country: CZ
[ 2916.596969] cfg80211: Regulatory domain changed to country: CZ
[ 2916.596974] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 2916.596977] cfg80211:     (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 2916.596980] cfg80211:     (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm)
[ 2916.596983] cfg80211:     (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 2916.596986] cfg80211:     (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)
[ 2983.894180] rtl8192cu: MAC auto ON okay!
[ 2983.930451] rtl8192cu: Tx queue select: 0x05
[ 2983.931216] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cufw.bin

[-- Attachment #3: hostapd.conf --]
[-- Type: text/plain, Size: 191 bytes --]

ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0

driver=nl80211

interface=wlan0
hw_mode=g
channel=3
ssid=dvorakj


[-- Attachment #4: hostapd.txt --]
[-- Type: text/plain, Size: 2542 bytes --]

Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=10 (from group name 'wheel')
nl80211: Add own interface ifindex 6
nl80211: New interface mon.wlan0 created: ifindex=7
nl80211: Add own interface ifindex 7
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 3  Frequency: 2422 MHz
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:1f:1f:e4:5b:67 and ssid 'dvorakj'
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=a0:88:b4:a5:5b:4c auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA a0:88:b4:a5:5b:4c IEEE 802.11: authentication OK (open system)
wlan0: STA a0:88:b4:a5:5b:4c MLME: MLME-AUTHENTICATE.indication(a0:88:b4:a5:5b:4c, OPEN_SYSTEM)
wlan0: STA a0:88:b4:a5:5b:4c MLME: MLME-DELETEKEYS.request(a0:88:b4:a5:5b:4c)
authentication reply: STA=a0:88:b4:a5:5b:4c auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA a0:88:b4:a5:5b:4c IEEE 802.11: authenticated
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb


[-- Attachment #5: iw-phy0-info.txt --]
[-- Type: text/plain, Size: 2938 bytes --]

Wiphy phy0
	Band 1:
		Capabilities: 0x1862
			HT20/HT40
			Static SM Power Save
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 7935 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 16 usec (0x07)
		HT TX/RX MCS rate indexes supported: 0-7, 32
		Frequencies:
			* 2412 MHz [1] (20.0 dBm)
			* 2417 MHz [2] (20.0 dBm)
			* 2422 MHz [3] (20.0 dBm)
			* 2427 MHz [4] (20.0 dBm)
			* 2432 MHz [5] (20.0 dBm)
			* 2437 MHz [6] (20.0 dBm)
			* 2442 MHz [7] (20.0 dBm)
			* 2447 MHz [8] (20.0 dBm)
			* 2452 MHz [9] (20.0 dBm)
			* 2457 MHz [10] (20.0 dBm)
			* 2462 MHz [11] (20.0 dBm)
			* 2467 MHz [12] (disabled)
			* 2472 MHz [13] (disabled)
			* 2484 MHz [14] (disabled)
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps
			* 5.5 Mbps
			* 11.0 Mbps
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	max # scan SSIDs: 4
	max scan IEs length: 2257 bytes
	RTS threshold: 2347
	Coverage class: 0 (up to 0m)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
	software interface modes (can always be added):
		 * AP/VLAN
		 * monitor
	interface combinations are not supported
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * new_beacon
		 * new_station
		 * new_mpath
		 * set_mesh_params
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * join_mesh
		 * remain_on_channel
		 * set_tx_bitrate_mask
		 * action
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * set_wds_peer
		 * connect
		 * disconnect
	Supported TX frame types:
		 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
	Supported RX frame types:
		 * IBSS: 0x00d0
		 * managed: 0x0040 0x00d0
		 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * mesh point: 0x00b0 0x00c0 0x00d0
		 * P2P-client: 0x0040 0x00d0
		 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0

[-- Attachment #6: lsusb-v.txt --]
[-- Type: text/plain, Size: 3204 bytes --]

Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x7392 Edimax Technology Co., Ltd
  idProduct          0x7811 EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
  bcdDevice            2.00
  iManufacturer           1 Realtek
  iProduct                2 802.11n WLAN Adapter
  iSerial                 3 00e04c000001
  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    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 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     0x02  EP 2 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     0x03  EP 3 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     0x84  EP 4 IN
        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            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-22 10:34 rtl8192cu not working with Edimax EW-7811Un Jan Dvořák
@ 2011-11-22 14:01 ` Stanislaw Gruszka
  2011-11-23 10:23   ` Jan Dvořák
  0 siblings, 1 reply; 13+ messages in thread
From: Stanislaw Gruszka @ 2011-11-22 14:01 UTC (permalink / raw)
  To: Jan Dvořák; +Cc: linux-wireless

On Tue, Nov 22, 2011 at 11:34:27AM +0100, Jan Dvořák wrote:
> Oh, this is with 3.1.0-5.fc16.x86_64 (Fedora 16).
Try 3.1.1-1 or newer from koji:
http://koji.fedoraproject.org/koji/packageinfo?packageID=8

Stanislaw

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-22 14:01 ` Stanislaw Gruszka
@ 2011-11-23 10:23   ` Jan Dvořák
  2011-11-23 14:33     ` Stanislaw Gruszka
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Dvořák @ 2011-11-23 10:23 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless

Hi,

On Tue, 22 Nov 2011 15:01:40 +0100
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> On Tue, Nov 22, 2011 at 11:34:27AM +0100, Jan Dvořák wrote:
> > Oh, this is with 3.1.0-5.fc16.x86_64 (Fedora 16).
> Try 3.1.1-1 or newer from koji:
> http://koji.fedoraproject.org/koji/packageinfo?packageID=8

Thank you for your time. The problem persists with 3.1.2-1.fc16.x86_64.
Anything else comes to mind?

Thanks for help,
	Jan Dvorak

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 10:23   ` Jan Dvořák
@ 2011-11-23 14:33     ` Stanislaw Gruszka
  2011-11-23 15:24       ` Jan Dvořák
  0 siblings, 1 reply; 13+ messages in thread
From: Stanislaw Gruszka @ 2011-11-23 14:33 UTC (permalink / raw)
  To: Jan Dvořák; +Cc: linux-wireless

Hello,

On Wed, Nov 23, 2011 at 11:23:01AM +0100, Jan Dvořák wrote:
> Thank you for your time. The problem persists with 3.1.2-1.fc16.x86_64.
> Anything else comes to mind?

Another kernel to test :-)
http://koji.fedoraproject.org/koji/taskinfo?taskID=3534603

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 14:33     ` Stanislaw Gruszka
@ 2011-11-23 15:24       ` Jan Dvořák
  2011-11-23 15:40         ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Dvořák @ 2011-11-23 15:24 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless

On Wed, 23 Nov 2011 15:33:05 +0100
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Another kernel to test :-)
> http://koji.fedoraproject.org/koji/taskinfo?taskID=3534603

OK, I have no idea if this is because of the new kernel, but
client mode works. I can't still use hostapd, however.

So, in hope this does not get old too soon, any ideas? :-)

Thanks for your help and patience,
	Jan Dvorak

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 15:24       ` Jan Dvořák
@ 2011-11-23 15:40         ` Larry Finger
  2011-11-23 15:51           ` Stanislaw Gruszka
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2011-11-23 15:40 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Jan Dvořák, linux-wireless

On 11/23/2011 09:24 AM, Jan Dvořák wrote:
> On Wed, 23 Nov 2011 15:33:05 +0100
> Stanislaw Gruszka<sgruszka@redhat.com>  wrote:
>> Another kernel to test :-)
>> http://koji.fedoraproject.org/koji/taskinfo?taskID=3534603
>
> OK, I have no idea if this is because of the new kernel, but
> client mode works. I can't still use hostapd, however.
>
> So, in hope this does not get old too soon, any ideas? :-)

Stanislaw,

What patches did you put in that koji kernel? I'm not a Fedora user, and I'm not 
sure what base that Jan started with and what updates were needed.

I know that the initial driver had a problem connecting to 802.11n-only 
channels, but this was fixed in wireless-testing some time ago. Is this the patch?

Thanks,

Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 15:40         ` Larry Finger
@ 2011-11-23 15:51           ` Stanislaw Gruszka
  2011-11-23 16:52             ` Jan Dvořák
  0 siblings, 1 reply; 13+ messages in thread
From: Stanislaw Gruszka @ 2011-11-23 15:51 UTC (permalink / raw)
  To: Larry Finger; +Cc: Jan Dvořák, linux-wireless

On Wed, Nov 23, 2011 at 09:40:00AM -0600, Larry Finger wrote:
> On 11/23/2011 09:24 AM, Jan Dvořák wrote:
> >>http://koji.fedoraproject.org/koji/taskinfo?taskID=3534603
> >
> >OK, I have no idea if this is because of the new kernel, but
> >client mode works.
Could you confirm that on previous kernel client mode does not
work, and work with that new kernel?  

> I can't still use hostapd, however.
Hmm, I'm not sure if rtl92c works in AP mode, Larry?

> >So, in hope this does not get old too soon, any ideas? :-)
Eeee..., I do not understed this question.

> What patches did you put in that koji kernel?

Full revert of:

commit b23b025fe246f3acc2988eb6d400df34c27cb8ae
Author: Ben Greear <greearb@candelatech.com>
Date:   Fri Feb 4 11:54:17 2011 -0800

    mac80211: Optimize scans on current operating channel.

> I know that the initial driver had a problem connecting to
> 802.11n-only channels, but this was fixed in wireless-testing some
> time ago. Is this the patch?
No.

Thanks
Stanislaw

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 15:51           ` Stanislaw Gruszka
@ 2011-11-23 16:52             ` Jan Dvořák
  2011-11-23 18:41               ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Dvořák @ 2011-11-23 16:52 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Larry Finger, linux-wireless

On Wed, 23 Nov 2011 16:51:09 +0100
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Could you confirm that on previous kernel client mode does not
> work, and work with that new kernel?  

I'll try it when I get home or first thing yesterday.

> > I can't still use hostapd, however.
> Hmm, I'm not sure if rtl92c works in AP mode, Larry?

The iw says it should.

> > >So, in hope this does not get old too soon, any ideas? :-)
> Eeee..., I do not understed this question.

Never mind.

Best regards,
	Jan Dvorak

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 16:52             ` Jan Dvořák
@ 2011-11-23 18:41               ` Larry Finger
  2011-11-24 13:03                 ` Jan Dvořák
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2011-11-23 18:41 UTC (permalink / raw)
  To: Jan Dvořák; +Cc: Stanislaw Gruszka, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

On 11/23/2011 10:52 AM, Jan Dvořák wrote:
> On Wed, 23 Nov 2011 16:51:09 +0100
> Stanislaw Gruszka<sgruszka@redhat.com>  wrote:
>> Could you confirm that on previous kernel client mode does not
>> work, and work with that new kernel?
>
> I'll try it when I get home or first thing yesterday.
>
>>> I can't still use hostapd, however.
>> Hmm, I'm not sure if rtl92c works in AP mode, Larry?

When I try it, I get rtl8192cu to beacon, and it is possible to authenticate and 
associate, but the second computer never gets an IP number. I think my script to 
set up dhcpd is faulty, but I cannot find the problem. I attached it - perhaps 
one of you can find what I'm doing wrong. BTW, the script also fails when I try 
to use b43 as an AP, and I know it works.

Larry





[-- Attachment #2: control_ap --]
[-- Type: text/plain, Size: 3230 bytes --]

#!/bin/sh
# Script to start/stop a hostapd-based access point
#
# Sample start call "control_ap start wlan0 eth0"
# Stop with "control_ap stop"
#

case "$1" in
start)
	if [ $# -ne 3 ]
	then
	  echo "Usage: $0 start AP_iface NET_iface"
	  exit 1
	fi
;;
stop)
	if [ $# -ne 1 ]
	then
	  echo "Usage: $0 stop"
	  exit 1
	fi
;;
*)
        echo "Usage:"
	echo "$0 start AP-iface net_iface"
	echo "or"
	echo "$0 stop"
        exit 1
        ;;
esac

# Symbols for needed programs

IPTABLES=/usr/sbin/iptables
IFCONFIG=/sbin/ifconfig
DHCPD=/usr/sbin/dhcpd
HOSTAPD=/usr/sbin/hostapd

# Symbols for AP and external interfaces

NET_AP=$2
NET_EXT=$3

# First 3 octets of IP address for the AP

AP_ADDR=192.168.0

# IP address for nameserver

NAME_SERVER=8.8.8.8

# AP Channel, SSID, Encryption method,  and Encryption secret

AP_CHANNEL=1
AP_SSID=test
WPA_SECRET="\"123456789\""
ENCRYPT_MODE=2

case "$1" in
start)
        echo "Starting AP mode for $NET_AP at address $AP_ADDR"
        # Disable packet forwarding
        echo 0 > /proc/sys/net/ipv4/ip_forward
        # Stop any existing hostapd and dhcpd daemons
        killproc hostapd
        killproc dhcpd
        #Set up forwarding
        $IPTABLES -t nat -A POSTROUTING -o $NET_EXT -j MASQUERADE
        $IPTABLES -A FORWARD -i $NET_EXT -o $NET_AP -m state \
		--state RELATED,ESTABLISHED -j ACCEPT
        $IPTABLES -A FORWARD -i $NET_AP -o $NET_EXT -j ACCEPT
        # Enable packet forwarding
        echo 1 > /proc/sys/net/ipv4/ip_forward
        # Get the AP interface in the right state
        $IFCONFIG $NET_AP down
        $IFCONFIG $NET_AP up
        $IFCONFIG $NET_AP $AP_ADDR.1
        # dhcpd needs to have a leases file available - create it if needed
        if [ ! -f /var/lib/dhcp/db/dhcpd.leases ]; then
                touch /var/lib/dhcp/db/dhcpd.leases
        fi
	# Write the DHCP server configuration file
	echo "option domain-name-servers $NAME_SERVER;" > ~/dhcpd.conf
	echo "default-lease-time 600;" >> ~/dhcpd.conf
	echo "max-lease-time 7200;" >> ~/dhcpd.conf
	echo "ddns-update-style none; ddns-updates off;" >> ~/dhcpd.conf
	echo "subnet $AP_ADDR.0 netmask 255.255.255.0 {" >> ~/dhcpd.conf
	echo "        range $AP_ADDR.200 $AP_ADDR.229;" >> ~/dhcpd.conf
#	echo "        option subnet-mask 255.255.255.0;" >> ~/dhcpd.conf
	echo "        option broadcast-address $AP_ADDR.255;" >> ~/dhcpd.conf
	echo "        option routers $AP_ADDR.1;" >> ~/dhcpd.conf
	echo "}" >> ~/dhcpd.conf
	# Write the hostapd configuration file
	echo "interface=$NET_AP" > ~/hostapd.conf
	echo "driver=nl80211" >> ~/hostapd.conf 
	echo "hw_mode=g" >> ~/hostapd.conf 
	echo "channel=$AP_CHANNEL" >> ~/hostapd.conf 
	echo "ssid=$AP_SSID" >> ~/hostapd.conf 
	echo "wpa=ENCRYPT_MODE" >> ~/hostapd.conf 
	echo "wpa_key_mgmt=WPA-PSK" >> ~/hostapd.conf 
	echo "wpa_pairwise=CCMP" >> ~/hostapd.conf 
	echo "wpa_passphrase=$WPA_SECRET" >> ~/hostapd.conf 
        # Bring up hostapd
        $HOSTAPD -B ~/hostapd.conf
        # Bring up the DHCP server
        $DHCPD -cf ~/dhcpd.conf $NET_AP
        ;;
stop)
        echo "Stopping AP mode"
        # Stop hostapd and dhcpd daemons
        killproc hostapd
        killproc dhcpd
	rm -f ~/hostapd.conf
	rm -f ~/dhcpd.conf
        ;;
esac


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-23 18:41               ` Larry Finger
@ 2011-11-24 13:03                 ` Jan Dvořák
  2011-11-24 15:40                   ` Larry Finger
  2011-11-24 16:59                   ` Larry Finger
  0 siblings, 2 replies; 13+ messages in thread
From: Jan Dvořák @ 2011-11-24 13:03 UTC (permalink / raw)
  To: Larry Finger; +Cc: Stanislaw Gruszka, linux-wireless

On Wed, 23 Nov 2011 12:41:34 -0600
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> >>> I can't still use hostapd, however.
> >> Hmm, I'm not sure if rtl92c works in AP mode, Larry?
> 
> When I try it, I get rtl8192cu to beacon, and it is possible to authenticate and 
> associate, but the second computer never gets an IP number.

Even without DHCP, no traffic ever comes through. Plus from here it looks like
the client is reconnecting (quickly, let's say once per 5s) to no end.

So, how do I debug this properly? Can I turn on some kind of verbose mode?
Is there a way to sniff the communication (kismet or something)?

Best regards,
	Jan Dvorak

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-24 13:03                 ` Jan Dvořák
@ 2011-11-24 15:40                   ` Larry Finger
  2011-11-24 16:59                   ` Larry Finger
  1 sibling, 0 replies; 13+ messages in thread
From: Larry Finger @ 2011-11-24 15:40 UTC (permalink / raw)
  To: Jan Dvořák; +Cc: Stanislaw Gruszka, linux-wireless

On 11/24/2011 07:03 AM, Jan Dvořák wrote:
> On Wed, 23 Nov 2011 12:41:34 -0600
> Larry Finger<Larry.Finger@lwfinger.net>  wrote:
>>>>> I can't still use hostapd, however.
>>>> Hmm, I'm not sure if rtl92c works in AP mode, Larry?
>>
>> When I try it, I get rtl8192cu to beacon, and it is possible to authenticate and
>> associate, but the second computer never gets an IP number.
>
> Even without DHCP, no traffic ever comes through. Plus from here it looks like
> the client is reconnecting (quickly, let's say once per 5s) to no end.
>
> So, how do I debug this properly? Can I turn on some kind of verbose mode?
> Is there a way to sniff the communication (kismet or something)?

You could look at what the device is putting on the air with kismet or 
wireshark. Another option would be to see the flow through the driver by loading 
the driver with the debug option. The maximum debug level of 5 is likely too 
much output, but using 4 should be OK. You need a recent kernel to use this 
option. I'm not sure if it is in 3.1 or not. Use 'modinfo rtl8192cu' to see the 
module parameter list.

Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-24 13:03                 ` Jan Dvořák
  2011-11-24 15:40                   ` Larry Finger
@ 2011-11-24 16:59                   ` Larry Finger
  2011-11-24 17:52                     ` Jan Dvořák
  1 sibling, 1 reply; 13+ messages in thread
From: Larry Finger @ 2011-11-24 16:59 UTC (permalink / raw)
  To: Jan Dvořák; +Cc: Stanislaw Gruszka, linux-wireless

I was able to form an AP using my RT2870 device, thus my script is OK.

I'm trying to find the differences between the data flow in rt2800usb and rtl8192cu.

Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: rtl8192cu not working with Edimax EW-7811Un
  2011-11-24 16:59                   ` Larry Finger
@ 2011-11-24 17:52                     ` Jan Dvořák
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Dvořák @ 2011-11-24 17:52 UTC (permalink / raw)
  To: Larry Finger; +Cc: Stanislaw Gruszka, linux-wireless

On Thu, 24 Nov 2011 10:59:35 -0600
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> I'm trying to find the differences between the data flow in rt2800usb and rtl8192cu.

I'll try debug mode at home.

Best regards,
	Jan Dvorak

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-11-24 17:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 10:34 rtl8192cu not working with Edimax EW-7811Un Jan Dvořák
2011-11-22 14:01 ` Stanislaw Gruszka
2011-11-23 10:23   ` Jan Dvořák
2011-11-23 14:33     ` Stanislaw Gruszka
2011-11-23 15:24       ` Jan Dvořák
2011-11-23 15:40         ` Larry Finger
2011-11-23 15:51           ` Stanislaw Gruszka
2011-11-23 16:52             ` Jan Dvořák
2011-11-23 18:41               ` Larry Finger
2011-11-24 13:03                 ` Jan Dvořák
2011-11-24 15:40                   ` Larry Finger
2011-11-24 16:59                   ` Larry Finger
2011-11-24 17:52                     ` Jan Dvořák

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).