2013-10-18 14:49:10

by Alan Stern

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Yannik, you should always use Reply-To-All so that your messages get
sent to the mailing list and not just to me.

On Thu, 17 Oct 2013, Yannik Völker wrote:

> Am 07.08.2013 19:34, schrieb Alan Stern:
> > Please post two usbmon traces, one showing the failure on your
> > current system and the other showing the adapter running correctly
> > under a 32-bit kernel. Instructions for usbmon are in the kernel
> > source file Documentation/usb/usbmon.txt.
> I never got it to work under a 32-bit kernel, i was just able to utilize
> a windows32 driver using ndiswrapper.
>
> Now i got it to "work". I randomly found out that the ar5523 driver
> actually works when you load it after you unload ndiswrapper so the
> following steps make it work:
> 1. modprobe ndiswrapper
> 2. plug in device
> 3. connect to wlan using ndiswrapper and disconnect again (might be
> optional)
> 4. modprobe -r ndiswrapper
> 5. modprobe ar5523
> 6. connect to wlan
> log for that is attatched as wlanthennative2.log
>
> This works but is unreliable and sometimes the connection breaks down with
>
> Oct 17 19:26:46 yannik-desktop wpa_supplicant[2153]: wlan0:
> CTRL-EVENT-DISCONNECTED bssid=01:23:45:67:89:ab reason=3
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005591] usb 3-14:
> ar5523_data_rx_cb: USB err: -71
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005703] usb 3-14: RX USB
> error -71.
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005718] usb 3-14:
> ar5523_data_rx_cb: USB err: -71
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005779] usb 3-14: RX USB
> error -71.
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005788] usb 3-14:
> ar5523_data_rx_cb: USB err: -71
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005846] usb 3-14: USB
> disconnect, device number 7
> Oct 17 19:26:46 yannik-desktop kernel: [ 633.006080] wlan0:
> deauthenticating from 01:23:45:67:89:ab by local choice (reason=3)
>
> unloading ar5523 and then refollowing the steps beginning with step 3
> usually makes it work again
>
>
> directload.log contains what happens when you just load ar5523 after
> the device was plugged in.
>
> plug_ndis.log contains what sometimes happens when i have loaded and
> unloaded the modules some times and then try to load ndiswrapper.
>
> pluginout.log contains syslog for plugging the device in and out.
>
> Do you still need the usbmon traces?

In fact, I'm not the best person to work on this, since I know nothing
about the ar5523. Problems with a particular driver should be brought
to the attention of the driver's maintainer (CC'ed). Maybe he can
help.

It might be a good idea to post two usbmon traces: One showing what
happens during steps 1-3, and another showing what happens if you
modprobe ar5523 without loading ndiswrapper first.

Alan Stern



2013-10-18 15:38:24

by Yannik Völker

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 18.10.2013 17:07, schrieb Oleksij Rempel:
> Am 18.10.2013 16:49, schrieb Alan Stern:
>> Yannik, you should always use Reply-To-All so that your messages
>> get sent to the mailing list and not just to me.
>>
>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>
>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>> Please post two usbmon traces, one showing the failure on
>>>> your current system and the other showing the adapter running
>>>> correctly under a 32-bit kernel. Instructions for usbmon are
>>>> in the kernel source file Documentation/usb/usbmon.txt.
>>> I never got it to work under a 32-bit kernel, i was just able
>>> to utilize a windows32 driver using ndiswrapper.
>>>
>>> Now i got it to "work". I randomly found out that the ar5523
>>> driver actually works when you load it after you unload
>>> ndiswrapper so the following steps make it work: 1. modprobe
>>> ndiswrapper 2. plug in device 3. connect to wlan using
>>> ndiswrapper and disconnect again (might be optional) 4.
>>> modprobe -r ndiswrapper 5. modprobe ar5523 6. connect to wlan
>>> log for that is attatched as wlanthennative2.log
>
>
> It sounds like linux driver didn't recognised usb id and didn't
> uploaded firmware, or there was no firmware to upload.
there is firmware (/lib/firmware/ar5523.bin exists) but it does not
even get touched (i renamed the file and the error did not change at all)

> thas is probably other issue. Let's start with thirst issue.
Ok, instructions?


- --
Yannik Völker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBAgAGBQJSYVXtAAoJEDqk81AiCyXKm3AP/jBgoxUZVAftnT/wasdo3gTe
Tooh1P/Kg0F6pAxzEdZ4C2XAlBdZnU4IPBPdBSxYwSYP4tAN6PW9fkdxHYIVUYNr
G09dsjXOKW2+Ax5M9T2bGw+IV/mYMjXTlFG0uWw087q+LhvYH/SX9BGOJWGQf0e3
xQWilxQ5NwooAd5ofkOzZ3yplRZQXU5WmwKzjieH/iGj/JKPN2cvY5PJ029NSwXT
DNj4zuT5o1M6QGS0NH5A3Wsmw8iFDNSU1/ezVPbwLCoiAcVL77Wi5cHPn7NIPab7
qgXkySAiByehH+8KeHWRXqv/sp0RMLjbg4sbMYrz4t2GCsqkCR88y+Nexz4XavjG
LdBoILmXpTJoTvm3b2EQdjCPzwJJ3nUVB6rtqbUgCsGTVfTX1oz2EFSEFJtiJWW2
1qvF/vqb1/Cn5k9gxNaDdmmUaN6zY4mIPPyBspoCYnExU+fXOHreAhcHsN4xBdDw
jjZWFrWTWKvNbFUNgukHb2dCqjBCn5E8F5G3ROUVRygN5ewdThg1lI3xKH3aOLTy
ZghSbi+yipyHD5NOdd2Z+rayGd+wD2Vk9i2X2GXwR6QPLgOe3OxQUoJu8vx7/E9S
I//0D1RVdhrma3kUELEy6xcn9nLMQohE2LPn8yLjYkRAPzR/46xTR8LYFdC2SKyC
/T+2qtvM4oJfTrhiTThf
=y5hR
-----END PGP SIGNATURE-----

