# problems with edup USB wireless adapter

## Adel Ahmed

I'm trying to configure wirless on my pc using the EDUP ed-1296

I really do not have much information so I just compiled many usb wireless devices as modules so I can find which module is required by this device

after rebooting I found the interface wlan0 and the additional loaded module:

zd1211rw

However I can't seem to be able to use the device:

localhost linux # iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.

localhost linux # iwlist wlan0 scan

wlan0     Interface doesn't support scanning.

here's my kernel config:

http://pastebin.com/0sp96exe

here's my dmesg ebtry:

  376.780904] ehci_hcd 0000:00:12.2: shutdown urb ffff88028d662a80 ep3in-intr

[  376.790413] zd1211rw 1-2:1.0: error ioread32(CR_REG1): -19

[  376.818341] usb 1-2: device reset not allowed in state 0

[  376.818364] usb 1-2: usb_disable_device nuking all URBs

[  376.922060] hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100

[  380.133110] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0004

[  380.133117] ehci_hcd 0000:00:12.2: GetStatus port:2 status 001803 0  ACK POWER sig=j CSC CONNECT

[  380.133123] hub 1-0:1.0: port 2, status 0501, change 0001, 480 Mb/s

[  380.236354] hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x501

[  380.287267] ehci_hcd 0000:00:12.2: port 2 reset complete, port enabled

[  380.287271] ehci_hcd 0000:00:12.2: GetStatus port:2 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  380.338088] usb 1-2: new high-speed USB device number 3 using ehci_hcd

[  380.388991] ehci_hcd 0000:00:12.2: port 2 reset complete, port enabled

[  380.388995] ehci_hcd 0000:00:12.2: GetStatus port:2 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  380.452818] usb 1-2: default language 0x0409

[  380.453066] usb 1-2: udev 3, busnum 1, minor = 2

[  380.453068] usb 1-2: New USB device found, idVendor=079b, idProduct=004a

[  380.453070] usb 1-2: New USB device strings: Mfr=16, Product=32, SerialNumber=0

[  380.453071] usb 1-2: Product: 802.11b/g USB WLAN

[  380.453073] usb 1-2: Manufacturer: ZyDAS

[  380.453131] usb 1-2: usb_probe_device

[  380.453133] usb 1-2: configuration #1 chosen from 1 choice

[  380.453320] usb 1-2: adding 1-2:1.0 (config #1, interface 0)

[  380.453353] zd1211rw 1-2:1.0: usb_probe_interface

[  380.453355] zd1211rw 1-2:1.0: usb_probe_interface - got id

[  380.504670] ehci_hcd 0000:00:12.2: port 2 reset complete, port enabled

[  380.504674] ehci_hcd 0000:00:12.2: GetStatus port:2 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  380.555517] usb 1-2: reset high-speed USB device number 3 using ehci_hcd

[  380.606388] ehci_hcd 0000:00:12.2: port 2 reset complete, port enabled

[  380.606392] ehci_hcd 0000:00:12.2: GetStatus port:2 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  380.670263] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'

[  380.670361] zd1211rw 1-2:1.0: phy1

thanks in advance

----------

## NeddySeagoon

blakdeath

zd1211rw is only half a device - the other half is firmware.

There is firmware here

search dmesg for errors about firmware loading

----------

## Adel Ahmed

I have installed the corresponding firmware

I cannot verify that the firmware is loading though, I can't find any errors either

----------

## Adel Ahmed

help! anyone!

----------

## NeddySeagoon

blakdeath,

Provoke the driver - rename the firmware so that it cannot be found.

That should get you an error in dmesg.  If so, no error means the firmware was found.

----------

## Adel Ahmed

I've completely removed the firmware, everything is the same in dmesg once I connect the usb stick

ehci_hcd 0000:00:13.2: GetStatus port:6 status 001803 0  ACK POWER sig=j CSC CONNECT

[   78.966712] hub 2-0:1.0: port 6, status 0501, change 0001, 480 Mb/s

[   79.070349] hub 2-0:1.0: debounce: port 6: total 100ms stable 100ms status 0x501

[   79.121264] ehci_hcd 0000:00:13.2: port 6 reset complete, port enabled

[   79.121269] ehci_hcd 0000:00:13.2: GetStatus port:6 status 001005 0  ACK POWER sig=se0 PE CONNECT

[   79.172083] usb 2-6: new high-speed USB device number 2 using ehci_hcd

[   79.222986] ehci_hcd 0000:00:13.2: port 6 reset complete, port enabled

[   79.222990] ehci_hcd 0000:00:13.2: GetStatus port:6 status 001005 0  ACK POWER sig=se0 PE CONNECT

[   79.286812] usb 2-6: default language 0x0409

[   79.287060] usb 2-6: udev 2, busnum 2, minor = 129

[   79.287062] usb 2-6: New USB device found, idVendor=079b, idProduct=004a

[   79.287063] usb 2-6: New USB device strings: Mfr=16, Product=32, SerialNumber=0

[   79.287065] usb 2-6: Product: 802.11b/g USB WLAN