2013-10-18 15:07:10

by Oleksij Rempel

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Am 18.10.2013 16:49, schrieb Alan Stern:
> Yannik, you should always use Reply-To-All so that your messages get
> sent to the mailing list and not just to me.
>
> On Thu, 17 Oct 2013, Yannik Völker wrote:
>
>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>> Please post two usbmon traces, one showing the failure on your
>>> current system and the other showing the adapter running correctly
>>> under a 32-bit kernel. Instructions for usbmon are in the kernel
>>> source file Documentation/usb/usbmon.txt.
>> I never got it to work under a 32-bit kernel, i was just able to utilize
>> a windows32 driver using ndiswrapper.
>>
>> Now i got it to "work". I randomly found out that the ar5523 driver
>> actually works when you load it after you unload ndiswrapper so the
>> following steps make it work:
>> 1. modprobe ndiswrapper
>> 2. plug in device
>> 3. connect to wlan using ndiswrapper and disconnect again (might be
>> optional)
>> 4. modprobe -r ndiswrapper
>> 5. modprobe ar5523
>> 6. connect to wlan
>> log for that is attatched as wlanthennative2.log


It sounds like linux driver didn't recognised usb id and didn't uploaded
firmware, or there was no firmware to upload.


>>
>> This works but is unreliable and sometimes the connection breaks down with
>>
>> Oct 17 19:26:46 yannik-desktop wpa_supplicant[2153]: wlan0:
>> CTRL-EVENT-DISCONNECTED bssid=01:23:45:67:89:ab reason=3
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005591] usb 3-14:
>> ar5523_data_rx_cb: USB err: -71
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005703] usb 3-14: RX USB
>> error -71.
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005718] usb 3-14:
>> ar5523_data_rx_cb: USB err: -71
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005779] usb 3-14: RX USB
>> error -71.
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005788] usb 3-14:
>> ar5523_data_rx_cb: USB err: -71
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.005846] usb 3-14: USB
>> disconnect, device number 7
>> Oct 17 19:26:46 yannik-desktop kernel: [ 633.006080] wlan0:
>> deauthenticating from 01:23:45:67:89:ab by local choice (reason=3)
>>
>> unloading ar5523 and then refollowing the steps beginning with step 3
>> usually makes it work again
>>

thas is probably other issue. Let's start with thirst issue.

>> directload.log contains what happens when you just load ar5523 after
>> the device was plugged in.
>>
>> plug_ndis.log contains what sometimes happens when i have loaded and
>> unloaded the modules some times and then try to load ndiswrapper.
>>
>> pluginout.log contains syslog for plugging the device in and out.
>>
>> Do you still need the usbmon traces?
>
> In fact, I'm not the best person to work on this, since I know nothing
> about the ar5523. Problems with a particular driver should be brought
> to the attention of the driver's maintainer (CC'ed). Maybe he can
> help.
>
> It might be a good idea to post two usbmon traces: One showing what
> happens during steps 1-3, and another showing what happens if you
> modprobe ar5523 without loading ndiswrapper first.
>



--
Regards,
Oleksij

2013-10-18 16:33:52

by Yannik Völker

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 18.10.2013 18:16, schrieb Oleksij Rempel:
> Am 18.10.2013 17:38, schrieb Yannik Völker:
>> Am 18.10.2013 17:07, schrieb Oleksij Rempel:
>>> Am 18.10.2013 16:49, schrieb Alan Stern:
>>>> Yannik, you should always use Reply-To-All so that your
>>>> messages get sent to the mailing list and not just to me.
>>>>
>>>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>>>
>>>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>>>> Please post two usbmon traces, one showing the failure
>>>>>> on your current system and the other showing the adapter
>>>>>> running correctly under a 32-bit kernel. Instructions
>>>>>> for usbmon are in the kernel source file
>>>>>> Documentation/usb/usbmon.txt.
>>>>> I never got it to work under a 32-bit kernel, i was just
>>>>> able to utilize a windows32 driver using ndiswrapper.
>>>>>
>>>>> Now i got it to "work". I randomly found out that the
>>>>> ar5523 driver actually works when you load it after you
>>>>> unload ndiswrapper so the following steps make it work: 1.
>>>>> modprobe ndiswrapper 2. plug in device 3. connect to wlan
>>>>> using ndiswrapper and disconnect again (might be optional)
>>>>> 4. modprobe -r ndiswrapper 5. modprobe ar5523 6. connect to
>>>>> wlan log for that is attatched as wlanthennative2.log
>>
>>
>>> It sounds like linux driver didn't recognised usb id and
>>> didn't uploaded firmware, or there was no firmware to upload.
>> there is firmware (/lib/firmware/ar5523.bin exists) but it does
>> not even get touched (i renamed the file and the error did not
>> change at all)
>
> find first usbid of your adapter (it will be changed after
> firmware upload). And try to force driver to use this id: modprobe
> -v ar5523 echo 07d1 3a0d > /sys/bus/usb/drivers/ar5523/new_id
>
> instead of "07d1 3a0d" use your id.
>

# lsusb

Bus 003 Device 011: ID 129b:160c CyberTAN Technology Siemens
S30853-S1038-R351 802.11g Wireless Adapter [Atheros AR5523]


# modprobe ar5523
# echo 129b 160c > /sys/bus/usb/drivers/ar5523/new_id
<plugging device in>
syslog:
Oct 18 18:27:47 yannik-desktop kernel: [ 8751.447784] usbcore:
registered new interface driver ar5523
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.036912] usb 3-14: new
high-speed USB device number 12 using xhci_hcd
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.053995] usb 3-14: New
USB device found, idVendor=129b, idProduct=160c
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054005] usb 3-14: New
USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054010] usb 3-14:
Product: AR5523
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054015] usb 3-14:
Manufacturer: Atheros Communications Inc
Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054019] usb 3-14:
SerialNumber: 1.0
Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052313] usb 3-14:
timeout waiting for command 01 reply
Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052323] usb 3-14: could
not initialize adapter
Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052359] usb 3-14: RX USB
error -2.
Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052378] usb 3-14: error
- -1 when submitting rx urb
Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052504] ar5523: probe of
3-14:1.0 failed with error -110

> Besidy, what kernel version are you using? May be it is too old..
>
3.11.0-12-generic
it is my understanding that the ar5523 driver was included from 3.8 on.
- --
Yannik Völker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBAgAGBQJSYWLtAAoJEDqk81AiCyXK9rUQAJ5OJnS0HqHHA+TrOF9o+SD7
ahsy/x+1pfOIsim2PLJO9uARCqmj14P1Hnoch0LQyqBpg0A/q4jka2YOn0Q7ow1p
G+7k1hjezRKDP9Vq1G1wB3bP4jwS3JVb30u2OWGxD7iOP+X3R4qdL3rkbtv3bmMo
WSbNinaPWJsRpRzWVmxcvDwGm8KZG+Z/7rDbxVIlaTMmxabR6TNAMg7FrCXoyE/w
Dgs3RCYh9Z7xaIUMvdJbhoTisyOXOwuSyD4LbQyNLzCaHnE4VodiHi4orJnSRwAk
wrGfPuR+bR5dfasTqGQkPrf3DbNczss9GGv6Wekr5jcLrRh3aXj8QPEU7zvnk+RL
a5KZvKmC0coFbMFSc5Dracss6/hK/zzPHtzHJn0jAacf8xqKB0dOODzrTmJgi/AR
vAEmDnwL0u9+Zki0a0D9yEwQzSn+7Hgfa4/owsqw6IPK3zJnkSqARvUDJTPEvMWr
Byis+0yqC3YNorVHA5y5j8QwZGJNReARh8osFp/XzxnRduXuIlB72E/AyzGTM7W9
kWVzaf9d+iqcR8q/NcyJeAywHOBK+quLs3IHvebKx/xIVrDBN7QbmsTjnEunWaZh
kbWSCsbqGg/NqCHh3YRtOz9qhqAcZmXVx2aAnLaPigQ0KWQWLczVNhsYwG/vO7B4
fdBwJQohTCf8pbC4ypw3
=pzyI
-----END PGP SIGNATURE-----

2013-10-19 12:18:40