[   79.287066] usb 2-6: Manufacturer: ZyDAS

[   79.287136] usb 2-6: usb_probe_device

[   79.287138] usb 2-6: configuration #1 chosen from 1 choice

[   79.287310] usb 2-6: adding 2-6:1.0 (config #1, interface 0)

[   79.382880] zd1211rw 2-6:1.0: usb_probe_interface

[   79.382883] zd1211rw 2-6:1.0: usb_probe_interface - got id

[   79.433425] ehci_hcd 0000:00:13.2: port 6 reset complete, port enabled

[   79.433430] ehci_hcd 0000:00:13.2: GetStatus port:6 status 001005 0  ACK POWER sig=se0 PE CONNECT

[   79.484260] usb 2-6: reset high-speed USB device number 2 using ehci_hcd

[   79.535168] ehci_hcd 0000:00:13.2: port 6 reset complete, port enabled

[   79.535172] ehci_hcd 0000:00:13.2: GetStatus port:6 status 001005 0  ACK POWER sig=se0 PE CONNECT

[   79.598996] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

[   79.599095] zd1211rw 2-6:1.0: phy0

[   79.599108] usbcore: registered new interface driver zd1211rw

----------

## Adel Ahmed

any new ideas?

----------

## NeddySeagoon

blakdeath,

Well, we can be sure the firmware is not loading now.

Is the zd1211rw kernel module built in or a loadable module?

It must be a module if the firmware is in /lib/firmware

----------

## Adel Ahmed

it's a loadable modules, lsmod shows the module is loaded automatically

would it make any difference If I build it in the kernel

----------

## NeddySeagoon

blakdeath,

You need to build the firmware in too. Thats harder.

Do you see any firmware related messages in dmesg?

The firmware isn't in linux-firmware. Google leads here

----------

## Adel Ahmed

nope, there aren't any firmware messages in dmesg

If by build the firmware into the kernel you mean check the include in kernel firmware blobs, then I've done so, and the blobs root directory is /lib/firmware/

here's that directory:

localhost linux # ls /lib/firmware/

kaweth  radeon  zd1211

localhost linux # ls /lib/firmware/zd1211/

zd1211b_ub  zd1211b_uphr  zd1211b_ur  zd1211_ub  zd1211_uphr  zd1211_ur

if this isn't it, where can I find information about including firmware into the kernel?

thanks

----------

## NeddySeagoon

blakdeath,

Thats something different.  You need to provide a path and file name in

```
 │ │    (aoeuidhtns) External firmware blobs to build into the kernel binary      │ │  

 │ │    (firmware) Firmware blobs root directory 
```

aoeuidhtns is bogus but is the string is empty the second option is hidden.

----------

## Adel Ahmed

not sure I quite get this, I've created an entry for each file under the zd directory:

localhost ~ # ls /lib/firmware/zd1211/

zd1211b_ub  zd1211b_uphr  zd1211b_ur  zd1211_ub  zd1211_uphr  zd1211_ur

just like I did for my radeon card

external firmware blobs:

/ zd1211/zd1211_ub zd1211/zd1211_uphr zd1211/zd1211_ur ...etc

as a result I no longer have the wlan0 interface

don't know exactly what information to provide here

----------

## NeddySeagoon

blakdeath,

If  │ │    (firmware) Firmware blobs root directory  is /lib/firmware/

then zd1211/zd1211b is the form of entries in External firmware blobs to build into the kernel binary

----------

## Adel Ahmed

I still need to clear out sth, by adding those entries into 'External firmware blobs to build into the kernel binary'

does that mean they are going to be automatically built in for me, or are there other steps that need to be done?

this is all new to me

----------

## NeddySeagoon

blakdeath,

In general, there are two ways to make kernel modules that require firmware work.

Build the kernel code al a module and put the uncompressed firmware, including the provided directory structure, into /lib/firmware.

The firmware will be loaded when the module is initialised. Loading the module and firmware require that root is mounted.

The alternative is to build the kernel code into the kernel binary and tell the kernel where to find the firmware at kernel build time, using the kernel options we have been discussing.  The two options are concatenated to form full path names.

The firmware is then included in the kernel binary. As above, when the kernel code is initialised, the firmware is loaded from within the kernel before root is mounted.

The other two combinations of modules and firmware both fail.  The former is easier to make work as you need less kernel builds while you play.

----------

## Adel Ahmed

http://cateee.net/lkddb/web-lkddb/EXTRA_FIRMWARE.html

as far as I understand, placing the files that need to be added to the kernel binary under the CONFIG_EXTRA_FIRMWARE directive. and here's mine:

CONFIG_EXTRA_FIRMWARE="radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin zd1211/zd1211b_ub zd1211/zd1211b_uphr zd1211/zd1211b_ur zd1211/zd1211_ub zd1211/zd1211_uphr zd1211/zd1211_ur"

CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

----------

## Adel Ahmed

silly me, apparently I forgot to compile wext into the kernel

the problem is solved now ;D

sorry to have wasted everyone's time

and thanks

----------