by Yannik Völker

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 18.10.2013 19:16, schrieb Oleksij Rempel:
> Am 18.10.2013 18:33, schrieb Yannik Völker:
>> Am 18.10.2013 18:16, schrieb Oleksij Rempel:
>>> Am 18.10.2013 17:38, schrieb Yannik Völker:
>>>> Am 18.10.2013 17:07, schrieb Oleksij Rempel:
>>>>> Am 18.10.2013 16:49, schrieb Alan Stern:
>>>>>> Yannik, you should always use Reply-To-All so that your
>>>>>> messages get sent to the mailing list and not just to
>>>>>> me.
>>>>>>
>>>>>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>>>>>
>>>>>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>>>>>> Please post two usbmon traces, one showing the
>>>>>>>> failure on your current system and the other showing
>>>>>>>> the adapter running correctly under a 32-bit kernel.
>>>>>>>> Instructions for usbmon are in the kernel source
>>>>>>>> file Documentation/usb/usbmon.txt.
>>>>>>> I never got it to work under a 32-bit kernel, i was
>>>>>>> just able to utilize a windows32 driver using
>>>>>>> ndiswrapper.
>>>>>>>
>>>>>>> Now i got it to "work". I randomly found out that the
>>>>>>> ar5523 driver actually works when you load it after
>>>>>>> you unload ndiswrapper so the following steps make it
>>>>>>> work: 1. modprobe ndiswrapper 2. plug in device 3.
>>>>>>> connect to wlan using ndiswrapper and disconnect again
>>>>>>> (might be optional) 4. modprobe -r ndiswrapper 5.
>>>>>>> modprobe ar5523 6. connect to wlan log for that is
>>>>>>> attatched as wlanthennative2.log
>>>>
>>>>
>>>>> It sounds like linux driver didn't recognised usb id and
>>>>> didn't uploaded firmware, or there was no firmware to
>>>>> upload.
>>>> there is firmware (/lib/firmware/ar5523.bin exists) but it
>>>> does not even get touched (i renamed the file and the error
>>>> did not change at all)
>>
>>> find first usbid of your adapter (it will be changed after
>>> firmware upload). And try to force driver to use this id:
>>> modprobe -v ar5523 echo 07d1 3a0d >
>>> /sys/bus/usb/drivers/ar5523/new_id
>>
>>> instead of "07d1 3a0d" use your id.
>>
>>
>> # lsusb … Bus 003 Device 011: ID 129b:160c CyberTAN Technology
>> Siemens S30853-S1038-R351 802.11g Wireless Adapter [Atheros
>> AR5523] …
>>
>> # modprobe ar5523 # echo 129b 160c >
>> /sys/bus/usb/drivers/ar5523/new_id <plugging device in> syslog:
>> Oct 18 18:27:47 yannik-desktop kernel: [ 8751.447784] usbcore:
>> registered new interface driver ar5523 Oct 18 18:28:25
>> yannik-desktop kernel: [ 8789.036912] usb 3-14: new high-speed
>> USB device number 12 using xhci_hcd Oct 18 18:28:25
>> yannik-desktop kernel: [ 8789.053995] usb 3-14: New USB device
>> found, idVendor=129b, idProduct=160c Oct 18 18:28:25
>> yannik-desktop kernel: [ 8789.054005] usb 3-14: New USB device
>> strings: Mfr=1, Product=2, SerialNumber=3 Oct 18 18:28:25
>> yannik-desktop kernel: [ 8789.054010] usb 3-14: Product: AR5523
>> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054015] usb 3-14:
>> Manufacturer: Atheros Communications Inc Oct 18 18:28:25
>> yannik-desktop kernel: [ 8789.054019] usb 3-14: SerialNumber:
>> 1.0 Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052313] usb
>> 3-14: timeout waiting for command 01 reply Oct 18 18:28:27
>> yannik-desktop kernel: [ 8791.052323] usb 3-14: could not
>> initialize adapter Oct 18 18:28:27 yannik-desktop kernel: [
>> 8791.052359] usb 3-14: RX USB error -2. Oct 18 18:28:27
>> yannik-desktop kernel: [ 8791.052378] usb 3-14: error -1 when
>> submitting rx urb Oct 18 18:28:27 yannik-desktop kernel: [
>> 8791.052504] ar5523: probe of 3-14:1.0 failed with error -110
>>
>>> Besidy, what kernel version are you using? May be it is too
>>> old..
>>
>> 3.11.0-12-generic it is my understanding that the ar5523 driver
>> was included from 3.8 on.
>
> please test attached patch.
Stopped the error from appearing but it looks like it would not even try
to upload the firmware to me:

[ 708.193488] cfg80211: Calling CRDA to update world regulatory domain


[ 708.492120] usbcore: registered new interface driver ar5523


[ 708.509819] cfg80211: World regulatory domain updated:


[ 708.509822] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)

[ 708.509823] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 708.509824] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 708.509825] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300
mBi, 2000 mBm)
[ 708.509826] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 708.509827] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 720.232697] usb 3-14: USB disconnect, device number 8
[ 721.721980] usb 3-14: new high-speed USB device number 9 using xhci_hcd
[ 721.739153] usb 3-14: New USB device found, idVendor=129b,
idProduct=160c
[ 721.739163] usb 3-14: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 721.739168] usb 3-14: Product: AR5523
[ 721.739174] usb 3-14: Manufacturer: Atheros Communications Inc
[ 721.739178] usb 3-14: SerialNumber: 1.0
mtp-probe: checking bus 3, device 9:
"/sys/devices/pci0000:00/0000:00:14.0/usb3/3-14"
mtp-probe: bus: 3, device: 9 was not an MTP device

also it did not load the module on plugging in.

- --
Yannik Völker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQIcBAEBAgAGBQJSYnidAAoJEDqk81AiCyXKT1cP/3U/UvcXmhIHrxioZsM+WDcA
eEbC6zyEdGeLR10kkD9bnsTa0pwk4Bvj7ciuNKYYRn1kDpt+KIgmJoam0ljbF0Gb
jE/hG6ZzVdZEHWbEy2yz1+ns8hyQ7hCcc96zHI+5LQsPvqajRFgiclIOK9J1TbR4
Vc6xV0mJAAhLpokUZ+lD7cPlmBcpmMVkJrWRkyZW7W/jp4myitxmnROJrEVhZM51
sdglrDWq0tsEWgL8T5M10ZVwbBRZo94qYGWr3CVcDqEdAzx+vujtST7XWzmv1p85
6C9P+CmcEIS8GiCeZrQmPu74L2nXl5fT8xkrI9XrYd71q9HArl9Arr6w268nYw4N
urheXF88bg/Os4L/npm5yy9SGl+Iz/LJcsayrDP3MrwgNGZ8WGQ82mlxkk25X+l1
igu6A2OhB7fGfGoAuWpfRl1WBG33A1IuYyA1GWr5OrVShD831g8PLv8cFOBBHeFC
SLfh4hKPtctQk5NOlhe623wtOGI4lN2wXnRJIKABCdnIlzIkem7ZK1rmT4oXzNj3
cKzMf1mFOt5G1ow4iE0JDuH0RyUbkOa0CweyrXaJnyh1mQ6j3Y9XI6QMjk+dbt1f
E4RYKpL8IhTL2aWTDjSkyrbRNDpvtGa8h3yDvpZ3MartwOokUE6TTirxz3WfvLC0
8Poh/Wb6C2znRN/kfY6Q
=+njK
-----END PGP SIGNATURE-----

2013-10-19 15:30:18

by Oleksij Rempel

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Am 19.10.2013 14:18, schrieb Yannik Völker:
> Am 18.10.2013 19:16, schrieb Oleksij Rempel:
>> Am 18.10.2013 18:33, schrieb Yannik Völker:
>>> Am 18.10.2013 18:16, schrieb Oleksij Rempel:
>>>> Am 18.10.2013 17:38, schrieb Yannik Völker:
>>>>> Am 18.10.2013 17:07, schrieb Oleksij Rempel:
>>>>>> Am 18.10.2013 16:49, schrieb Alan Stern:
>>>>>>> Yannik, you should always use Reply-To-All so that your
>>>>>>> messages get sent to the mailing list and not just to
>>>>>>> me.
>>>>>>>
>>>>>>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>>>>>>
>>>>>>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>>>>>>> Please post two usbmon traces, one showing the
>>>>>>>>> failure on your current system and the other showing
>>>>>>>>> the adapter running correctly under a 32-bit kernel.
>>>>>>>>> Instructions for usbmon are in the kernel source
>>>>>>>>> file Documentation/usb/usbmon.txt.
>>>>>>>> I never got it to work under a 32-bit kernel, i was
>>>>>>>> just able to utilize a windows32 driver using
>>>>>>>> ndiswrapper.
>>>>>>>>
>>>>>>>> Now i got it to "work". I randomly found out that the
>>>>>>>> ar5523 driver actually works when you load it after
>>>>>>>> you unload ndiswrapper so the following steps make it
>>>>>>>> work: 1. modprobe ndiswrapper 2. plug in device 3.
>>>>>>>> connect to wlan using ndiswrapper and disconnect again
>>>>>>>> (might be optional) 4. modprobe -r ndiswrapper 5.
>>>>>>>> modprobe ar5523 6. connect to wlan log for that is
>>>>>>>> attatched as wlanthennative2.log
>>>>>
>>>>>
>>>>>> It sounds like linux driver didn't recognised usb id and
>>>>>> didn't uploaded firmware, or there was no firmware to
>>>>>> upload.
>>>>> there is firmware (/lib/firmware/ar5523.bin exists) but it
>>>>> does not even get touched (i renamed the file and the error
>>>>> did not change at all)
>>>
>>>> find first usbid of your adapter (it will be changed after
>>>> firmware upload). And try to force driver to use this id:
>>>> modprobe -v ar5523 echo 07d1 3a0d >
>>>> /sys/bus/usb/drivers/ar5523/new_id
>>>
>>>> instead of "07d1 3a0d" use your id.
>>>
>>>
>>> # lsusb … Bus 003 Device 011: ID 129b:160c CyberTAN Technology
>>> Siemens S30853-S1038-R351 802.11g Wireless Adapter [Atheros
>>> AR5523] …
>>>
>>> # modprobe ar5523 # echo 129b 160c >
>>> /sys/bus/usb/drivers/ar5523/new_id <plugging device in> syslog:
>>> Oct 18 18:27:47 yannik-desktop kernel: [ 8751.447784] usbcore:
>>> registered new interface driver ar5523 Oct 18 18:28:25
>>> yannik-desktop kernel: [ 8789.036912] usb 3-14: new high-speed
>>> USB device number 12 using xhci_hcd Oct 18 18:28:25
>>> yannik-desktop kernel: [ 8789.053995] usb 3-14: New USB device
>>> found, idVendor=129b, idProduct=160c Oct 18 18:28:25
>>> yannik-desktop kernel: [ 8789.054005] usb 3-14: New USB device
>>> strings: Mfr=1, Product=2, SerialNumber=3 Oct 18 18:28:25
>>> yannik-desktop kernel: [ 8789.054010] usb 3-14: Product: AR5523
>>> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054015] usb 3-14:
>>> Manufacturer: Atheros Communications Inc Oct 18 18:28:25
>>> yannik-desktop kernel: [ 8789.054019] usb 3-14: SerialNumber:
>>> 1.0 Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052313] usb
>>> 3-14: timeout waiting for command 01 reply Oct 18 18:28:27
>>> yannik-desktop kernel: [ 8791.052323] usb 3-14: could not
>>> initialize adapter Oct 18 18:28:27 yannik-desktop kernel: [
>>> 8791.052359] usb 3-14: RX USB error -2. Oct 18 18:28:27
>>> yannik-desktop kernel: [ 8791.052378] usb 3-14: error -1 when
>>> submitting rx urb Oct 18 18:28:27 yannik-desktop kernel: [
>>> 8791.052504] ar5523: probe of 3-14:1.0 failed with error -110
>>>
>>>> Besidy, what kernel version are you using? May be it is too
>>>> old..
>>>
>>> 3.11.0-12-generic it is my understanding that the ar5523 driver
>>> was included from 3.8 on.
>
>> please test attached patch.
> Stopped the error from appearing but it looks like it would not even try
> to upload the firmware to me:
>
> [ 708.193488] cfg80211: Calling CRDA to update world regulatory domain
>
>
> [ 708.492120] usbcore: registered new interface driver ar5523
>
>
> [ 708.509819] cfg80211: World regulatory domain updated:
>
>
> [ 708.509822] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
>
> [ 708.509823] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 708.509824] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 708.509825] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300
> mBi, 2000 mBm)
> [ 708.509826] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 708.509827] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
> mBi, 2000 mBm)
> [ 720.232697] usb 3-14: USB disconnect, device number 8
> [ 721.721980] usb 3-14: new high-speed USB device number 9 using xhci_hcd
> [ 721.739153] usb 3-14: New USB device found, idVendor=129b,
> idProduct=160c
> [ 721.739163] usb 3-14: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 721.739168] usb 3-14: Product: AR5523
> [ 721.739174] usb 3-14: Manufacturer: Atheros Communications Inc
> [ 721.739178] usb 3-14: SerialNumber: 1.0
> mtp-probe: checking bus 3, device 9:
> "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-14"
> mtp-probe: bus: 3, device: 9 was not an MTP device
>
> also it did not load the module on plugging in.

does not looks like it is complete log. Please attach your dmesg.

--
Regards,
Oleksij

2013-10-18 16:17:00

by Oleksij Rempel

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Am 18.10.2013 17:38, schrieb Yannik Völker:
> Am 18.10.2013 17:07, schrieb Oleksij Rempel:
>> Am 18.10.2013 16:49, schrieb Alan Stern:
>>> Yannik, you should always use Reply-To-All so that your messages
>>> get sent to the mailing list and not just to me.
>>>
>>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>>
>>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>>> Please post two usbmon traces, one showing the failure on
>>>>> your current system and the other showing the adapter running
>>>>> correctly under a 32-bit kernel. Instructions for usbmon are
>>>>> in the kernel source file Documentation/usb/usbmon.txt.
>>>> I never got it to work under a 32-bit kernel, i was just able
>>>> to utilize a windows32 driver using ndiswrapper.
>>>>
>>>> Now i got it to "work". I randomly found out that the ar5523
>>>> driver actually works when you load it after you unload
>>>> ndiswrapper so the following steps make it work: 1. modprobe
>>>> ndiswrapper 2. plug in device 3. connect to wlan using
>>>> ndiswrapper and disconnect again (might be optional) 4.
>>>> modprobe -r ndiswrapper 5. modprobe ar5523 6. connect to wlan
>>>> log for that is attatched as wlanthennative2.log
>
>
>> It sounds like linux driver didn't recognised usb id and didn't
>> uploaded firmware, or there was no firmware to upload.
> there is firmware (/lib/firmware/ar5523.bin exists) but it does not
> even get touched (i renamed the file and the error did not change at all)

find first usbid of your adapter (it will be changed after firmware
upload). And try to force driver to use this id:
modprobe -v ar5523
echo 07d1 3a0d > /sys/bus/usb/drivers/ar5523/new_id

instead of "07d1 3a0d" use your id.

Besidy, what kernel version are you using? May be it is too old..

--
Regards,
Oleksij

2013-10-19 23:54:10

by Stefan Lippers-Hollmann

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Hi

On Saturday 19 October 2013, Yannik Völker wrote:
[…]
> [ 708.193488] cfg80211: Calling CRDA to update world regulatory domain
> [ 708.492120] usbcore: registered new interface driver ar5523
> [ 708.509819] cfg80211: World regulatory domain updated:
> [ 708.509822] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> [ 708.509823] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [ 708.509824] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [ 708.509825] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
> [ 708.509826] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [ 708.509827] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [ 720.232697] usb 3-14: USB disconnect, device number 8
> [ 721.721980] usb 3-14: new high-speed USB device number 9 using xhci_hcd
> [ 721.739153] usb 3-14: New USB device found, idVendor=129b, idProduct=160c
> [ 721.739163] usb 3-14: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 721.739168] usb 3-14: Product: AR5523
> [ 721.739174] usb 3-14: Manufacturer: Atheros Communications Inc
> [ 721.739178] usb 3-14: SerialNumber: 1.0
> mtp-probe: checking bus 3, device 9:
> "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-14"
> mtp-probe: bus: 3, device: 9 was not an MTP device

Like Oleksij Rempel mentioned, working with arbitrarily cut kernel
messages is pretty futile, but I would first recommend to confirm that
your firmware is really correct:

$ md5sum -b /lib/firmware/ar5523.bin
78fe4478dca9134c028e7507421b3f6a */lib/firmware/ar5523.bin

ar5523 behaves in a slightly uncommon way, when you first connect your
USB wlan card, it flags 0x129b, 0x160c (let's at least use this
example) as its USB IDs. ar5523.ko binds to this USB and starts the
firmware upload, once the firmware is uploaded to the device, a USB bus
reset is triggered and the firmware makes the device now flag a
different USB, decremented by 1 - so ending up with 0x129b, 0x160b this
time, only now after this modeswitch the module can actually load.

In the past - before ar5523 was ever merged into linux, there was (at
least) one faulty firmware version which incremented the USB ID, rather
than decrementing it, which would be one explanation for your problem.

Another quite likely problem would be a side effect of your previous
ndiswrapper installation, which -in order to function- takes over the
USB IDs for itself, so also make sure to get rid of all traces of it,
in particular its overrides in /etc/modprobe.d/*.conf.

But in order to do anything, we really need full logs - at least from
the moment on you plug in your USB card. What your log should look like
is something like this:

[ 4826.812663] usb 3-1.6: new high-speed USB device number 6 using ehci-pci
[ 4826.899085] usb 3-1.6: New USB device found, idVendor=1385, idProduct=4251
[ 4826.899090] usb 3-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4826.899092] usb 3-1.6: Product: WG111T
[ 4826.899103] usb 3-1.6: Manufacturer: Atheros Communications Inc
[ 4826.899105] usb 3-1.6: SerialNumber: 1.0
[ 4827.004173] usbcore: registered new interface driver ar5523
[ 4827.325368] usb 3-1.6: USB disconnect, device number 6
[ 4827.502257] usb 3-1.6: new high-speed USB device number 7 using ehci-pci
[ 4827.588323] usb 3-1.6: New USB device found, idVendor=1385, idProduct=4250
[ 4827.588328] usb 3-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4827.588331] usb 3-1.6: Product: WG111T
[ 4827.588333] usb 3-1.6: Manufacturer: Atheros Communications Inc
[ 4827.588335] usb 3-1.6: SerialNumber: 1.0
[ 4827.637048] usb 3-1.6: Cap: CAP_TARGET_VERSION=0x00000006
[ 4827.637432] usb 3-1.6: Cap: CAP_TARGET_REVISION=0x00000001
[ 4827.637800] usb 3-1.6: Cap: CAP_MAC_VERSION=0x00000008
[ 4827.638176] usb 3-1.6: Cap: CAP_MAC_REVISION=0x00000001
[ 4827.638520] usb 3-1.6: Cap: CAP_PHY_REVISION=0x00000046
[ 4827.638889] usb 3-1.6: Cap: CAP_ANALOG_5GHz_REVISION=0x00000046
[ 4827.639138] usb 3-1.6: Cap: CAP_ANALOG_2GHz_REVISION=0x00000000
[ 4827.639525] usb 3-1.6: Cap: CAP_REG_DOMAIN=0x00000000
[ 4827.639885] usb 3-1.6: Cap: CAP_REG_CAP_BITS=0x00000000
[ 4827.640147] usb 3-1.6: Cap: CAP_WIRELESS_MODES=0x00000000
[ 4827.640534] usb 3-1.6: Cap: CAP_CHAN_SPREAD_SUPPORT=0x0000001c
[ 4827.640885] usb 3-1.6: Cap: CAP_COMPRESS_SUPPORT=0x00000001
[ 4827.641151] usb 3-1.6: Cap: CAP_BURST_SUPPORT=0x00000001
[ 4827.641527] usb 3-1.6: Cap: CAP_FAST_FRAMES_SUPPORT=0x00000001
[ 4827.641884] usb 3-1.6: Cap: CAP_CHAP_TUNING_SUPPORT=0x00000001
[ 4827.642133] usb 3-1.6: Cap: CAP_TURBOG_SUPPORT=0x00000001
[ 4827.642508] usb 3-1.6: Cap: CAP_TURBO_PRIME_SUPPORT=0x00000001
[ 4827.642761] usb 3-1.6: Cap: CAP_DEVICE_TYPE=0x00000001
[ 4827.643132] usb 3-1.6: Cap: CAP_WME_SUPPORT=0x00000001
[ 4827.643383] usb 3-1.6: Cap: CAP_TOTAL_QUEUES=0x00000001
[ 4827.643757] usb 3-1.6: Cap: CAP_CONNECTION_ID_MAX=0x0000000a
[ 4827.644013] usb 3-1.6: Cap: CAP_LOW_5GHZ_CHAN=0x00000004
[ 4827.644382] usb 3-1.6: Cap: CAP_HIGH_5GHZ_CHAN=0x00001338
[ 4827.644756] usb 3-1.6: Cap: CAP_LOW_2GHZ_CHAN=0x000017d4
[ 4827.645008] usb 3-1.6: Cap: CAP_HIGH_2GHZ_CHAN=0x00000908
[ 4827.645390] usb 3-1.6: Cap: CAP_TWICE_ANTENNAGAIN_5G=0x00000001
[ 4827.645659] usb 3-1.6: Cap: CAP_TWICE_ANTENNAGAIN_2G=0x00000004
[ 4827.646014] usb 3-1.6: Cap: CAP_CIPHER_AES_CCM=0x00000001
[ 4827.646276] usb 3-1.6: Cap: CAP_CIPHER_TKIP=0x00000000
[ 4827.646649] usb 3-1.6: Cap: CAP_MIC_TKIP=0x00000000
[ 4827.647409] usb 3-1.6: MAC/BBP AR5523, RF AR2112
[ 4827.647676] usb 3-1.6: Found and initialized AR5523 device

only then, afterwards when you actually up your interface, the calls to
wpa_supplicant and crda will happen, like:

[29068.766731] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[29092.453104] NET: Registered protocol family 17
[29093.421812] wlan1: authenticate with 01:23:45:67:89:ab
[29093.431498] wlan1: send auth to 01:23:45:67:89:ab (try 1/3)
[29093.434232] wlan1: authenticated
[29093.435348] wlan1: associate with 01:23:45:67:89:ab (try 1/3)
[29093.438360] wlan1: RX AssocResp from 01:23:45:67:89:ab (capab=0x431 status=0 aid=1)
[29093.439215] wlan1: associated
[29093.439243] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[29093.439332] cfg80211: Calling CRDA for country: DE
[29093.443332] cfg80211: Regulatory domain changed to country: DE
[29093.443335] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[29093.443337] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[29093.443339] cfg80211: (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[29093.443341] cfg80211: (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[29093.443342] cfg80211: (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)
[29093.443344] cfg80211: (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)

We'd need the debugging information for all of these messages,
especially the early ones about the mode switch.

Personally I'm rather confident that the existing USB IDs are correct,
namely 0x129b, 0x160c without firmware loaded and 0x129b, 0x160b after
the firmware upload has executed its modeswitch, which would be
reminiscence of your earlier games with ndiswrapper (which -surprise-
also uploads a(n eventually broken, see above) firmware). In order to
make sure to remove different firmwares from your device's RAM, you
need to physically disconnect your USB device for a moment (or power
down your whole system), unloading ndiswrapper and loading ar5523.ko
or just warmrebooting is not enough (as this won't make the device
forget its firmware).

Regards
Stefan Lippers-Hollmann

2013-10-18 17:16:04

by Oleksij Rempel

[permalink] [raw]
Subject: Re: ar5523 Gigaset USB Adapter 108 issue

Am 18.10.2013 18:33, schrieb Yannik Völker:
> Am 18.10.2013 18:16, schrieb Oleksij Rempel:
>> Am 18.10.2013 17:38, schrieb Yannik Völker:
>>> Am 18.10.2013 17:07, schrieb Oleksij Rempel:
>>>> Am 18.10.2013 16:49, schrieb Alan Stern:
>>>>> Yannik, you should always use Reply-To-All so that your
>>>>> messages get sent to the mailing list and not just to me.
>>>>>
>>>>> On Thu, 17 Oct 2013, Yannik Völker wrote:
>>>>>
>>>>>> Am 07.08.2013 19:34, schrieb Alan Stern:
>>>>>>> Please post two usbmon traces, one showing the failure
>>>>>>> on your current system and the other showing the adapter
>>>>>>> running correctly under a 32-bit kernel. Instructions
>>>>>>> for usbmon are in the kernel source file
>>>>>>> Documentation/usb/usbmon.txt.
>>>>>> I never got it to work under a 32-bit kernel, i was just
>>>>>> able to utilize a windows32 driver using ndiswrapper.
>>>>>>
>>>>>> Now i got it to "work". I randomly found out that the
>>>>>> ar5523 driver actually works when you load it after you
>>>>>> unload ndiswrapper so the following steps make it work: 1.
>>>>>> modprobe ndiswrapper 2. plug in device 3. connect to wlan
>>>>>> using ndiswrapper and disconnect again (might be optional)
>>>>>> 4. modprobe -r ndiswrapper 5. modprobe ar5523 6. connect to
>>>>>> wlan log for that is attatched as wlanthennative2.log
>>>
>>>
>>>> It sounds like linux driver didn't recognised usb id and
>>>> didn't uploaded firmware, or there was no firmware to upload.
>>> there is firmware (/lib/firmware/ar5523.bin exists) but it does
>>> not even get touched (i renamed the file and the error did not
>>> change at all)
>
>> find first usbid of your adapter (it will be changed after
>> firmware upload). And try to force driver to use this id: modprobe
>> -v ar5523 echo 07d1 3a0d > /sys/bus/usb/drivers/ar5523/new_id
>
>> instead of "07d1 3a0d" use your id.
>
>
> # lsusb
> …
> Bus 003 Device 011: ID 129b:160c CyberTAN Technology Siemens
> S30853-S1038-R351 802.11g Wireless Adapter [Atheros AR5523]
> …
>
> # modprobe ar5523
> # echo 129b 160c > /sys/bus/usb/drivers/ar5523/new_id
> <plugging device in>
> syslog:
> Oct 18 18:27:47 yannik-desktop kernel: [ 8751.447784] usbcore:
> registered new interface driver ar5523
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.036912] usb 3-14: new
> high-speed USB device number 12 using xhci_hcd
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.053995] usb 3-14: New
> USB device found, idVendor=129b, idProduct=160c
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054005] usb 3-14: New
> USB device strings: Mfr=1, Product=2, SerialNumber=3
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054010] usb 3-14:
> Product: AR5523
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054015] usb 3-14:
> Manufacturer: Atheros Communications Inc
> Oct 18 18:28:25 yannik-desktop kernel: [ 8789.054019] usb 3-14:
> SerialNumber: 1.0
> Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052313] usb 3-14:
> timeout waiting for command 01 reply
> Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052323] usb 3-14: could
> not initialize adapter
> Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052359] usb 3-14: RX USB
> error -2.
> Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052378] usb 3-14: error
> -1 when submitting rx urb
> Oct 18 18:28:27 yannik-desktop kernel: [ 8791.052504] ar5523: probe of
> 3-14:1.0 failed with error -110
>
>> Besidy, what kernel version are you using? May be it is too old..
>
> 3.11.0-12-generic
> it is my understanding that the ar5523 driver was included from 3.8 on.

please test attached patch.

--
Regards,
Oleksij


Attachments:
ar5523.diff (760.00 B)